On 04/15/2014 01:00 PM, M.Mahakur wrote:
Respected All,
I am trying to install netcdf-4.3.0 in Fedora-15.
But, I am not able to proceed ahead due to following errors. I configured as:
CPPFLAGS="-I/usr/local/hdf5/include/ -I/usr/local/hdf4/include/ -I/usr/local/inlude/
-I/usr/include/"
LDFLAGS="-L/usr/local/hdf5/lib -L/usr/local/hdf4/lib -L/usr/local/lib/
-L/usr/lib"
./configure --enable-hdf4 --enable-dap --prefix=/usr/local/netcdf4
======Errors=====
I make[2]: Leaving directory `/home/mahakur/SOFTWARES/netcdf-4.3.0/liblib'
Making all in ncgen3
make[2]: Entering directory `/home/mahakur/SOFTWARES/netcdf-4.3.0/ncgen3'
/bin/sh ../libtool --tag=CC --mode=link gcc -g -O2
-L/usr/local/hdf5/lib -L/usr/local/hdf4/lib -L/usr/local/lib/ -L/usr/lib
-oncgen3 main.o load.o escapes.o getfill.o init.o genlib.o ncgentab.o
../liblib/libnetcdf.la -lsz -lhdf5_hl -lhdf5 -lm -lz -lcurl
libtool: link: gcc -g -O2 -o .libs/ncgen3 main.o load.o escapes.o getfill.o
init.o
genlib.o ncgentab.o -L/usr/local/hdf5/lib -L/usr/local/hdf4/lib
-L/usr/local/lib/
-L/usr/lib ../liblib/.libs/libnetcdf.so /usr/local//lib/libsz.so
/usr/local/hdf5/lib/libhdf5_hl.so /usr/local/hdf5/lib/libhdf5.so -lm -lz
/usr/local/lib/libcurl.so -Wl,-rpath -Wl,/usr/local/netcdf4/lib
-Wl,-rpath -Wl,/usr/local//lib -Wl,-rpath -Wl,/usr/local/hdf5/lib -Wl,-rpath
-Wl,/usr/local/lib
../liblib/.libs/libnetcdf.so: undefined reference to `SDstart'
../liblib/.libs/libnetcdf.so: undefined reference to `SDend'
../liblib/.libs/libnetcdf.so: undefined reference to `SDattrinfo'
../liblib/.libs/libnetcdf.so: undefined reference to `SDfileinfo'
../liblib/.libs/libnetcdf.so: undefined reference to `SDreadattr'
../liblib/.libs/libnetcdf.so: undefined reference to `SDselect'
../liblib/.libs/libnetcdf.so: undefined reference to `SDreaddata'
../liblib/.libs/libnetcdf.so: undefined reference to `SDdiminfo'
../liblib/.libs/libnetcdf.so: undefined reference to `SDgetfillvalue'
../liblib/.libs/libnetcdf.so: undefined reference to `SDgetinfo'
../liblib/.libs/libnetcdf.so: undefined reference to `SDgetdimid'
collect2: ld returned 1 exit status
make[2]: *** [ncgen3] Error 1
make[2]: Leaving directory `/home/mahakur/SOFTWARES/netcdf-4.3.0/ncgen3'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mahakur/SOFTWARES/netcdf-4.3.0'
make: *** [all] Error 2
[mahakur@localhost netcdf-4.3.0]$
Thanking you.
With Regards,
Mahakur
IITM, Pune (India)
Hi M.Mahakur
As far as I can tell, the undefined references are HDF4 symbols.
Somehow configure doesn't seem to add the HDF4 libraries to the Makefile
(but does the right thing with HDF5).
Maybe it is a bug in the configure script?
You can check that the HDF4 libraries (not the directories)
are missing from your libtool command line above.
I had the same problem here before.
My fix was to add LIBS="-lmfhdf -ldf" to the configure environment.
You may need to do a 'make distclean' to start fresh.
I hope this helps,
Gus Correa