[MITgcm-support] Build with nectdf
Patti M Sheaffer
Patti.M.Sheaffer at aero.org
Sat Aug 4 21:50:01 EDT 2012
I'm sorry I wasn't clearer - and I probably made a mistake with my
quotations. I'll have to think about your comments, but they are very
helpful - thank you!
I just today discovered the actual problem to which I was referring (it
may not be relevant to MITgcm): When you build NetCDF and install it to
its own directory on several of the Linux x64 distros, it creates
/yournetcdfinstallpath/bin, /yournetcdfinstallpath/include, and
/yournetcdfinstallpath/lib64. But often the build script gcc command line
call to include the library (say, in MITgcm) is:
-L/yournetcdfinstallpath/lib -lnetcdf
Note that it's not going to look in /yournetcdfinstallpath/lib64 - so it
fails to find the library it needs and doesn't always tell you. Most
buildscripts I've seen for most linux apps that get supplied as buildable
source (rather than binares) encounter this sort of dependency issue. It's
been around at least a decade (I used to build an x64 bacula contrib for
an OpenSuSE repo). I would think that script-building tools would by now
check or create the options for both lib and a lib64 directories for all
required libs - but I'm a total klutz with build scripts so who am I to
criticize? ;^)
Happy, Happy, Happy :-)
Patricia
From: Martin Losch <Martin.Losch at awi.de>
To: mitgcm-support at mitgcm.org,
Date: 07/31/2012 05:25 AM
Subject: Re: [MITgcm-support] Build with nectdf
Patti,
the build_options-files for genmake2 use bash-syntax. In bash, this
"$NETCDF_ROOT" is different from '$NETCDF_ROOT' (the former expands
NETCDF_ROOT, the latter doesn't); there are many resources online, that
explain this in more detail. As a general rule I always use double quotes
with bash, unless I want to pass variable names rather than their content.
More information about the MITgcm-support
mailing list