[MOAB-dev] Redundant -L/usr/lib causing problems

Jason Kraftcheck kraftche at cae.wisc.edu
Wed Feb 24 09:37:59 CST 2010


Your configure line was:

../configure --prefix=/home/jed/usr/ --enable-debug --enable-shared \
 --enable-mbconvert --enable-mbsize --enable-mbtagprop --enable-mbzoltan \
 --enable-imesh=nofortran --with-hdf5=/usr --with-zoltan=/usr \
 --with-parmetis=/usr --with-netcdf=/usr --with-mpi=/usr \
 CC=mpicc CXX=mpicxx F77= FC= QTDIR=/opt/qt

If you don't want /usr/lib to be in the list if link paths, then don't
specify default system directories to the configure arguments.  If the HDF5
and NetCDF libraries are in default search locations, you shouldn't need to
specify any option for them.  The configure script will automatically find
and use them.

-jason




Jed Brown wrote:
> Making all in perf
> make[3]: Entering directory `/home/jed/build/moab/bompi/test/perf'
> /bin/sh ../../libtool --tag=CXX   --mode=link mpicxx  -Wall -pipe -g -L/usr/lib     -L/usr/lib -L/usr/lib   -L/usr/lib -o point_in_elem point_in_elem.o ../../libMOAB.la -lm
> libtool: link: mpicxx -Wall -pipe -g -o .libs/point_in_elem point_in_elem.o  -L/usr/lib ../../.libs/libMOAB.so -lnetcdf_c++ -lnetcdf -lhdf5 /usr/lib/openmpi/libmpi_cxx.so /usr/lib/openmpi/libmpi.so /usr/lib/openmpi/libopen-rte.so /usr/lib/openmpi/libopen-pal.so -ldl -lnsl -lutil -lm -pthread -Wl,-rpath -Wl,/home/jed/usr/lib
> ../../.libs/libMOAB.so: undefined reference to `std::_List_node_base::_M_unhook()'
> ../../.libs/libMOAB.so: undefined reference to `std::_List_node_base::_M_hook(std::_List_node_base*)'
> ../../.libs/libMOAB.so: undefined reference to `std::_List_node_base::_M_transfer(std::_List_node_base*, std::_List_node_base*)'
> collect2: ld returned 1 exit status
> make[3]: *** [point_in_elem] Error 1
> make[3]: Leaving directory `/home/jed/build/moab/bompi/test/perf'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/home/jed/build/moab/bompi/test'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/jed/build/moab/bompi'
> make: *** [all] Error 2
> 
> 
> Links fine if I eliminate the explicit -L/usr/lib.  So libMOAB.so was
> linked incorrectly to
> 
>   /usr/lib/libstdc++.so.6.0.13
> 
> (goes with gcc-4.4.3) instead of
> 
>   /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/libstdc++.so.6.0.14
> 
> (goes with gcc-4.5.0, the compiler I'm actually using here).  This is
> another example of why it's bad to explicitly link system paths.
> 
> config.log attached
> 
> Jed


-- 
"A foolish consistency is the hobgoblin of little minds" - Ralph Waldo Emerson



More information about the moab-dev mailing list