Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

Re: [netcdfgroup] Missing -lm and -lsz library issue

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

-- 
Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx



  • 2011 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: