[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20030929: udunits and fortran Mac OSX 10.2.



Ruth,

>Date: Mon, 29 Sep 2003 15:42:54 -0400
>From: Ruth Platner <address@hidden>
>Organization: University of Rhode Island
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20030926: udunits and fortran Mac OSX 10.2.

The above message contained the following:

> I tried setenv CXX gcc2, setenv CXX gcc, and setenv CXX cc and they
> all ended in the same compiler error. cc, gcc and gcc2 are all
> symbolically linked so trying all of them was silly, but I thought I
> should try everything.  Again I've included the logs again and env.log
> is the output of env in case you're curious about my environment.
> 
> Ruth
...

>  filename="make.log"
...
> making `all' in directory /udunits-1.11.7/src/udunits
> 
> cc -c -O -I../lib -I../port/misc -Df2cFortran udunits.c
> @CXX@ -o udunits udunits.o -L/udunits-1.11.7/src/lib -ludunits 
> -L/udunits-1.11.7/src/port/misc -ludport -ly
> /bin/sh: @CXX@: command not found
> make[2]: *** [udunits] Error 1
> make[1]: *** [program] Error 2
> make: *** [udunits/all] Error 1

My fault.  The configure script doesn't look for a C++ compiler, so it
wouldn't matter how the environment variable CXX was set.

Try this:

    1.  Go to the "udunits/" subdirectory 

    2.  Edit the file "Makefile": change

            dummy_prog $(PROGRAM):      $(OBJS)
                    @if [ -r $@.f -o -r $@.F ]; then \
                        ld='$(FC) -o $@ $(FFLAGS)'; \
                    elif [ -r $@.cc -o -r $@.C ]; then \
                        ld='$(CXX) -o $@ $(CXXFLAGS)'; \
                    else \
                        ld='$(CC) -o $@ $(CFLAGS)'; \
                    fi; \
                    cmd="$$ld $(LDFLAGS) $(OBJS) $(LIBS)"; \
                    echo $$cmd; \
                    $$cmd \
                        || (rm -f $@; exit 1)

        to

            dummy_prog $(PROGRAM):      $(OBJS)
                    $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)

        Mind the existance of tab characters.  Use the other rules as
        examples.

    3.  Execute the command "make" in the subdirectory.

    4.  If that succeeds, then go up one directory and execute the
        command "make".

Please let me know if this helps.

Regards,
Steve Emmerson


pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy