Just for the record, I had the same problem when I tried to build 4.1.2 on
several different systems (Linux and MacOS), and I do have HDF5, szip, zlib,
etc all in the same bin, include, lib directories.
In my case, I edited the "./configure" program to force LIBS to include "-lsz",
and that seemed to fix the problem. Setting the LIBS env var probably would
have worked too.
--Mary
On May 6, 2011, at 4:20 PM, Chad Herman wrote:
> 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
>
> _______________________________________________
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe, visit:
> http://www.unidata.ucar.edu/mailing_lists/