[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #LAW-256659]: nc-config problem with netcdf-4.1.3-rc1 and static linking
- Subject: [netCDF #LAW-256659]: nc-config problem with netcdf-4.1.3-rc1 and static linking
- Date: Fri, 10 Jun 2011 07:38:52 -0600
> Hi
>
> The new build system in 4.1.3-rc1 gives an incorrect nc-config when static
> linking is combined with an installation prefix that differs from the
> location of the other libraries (like HDF5).
>
> I am on Cygwin and am building with static linking for the reasons most
> recently explained in ticket YSA-381038. My C libraries are in /usr/lib (z,
> curl) and /usr/local/lib (hdf5). Because I am building with a non-standard
> Fortran compiler I use an installation prefix that differs from either of
> these. As suggested in INSTALL, I tell configure where to find hdf5 using
> CPPFLAGS and LDFLAGS. The full command is:
>
>
> CC=gcc FC=g95 CPPFLAGS="-DpgiFortran -I/usr/local/include"
> FFLAGS=-fno-second-underscore FCFLAGS=-fno-second-underscore
> LDFLAGS=-L/usr/local/lib ./configure --disable-shared --enable-netcdf-4
> --enable-dap --with-libcf --prefix=/usr/local/netcdf4-g95
> The nc-config scripts gives libraries as follows:
>
>
> $ ./nc-config --libs
> -L/usr/local/netcdf4-g95/lib -lnetcdf -lhdf5_hl -lhdf5 -lm -lz -lcurl
> $ ./nc-config --flibs
> -L/usr/local/netcdf4-g95/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lm -lz
> -lcurl
> But the hdf5 library location is not included in this list, so I have to
> specify "LDFLAGS=-L/usr/local/lib" every time I link, which I think you'll
> agree is a bit of a drag. (I edited the nc-config script instead.)
>
>
> Mark Hadfield "Kei puwaha te tai nei, Hoea tahi tatou"
> address@hidden
> NIWA
> Please consider the environment before printing this email.
>
> NIWA is the trading name of the National Institute of Water & Atmospheric
> Research Ltd.
>
Howdy Mark!
I have fixed this in the codebase, both in the main trunk and the 4.1.3 branch.
I am regenerating the snapshot release now - perhaps you could grab it and let
me know if it works for you now.
Thanks,
Ed
Ticket Details
===================
Ticket ID: LAW-256659
Department: Support netCDF
Priority: Normal
Status: Closed