-
Notifications
You must be signed in to change notification settings - Fork 301
Description
We have some folks trying to use the libmesh-generated libtool script to link Fortran libraries and executables on Linux. It may be the first time someone has tried this (?) and therefore we've never noticed the issue before, but I think I've tracked it down to the "postdeps" line in the "FC" section of $LIBMESH_DIR/contrib/bin/libtool, which I've pasted below.
postdeps="-L/opt/packages/mpich/mpich-3.0.2/gcc-opt/lib -lmpichf90
-lmpich -lopa -lmpl -lrt -lpthread -l -l
-L/opt/packages/mpich/mpich-3.0.2/gcc-opt/lib
-L/usr/lib/gcc/x86_64-linux-gnu/4.6
-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib
-L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu
-L/usr/lib/../lib
-L/opt/packages/tbb/lib/intel64/cc4.1.0_libc2.4_kernel2.6.16.21
-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lmpichf90 -lmpich -lopa
-lmpl -lrt -lpthread -lgfortran -lm -lgcc_s -lquadmath -lm -lgcc_s -lc
-lgcc_s"
As you can see, there are two naked "-l" flags in this variable, and whenever libtool tries to use it to link a Fortran shared library, it obviously fails.
Unfortunately I don't know where to go from here in debugging the problem... note that it doesn't seem to affect Macs: the postdeps line is just blank for that OS. Also, if I hand edit the libtool script file and remove those -l's things seem to work fine.