[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20031229: compiles OK but doesn't link on OS X
- Subject: 20031229: compiles OK but doesn't link on OS X
- Date: Mon, 29 Dec 2003 13:40:10 -0700
Matt,
> To: address@hidden
> From: Matt Hipsey <address@hidden>
> Subject: compiles OK but doesn't link on OS X
> Organization: ?
> Keywords: netCDF MacOS-X IBM XL Fortran
The above message contained the following:
> I am trying to compile a large program that requires the netCDF
> libraries under MAC OS X using the IBM XL Fortran compiler.
Congratulations! You're the first one (that I know of) using this
platform and compiler combination. (Probably not what you wanted to
hear :-)
> I originally downloaded the precompiled libnetcdf.a for OSX but it did
> not link properly:
>
> /usr/bin/ld: Undefined symbols:
> _nf_inq_varid
> _nf_get_var_text
...
Figures. That binary was compiled using a different Fortran compiler --
so it's not too surprising that the naming-conventions for the Fortran
routines differ.
> I therefore downloaded the netcdf_3.5.0 source and it would not
> compile. I saw another message that recommended the new 3.5.1 beta so i
> tried with that. It then compiled correctly (provided I used the C flag
> -Df2cFortran ??) and generated a libnetcdf.a file, but still gave me
> the same error as above (even though I specified the FC and F90
> compiler to be the same (xlf95) as for the main program. Below is the
> configure, compile and test logs.
By the way, you need to learn how to simultaneously redirect both the
standard output and the standard error of a command to the same logfile
(as the instructions request) so that error messages that you report
appear just after the command that has a problem. How this is done
depends on your user-shell, e.g.,
command >file.log 2>&1
or
command >&! file.log
This can make diagnosing problems MUCH faster.
Would you please (re)send me the files "configure.log", "make.log", and
"test.log" using the simultaneous redirection described above. Remember
to do a "make distclean" first. When you define the environment
variable CPPFLAGS, please don't include the string "-Df2cFortran" -- I
want to see what the package does without any help.
> Any help is much appreciated,
> Cheers
> Matt Hipsey
...
Regards,
Steve Emmerson