NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
HiI had the same problem a few days ago. A quick fix was to simply search for the string "-l -l" in the libtool file generated after running ./configure, and remove it. After saving the file, I was able to proceed with make and install.
Regards, Even Haug On 11/07/2011 12:00 PM, Traian Popeea wrote:
Hello, I have been trying for several days to compile the netcdf-4 library with parallel support through hdf5 and mpich2. I do not have root credentials on the system where I must install the library. I am using mpich2-1.4.1p1, zlib-1.2.5, hdf5-1.8.7 and netcdf-4.1.3 and I require both C and Fortran for netcdf. Mpich2, zlib and hdf5 pass make check and install properly. However, netcdf-4 fails at make with a libtool error, where an extra "-l" appears "out of the blue". The following are the configure scripts that I am using, and the error that I am receiving. I sincerely have no idea why this isn't working and any help is most welcome. Sincerely, Traian Popeea PATH: [traian.popeea@fep-53-1 ~]$ echo $PATH /opt/gnu-gcc/gcc-4.6.0/bin:/opt/tools/qt/qt4.7/bin:/opt/tools/qt/pyqt4.8/bin:/bin:/srv/ncit-cluster/scripts:/usr/kerberos/bin:/opt/n1sge6/sge-6.2u5/bin/lx24-amd64:/usr/local/bin:/bin:/usr/bin:/export/home/ncit-cluster/stud/t/traian.popeea/bin LD_LIBRARY_PATH [traian.popeea@fep-53-1 ~]$ echo $LD_LIBRARY_PATH /opt/gnu-gcc/gcc-4.6.0/lib64:/opt/gnu-gcc/gcc-4.6.0/lib:/opt/libs/gmp-5.0.2/lib:/opt/libs/mpc-0.9/lib:/opt/libs/mpfr-3.0.1/lib:/opt/tools/qt/qt4.7/lib:/opt/n1sge6/sge-6.2u5/lib/lx24-amd64 mpich configure script [traian.popeea@fep-53-1 ~]$ cat hw1/mpich2-1.4.1p1/mpiv3.sh #!/bin/bash export FFLAGS=-fPIC export CFLAGS=-fPIC export FC=gfortran export F77=gfortran ./configure --prefix=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi --enable-fc --enable-f77 zlib configure script [traian.popeea@fep-53-1 ~]$ cat hw1/zlib-1.2.5/zlib.sh #!/bin/bash export CC=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/bin/mpicc export F9X=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/bin/mpif90 export FC=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/bin/mpif77 export CFLAGS=-fPIC export FFLAGS=-fPIC export LDFLAGS=-L/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/lib export CPPFLAGS=-I/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/include export FCFLAGS=-I/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/include export PATH=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/bin:$PATH export LD_LIBRARY_PATH=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/lib:$LD_LIBRARY_PATH ./configure --prefix=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi hdf configure script [traian.popeea@fep-53-1 ~]$ cat hw1/hdf5-1.8.7/hdfv3.sh #!/bin/bash export CC=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/bin/mpicc export F9X=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/bin/mpif90 export FC=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/bin/mpif77 export CFLAGS=-fPIC export FFLAGS=-fPIC export LDFLAGS=-L/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/lib export CPPFLAGS=-I/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/include export FCFLAGS=-I/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/include export PATH=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/bin:$PATH export LD_LIBRARY_PATH=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/lib:$LD_LIBRARY_PATH ./configure --prefix=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi --disable-cxx --enable-fortran --enable-parallel --with-zlib=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/include,/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/lib netcdf configure script [traian.popeea@fep-53-1 ~]$ cat hw1/netcdf-4.1.3/netcdfv3.sh #!/bin/bash export CC=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/bin/mpicc export F77=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/bin/mpif77 export FC=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/bin/mpif90 export LDFLAGS="-L/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/lib -lmpich" export CPPFLAGS=-I/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/include export CFLAGS=-fPIC export FCFLAGS=-I/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/include export FFLAGS=-fPIC export PATH=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/bin:$PATH export LD_LIBRARY_PATH=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/lib:$LD_LIBRARY_PATH ./configure --prefix=/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi --disable-cxx The error [traian.popeea@fep-53-1 netcdf-4.1.3]$ make <snip> make[3]: Entering directory `/export/home/ncit-cluster/stud/t/traian.popeea/hw1/netcdf-4.1.3/fortran' /bin/sh ../libtool --tag=FC --mode=link /export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/bin/mpif90 -I/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/include -version-number 5:1:0 -L/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/lib -lmpich -o libnetcdff.la -rpath /export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/lib fort-attio.lo fort-control.lo fort-dim.lo fort-genatt.lo fort-geninq.lo fort-genvar.lo fort-lib.lo fort-misc.lo fort-v2compat.lo fort-vario.lo fort-var1io.lo fort-varaio.lo fort-varmio.lo fort-varsio.lo fort-nc4.lo ../liblib/libnetcdf.la ../f90/libnetcdff90.la -lhdf5_hl -lhdf5 -lm -lcurl libtool: link: /export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/bin/mpif90 -shared -fPIC .libs/fort-attio.o .libs/fort-control.o .libs/fort-dim.o .libs/fort-genatt.o .libs/fort-geninq.o .libs/fort-genvar.o .libs/fort-lib.o .libs/fort-misc.o .libs/fort-v2compat.o .libs/fort-vario.o .libs/fort-var1io.o .libs/fort-varaio.o .libs/fort-varmio.o .libs/fort-varsio.o .libs/fort-nc4.o -Wl,--whole-archive ../f90/.libs/libnetcdff90.a -Wl,--no-whole-archive -Wl,-rpath -Wl,/export/home/ncit-cluster/stud/t/traian.popeea/hw1/netcdf-4.1.3/liblib/.libs -Wl,-rpath -Wl,/opt/gnu-gcc/gcc-4.6.0/lib/../lib64 -Wl,-rpath -Wl,/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/lib -Wl,-rpath -Wl,/opt/gnu-gcc/gcc-4.6.0/lib/../lib64 -L/export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/lib ../liblib/.libs/libnetcdf.so /export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/lib/libhdf5_hl.a /export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/lib/libhdf5.a -lz -lcurl -l -L/opt/gnu-gcc/gcc-4.6.0/lib64/../lib64 -L/opt/gnu-gcc/gcc-4.6.0/lib/../lib64 -L/opt/gnu-gcc/gcc-4.6.0/lib/gcc/x86_64-unknown-linux-gnu/4.6.0 -L/opt/gnu-gcc/gcc-4.6.0/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/opt/gnu-gcc/gcc-4.6.0/lib64 -L/opt/gnu-gcc/gcc-4.6.0/lib -L/opt/libs/gmp-5.0.2/lib -L/opt/libs/mpc-0.9/lib -L/opt/libs/mpfr-3.0.1/lib -L/opt/libs/openmpi/openmpi-1.5.3_gcc-4.6.0/lib -L/opt/libs/openmpi/openmpi-1.5.3_gcc-4.6.0/lib/openmpi -L/opt/gnu-gcc/gcc-4.6.0/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../.. -lmpichf90 -lmpich /export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/lib/libopa.a /export/home/ncit-cluster/stud/t/traian.popeea/opt/netcdf-4_mpi/lib/libmpl.a -lrt -lpthread /opt/gnu-gcc/gcc-4.6.0/lib/../lib64/libgfortran.so /opt/gnu-gcc/gcc-4.6.0/lib/../lib64/libquadmath.so -lm -lc -lgcc_s -Wl,-soname -Wl,libnetcdff.so.5 -o .libs/libnetcdff.so.5.1.0 /usr/bin/ld: cannot find -l-L/opt/gnu-gcc/gcc-4.6.0/lib64/../lib64 collect2: ld returned 1 exit status make[3]: *** [libnetcdff.la] Error 1 make[3]: Leaving directory `/export/home/ncit-cluster/stud/t/traian.popeea/hw1/netcdf-4.1.3/fortran' make[2]: *** [all] Error 2 make[2]: Leaving directory `/export/home/ncit-cluster/stud/t/traian.popeea/hw1/netcdf-4.1.3/fortran' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/export/home/ncit-cluster/stud/t/traian.popeea/hw1/netcdf-4.1.3' make: *** [all] Error 2 [traian.popeea@fep-53-1 netcdf-4.1.3]$ _______________________________________________ netcdfgroup mailing list netcdfgroup@xxxxxxxxxxxxxxxx For list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/
netcdfgroup
archives: