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.
I'm trying to build netcdf with a newer version of gcc then the system version. So I have the new gcc in my path as well as in the LD_LIBRARY_PATH. I get a ld: cannot find error, yet its not that the path is incorrect, its been mangled by the addition of a '-l' /bin/sh ../libtool --tag=FC --mode=link mpif90 -g -O2 -version-number 5:1:0 -L/share/apps/hdf5/1.8.7-gcc-4.6.1/lib -o libnetcdff.la -rpath /share/apps/netcdf/4.1.3-gcc-4.6.1/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: 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,/root/workspace/gnu/netcdf-4.1.3/liblib/.libs -Wl,-rpath -Wl,/share/apps/openmpi/1.4.3-gcc-4.6.1/lib -Wl,-rpath -Wl,/share/apps/gcc/4.6.1/lib/../lib64 -Wl,-rpath -Wl,/share/apps/netcdf/4.1.3-gcc-4.6.1/lib -Wl,-rpath -Wl,/share/apps/openmpi/1.4.3-gcc-4.6.1/lib -Wl,-rpath -Wl,/share/apps/gcc/4.6.1/lib/../lib64 -L/share/apps/hdf5/1.8.7-gcc-4.6.1/lib ../liblib/.libs/libnetcdf.so /share/apps/hdf5/1.8.7-gcc-4.6.1/lib/libhdf5_hl.a /share/apps/hdf5/1.8.7-gcc-4.6.1/lib/libhdf5.a -lz -lcurl -L/share/apps/openmpi/1.4.3-gcc-4.6.1/lib -l -L/share/apps/gcc/4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1 -L/share/apps/gcc/4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/share/apps/gcc/4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../.. /share/apps/openmpi/1.4.3-gcc-4.6.1/lib/libmpi_f90.so /share/apps/openmpi/1.4.3-gcc-4.6.1/lib/libmpi_f77.so /share/apps/openmpi/1.4.3-gcc-4.6.1/lib/libmpi.so /share/apps/openmpi/1.4.3-gcc-4.6.1/lib/libopen-rte.so /share/apps/openmpi/1.4.3-gcc-4.6.1/lib/libopen-pal.so -lnsl -lutil -ldl /share/apps/gcc/4.6.1/lib/../lib64/libgfortran.so -L/share/apps/gcc/4.6.1/lib/../lib64 /share/apps/gcc/4.6.1/lib/../lib64/libquadmath.so -lm -lpthread -lc -lgcc_s -O2 -pthread -Wl,-soname -Wl,libnetcdff.so.5 -o .libs/libnetcdff.so.5.1.0 /usr/bin/ld: cannot find -l-L/share/apps/gcc/4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1 collect2: ld returned 1 exit status Its adding '-l' and thus the next entry gets joined with that and ld is unable to understand it. My gut feeling is the libtool script is doing something. It may have ment to have something attached to '-l' but is blank and thus this mess. Any ideas? David -- Personally, I liked the university. They gave us money and facilities, we didn't have to produce anything! You've never been out of college! You don't know what it's like out there! I've worked in the private sector. They expect results. -Ray Ghostbusters
netcdfgroup
archives: