Respected Correa and All,
Thank you Dr. Correa, I tried your suggestions to add option LIBS="-lmfhdf
-ldf" after doing 'make distclean', the previous errors disappeared but some
new errors "multiple defination" as below:
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 -o ncgen3 main.o load.o
escapes.o getfill.o init.o genlib.o ncgentab.o ../liblib/libnetcdf.la -lsz
-lhdf5_hl -lhdf5 -lm -lz -lcurl -lmfhdf -ldf
libtool: link: gcc -g -O2 -o 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.a -L/usr/local//lib
/usr/local/hdf5/lib/libhdf5_hl.so /usr/local/hdf5/lib/libhdf5.so
/usr/local//lib/libsz.so -ldl -lm /usr/local/lib/libcurl.so -llber -lldap -lrt
-lssl -lcrypto /usr/local/hdf4/lib/libmfhdf.a /usr/local/hdf4/lib/libdf.a
-ljpeg -lz -Wl,-rpath -Wl,/usr/local//lib -Wl,-rpath -Wl,/usr/local/hdf5/lib
-Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local//lib -Wl,-rpath
-Wl,/usr/local/hdf5/lib -Wl,-rpath -Wl,/usr/local/lib
/usr/local/hdf4/lib/libmfhdf.a(var.o): In function `NC_var_shape':
var.c:(.text+0x1b0): multiple definition of `NC_var_shape'
../liblib/.libs/libnetcdf.a(libnetcdf3_la-var.o):/home/mahakur/SOFTWARES/netcdf-4.3.0/libsrc/var.c:395:
first defined here
/usr/local/hdf4/lib/libmfhdf.a(array.o): In function `nctypelen':
array.c:(.text+0xf0): multiple definition of `nctypelen'
../liblib/.libs/libnetcdf.a(libdispatch_la-dvar.o):/home/mahakur/SOFTWARES/netcdf-4.3.0/libdispatch/dvar.c:330:
first defined here
/usr/local/hdf4/lib/libmfhdf.a(attr.o): In function `NC_findattr':
attr.c:(.text+0x560): multiple definition of `NC_findattr'
../liblib/.libs/libnetcdf.a(libnetcdf3_la-attr.o):/home/mahakur/SOFTWARES/netcdf-4.3.0/libsrc/attr.c:327:
first defined here
/usr/local/hdf4/lib/libmfhdf.a(file.o): In function `NC_check_id':
file.c:(.text+0x450): multiple definition of `NC_check_id'
../liblib/.libs/libnetcdf.a(libdispatch_la-nc.o):/home/mahakur/SOFTWARES/netcdf-4.3.0/libdispatch/nc.c:32:
first defined here
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]$
How to overcome this, please suggest.
With Regards and Thanks,
Mahakur
----- Original Message -----
From: Gus Correa <gus@xxxxxxxxxxxxxxxxx>
To: netcdfgroup@xxxxxxxxxxxxxxxx
Sent: Tue, 15 Apr 2014 23:07:08 +0530 (IST)
Subject: Re: [netcdfgroup] Installation prolem-fc15
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
_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit:
http://www.unidata.ucar.edu/mailing_lists/
--
M. Mahakur
INDIAN INSTITUTE OF TROPICAL METEOROLOGY
(Ministry of Earth Sciences, Govt. of India)
Dr. Homi Bhabha Road, NCL Post, Pashan
PUNE - 411 008 (INDIA)