Connor, >Date: Mon, 04 Aug 2003 11:35:05 -0700 >From: "Flynn, Connor J" <address@hidden> >Organization: NOAA/PNL >To: Steve Emmerson <address@hidden> >Subject: RE: 20030804: udunits on cygwin The above message contained the following: > I'm not sure I can answer your questions very well but I'll try. > > Regarding the Fortran compiler and flags, they aren't actually necessary > per se. The problem I was having was this:. After an apparently > successful run of "configure", "make" would bomb out at line 132 of the > file cfortran.h with a big long message starting with "cfortran.h: > Can't find your environment among:". From examination of cfortran.h, it > looks like that error condition is tripped based on whether a valid > Fortran environment was found. After your reply I tried a few > alternatives including -DNAGf90Fortran which works nicely and doesn't > require setting or defining any other Fortran related flags. Ensuring that one of the C macros referenced in the file "cfortran.h" was defined would probably have been sufficient -- although it wouldn't guarantee that the Fortran interface would work. If defining NAGf90Fortran make the Fortran interface work under Cygwin, then that's good news. > With regards to CXX, my guess is that there is probably a typo in the > configure file such that when the makefile is generated it accidentally > references CXX instead of CC. (Maybe the person who created it uses C++ > a lot and it just naturally flew from their finger tips? I don't know.) > If I don't define CXX I get the following result from make: > > 1. making `all' in directory /usr/local/udunits-1.11.7/src/udunits > 2. make: Entering directory `/usr/local/udunits-1.11.7/src/udunits' > 3. make: Entering directory `/usr/local/udunits-1.11.7/src/udunits' > 4. gcc -c -O -I../lib -I../port/misc -DNAGf90Fortran udunits.c > 5. -o udunits udunits.o -L/usr/local/udunits-1.11.7/src/lib -ludunits > -L/usr/local/udunits-1.11.7/src/port/misc -ludport > 6. -o: not found > 7. make: *** [udunits] Error 1 > 8. make: Leaving directory `/usr/local/udunits-1.11.7/src/udunits' > 9. make: *** [program] Error 2 > 10. make: Leaving directory `/usr/local/udunits-1.11.7/src/udunits' > 11. make: *** [udunits/all] Error 1 I think I understand the problem. Cygwin doesn't distinguish between, for example, files "foo.c" and file "foo.C": they both refer to the same file. This non-standard behavior means that case-sensitive makefile rules won't work. There are some in the UDUNITS package. > To me this looks like the first call (to gcc) on line 4 works but the > subsequent call on line 5 lacks any reference to a compiler so it bombs. > When I define a value for "CXX" (both in my environment and in the > configure script) line 5 above proceeds properly because the compiler > defined by CXX appears instead of a blank. When you mentioned that > udunits doesn't use C++ I tried defining "CXX=gcc". This proceeds fine > but still requires the modification to the configure script or you get > the result above. > > Does this explain what's happening? > > Connor > > > Why is it important to define a Fortran and C++ compiler (environment > > variables FC and CXX)? The UDUNITS package doesn't use them. Regards, Steve Emmerson
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.