On 05/06/2011 06:01 PM, Ed Hartnett wrote:
Chad Herman<chad.herman.us@xxxxxxxxx> writes:
I fixed the problem by defining some environmental variables:
export CPPFLAGS="-fPIC -I/usr/local/zlib-1.2.5/include
-I/usr/local/szip-2.1/include -I/usr/local/hdf5-1.8.6/include"
export LDFLAGS="-L/usr/local/zlib-1.2.5/lib -L/usr/local/szip-2.1/lib
-L/usr/local/netcdf-4.1.2/lib -lnetcdff -lnetcdf
-L/usr/local/hdf5-1.8.6/lib -lhdf5_hl -lhdf5
-L/usr/local/zlib-1.2.5/lib -lz -lm -lhdf5_hl -lhdf5 -lz -lm -lsz
-L/usr/local/szip-2.1/lib -lsz -lhdf5_hl -lhdf5 -lz -lm
-lsz-L/usr/local/hdf5-1.8.6/lib"
export LIBS="-lm -lsz"
Now I can get through configure and build. The only issue I have left,
which admittedly is an aesthetic annoyance, is that nc-config returns
repeated library paths and names:
-L/usr/local/netcdf-4.1.2/lib -lnetcdf -L/usr/local/hdf5-1.8.6/lib
-lhdf5_hl -lhdf5 -L/usr/local/zlib-1.2.5/lib -lz -lm -lhdf5_hl -lhdf5
-lz -lm -lsz -L/usr/local/szip-2.1/lib -lsz -lhdf5_hl -lhdf5 -lz -lm
-lsz -L/usr/local/hdf5-1.8.6/lib -lhdf5_hl -lhdf5
-L/usr/local/zlib-1.2.5/lib -lz -L/usr/local/szip-2.1/lib -lsz
This is undoubtedly because of LDFLAGS and LIBS variables. Is there a
way to successfully build with out having to define LDFLAGS and LIBS?
The way to avoid all that is to install the latest version of each
library in the same directory, and use only that.
Thanks,
Ed
I used to keep all of my libraries in /usr/local, but at some point, the
include and lib folders became unmanageable. I want to keep the library
directories separate.
Chad