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

Jed Brown jed at 59A2.org
Wed Feb 24 02:37:05 CST 2010


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: application/octet-stream
Size: 86258 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20100224/848ebdf8/attachment-0001.obj>


More information about the moab-dev mailing list