libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to ignore dependency_libs? (Was: Libtool adding libraries different


From: John R. Cary
Subject: How to ignore dependency_libs? (Was: Libtool adding libraries differently than needed with compiler wrappers)
Date: Thu, 28 Apr 2011 08:01:42 -0600 (MDT)

So I have more information on this problem.

At the link time, the executables here are linked to
some static libtool-built libs.  They are picking up
the dependency_libs variable in the associate .la file.

I can prevent this by removing the .la file after installation
of those dependency libraries.

Is there a way to tell libtool to ignore dependency_libs value
in the .la files of any libraries that are linked in?

Thx.....John Cary


On Fri, 22 Apr 2011, John R. Cary wrote:

We have a project using libtool on a Cray-XT4 using pathscale.
For compiling in parallel, we are supposed to use the compiler
wrapper, in this case ftn, that adds various libraries.  A particular
complexity is that one has to switch libraries between front and
back end nodes, and this is done with LD_LIBRARY_PATH.  We have
a problem, in that libtool seems to extract libraries from
the wrapper and put them at the end of the link line in a way
that the linker exits with an error.

System information
x86_64-unknown-linux-gnu
bash
ftn (wrapping pathf90)
-extend-source -byteswapio -fno-second-underscore -r8 -O2 -fno-second-underscore
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld
libtool (GNU libtool) 2.4
autoconf (GNU Autoconf) 2.68
automake (GNU automake) 1.11.1

The failure is

/bin/sh ../../libtool --tag=FC --tag=FC --mode=link ftn -I../../interfaces/wrap -I../../interfaces/src -I/project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r196-par/include -I/project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/include -I/opt/cray/hdf5-parallel/1.8.3.1/hdf5-parallel-pathscale/include -I/project/projectdirs/facets/franklin/contrib-path-3.2/fciowrappers-1.0.47-r114-par/include -extend-source -byteswapio -fno-second-underscore -r8 -O2 -fno-second-underscore -o runFlowShear runFlowShear.o libfmcfm.la -L/project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/lib/pathf -lglf23mpi -lmmm95 -lifspppl -lnclass -lkapisn -L/project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r196-par/lib/pathf -lGYRO -lNEO -lTGLF -L/project/projectdirs/facets/franklin/contrib-path-3.2/netlib_lite-1.0.12-r51-ser/lib -llsode -lnlother -lr8slatec -L/project/projectdirs/facets/franklin/contrib-path-3.2/fftw-2.1.5-ser/lib -lrfftw -lfftw /opt/acml/4.2.0/pathscale64/lib/libacml.a /opt/acml/4.2.0/pathscale64/lib/libacml.a /opt/acml/4.2.0/pathscale64/lib/libacml_mv.a -L/project/projectdirs/facets/franklin/contrib-path-3.2/fciowrappers-1.0.47-r114-par/lib -lezcdf -lvshdf5 -L/project/projectdirs/facets/franklin/contrib-path-3.2/netcdf-4.1.1-par/lib -lnetcdf -lnetcdf_c++ -L/opt/cray/hdf5-parallel/1.8.3.1/hdf5-parallel-pathscale/lib -lhdf5_fortran -lhdf5_hl -lhdf5 /global/common/franklin/usg/szip/2.1/lib/libsz.a -lz libtool: link: ftn -I../../interfaces/wrap -I../../interfaces/src -I/project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r196-par/include -I/project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/include -I/opt/cray/hdf5-parallel/1.8.3.1/hdf5-parallel-pathscale/include -I/project/projectdirs/facets/franklin/contrib-path-3.2/fciowrappers-1.0.47-r114-par/include -extend-source -byteswapio -fno-second-underscore -r8 -O2 -fno-second-underscore -o runFlowShear runFlowShear.o ./.libs/libfmcfm.a -L/project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/lib/pathf /project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/lib/pathf/libglf23mpi.a /project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/lib/pathf/libmmm95.a /project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/lib/pathf/libifspppl.a /project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/lib/pathf/libnclass.a /project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/lib/pathf/libkapisn.a -L/project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r196-par/lib/pathf /project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r196-par/lib/pathf/libGYRO.a /project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r196-par/lib/pathf/libNEO.a /project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r196-par/lib/pathf/libTGLF.a -L/project/projectdirs/facets/franklin/contrib-path-3.2/netlib_lite-1.0.12-r51-ser/lib /project/projectdirs/facets/franklin/contrib-path-3.2/netlib_lite-1.0.12-r51-ser/lib/liblsode.a /project/projectdirs/facets/franklin/contrib-path-3.2/netlib_lite-1.0.12-r51-ser/lib/libnlother.a /project/projectdirs/facets/franklin/contrib-path-3.2/netlib_lite-1.0.12-r51-ser/lib/libr8slatec.a -L/project/projectdirs/facets/franklin/contrib-path-3.2/fftw-2.1.5-ser/lib /project/projectdirs/facets/franklin/contrib-path-3.2/fftw-2.1.5-ser/lib/librfftw.a /project/projectdirs/facets/franklin/contrib-path-3.2/fftw-2.1.5-ser/lib/libfftw.a /opt/acml/4.2.0/pathscale64/lib/libacml.a /opt/acml/4.2.0/pathscale64/lib/libacml_mv.a -L/project/projectdirs/facets/franklin/contrib-path-3.2/fciowrappers-1.0.47-r114-par/lib /project/projectdirs/facets/franklin/contrib-path-3.2/fciowrappers-1.0.47-r114-par/lib/libezcdf.a /project/projectdirs/facets/franklin/contrib-path-3.2/fciowrappers-1.0.47-r114-par/lib/libvshdf5.a -L/project/projectdirs/facets/franklin/contrib-path-3.2/netcdf-4.1.1-par/lib /project/projectdirs/facets/franklin/contrib-path-3.2/netcdf-4.1.1-par/lib/libnetcdf_c++.a /project/projectdirs/facets/franklin/contrib-path-3.2/netcdf-4.1.1-par/lib/libnetcdf.a /opt/fftw/3.2.2.1/lib/libfftw3.so /opt/fftw/3.2.2.1/lib/libfftw3f.so /opt/cray/pmi/1.0-1.0000.7901.22.1.ss/lib64/libpmi.so -lpthread -ldl /usr/lib64/gcc/x86_64-suse-linux/4.1.2/libstdc++.so -lm -lc -lgcc_s -L/opt/cray/hdf5-parallel/1.8.3.1/hdf5-parallel-pathscale/lib -lhdf5_fortran -lhdf5_hl -lhdf5 /global/common/franklin/usg/szip/2.1/lib/libsz.a -lz -pthread -Wl,-rpath -Wl,/opt/fftw/3.2.2.1/lib -Wl,-rpath -Wl,/opt/cray/pmi/1.0-1.0000.7901.22.1.ss/lib64 -Wl,-rpath -Wl,/usr/lib64/gcc/x86_64-suse-linux/4.1.2 -Wl,-rpath -Wl,/opt/fftw/3.2.2.1/lib -Wl,-rpath -Wl,/opt/cray/pmi/1.0-1.0000.7901.22.1.ss/lib64 -Wl,-rpath -Wl,/usr/lib64/gcc/x86_64-suse-linux/4.1.2 /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: attempted static link of dynamic object `/opt/fftw/3.2.2.1/lib/libfftw3.so'
collect2: ld returned 1 exit status


So one sees that libtool put /opt/fftw/3.2.2.1/lib/libfftw3.so at the end of
the link line when there was no need.  To get this to work, I remove any
.so files with full path:
/opt/fftw/3.2.2.1/lib/libfftw3.so /opt/fftw/3.2.2.1/lib/libfftw3f.so
  /opt/cray/pmi/1.0-1.0000.7901.22.1.ss/lib64/libpmi.so
  /usr/lib64/gcc/x86_64-suse-linux/4.1.2/libstdc++.so

and

 -lgcc_s

from the link line and run it by hand.  Then it works.  (See below):

So is there a way to tell libtool not to add any of these libraries
to the link line?

Thx...John Cary

Working link:

$ ftn -I../../interfaces/wrap -I../../interfaces/src -I/project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r196-par/include -I/project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/include -I/opt/cray/hdf5-parallel/1.8.3.1/hdf5-parallel-pathscale/include -I/project/projectdirs/facets/franklin/contrib-path-3.2/fciowrappers-1.0.47-r114-par/include -extend-source -byteswapio -fno-second-underscore -r8 -O2 -fno-second-underscore -o runFlowShear runFlowShear.o ./.libs/libfmcfm.a -L/project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/lib/pathf /project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/lib/pathf/libglf23mpi.a /project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/lib/pathf/libmmm95.a /project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/lib/pathf/libifspppl.a /project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/lib/pathf/libnclass.a /project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-r1341-par/lib/pathf/libkapisn.a -L/project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r196-par/lib/pathf /project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r196-par/lib/pathf/libGYRO.a /project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r196-par/lib/pathf/libNEO.a /project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r196-par/lib/pathf/libTGLF.a -L/project/projectdirs/facets/franklin/contrib-path-3.2/netlib_lite-1.0.12-r51-ser/lib /project/projectdirs/facets/franklin/contrib-path-3.2/netlib_lite-1.0.12-r51-ser/lib/liblsode.a /project/projectdirs/facets/franklin/contrib-path-3.2/netlib_lite-1.0.12-r51-ser/lib/libnlother.a /project/projectdirs/facets/franklin/contrib-path-3.2/netlib_lite-1.0.12-r51-ser/lib/libr8slatec.a -L/project/projectdirs/facets/franklin/contrib-path-3.2/fftw-2.1.5-ser/lib /project/projectdirs/facets/franklin/contrib-path-3.2/fftw-2.1.5-ser/lib/librfftw.a /project/projectdirs/facets/franklin/contrib-path-3.2/fftw-2.1.5-ser/lib/libfftw.a /opt/acml/4.2.0/pathscale64/lib/libacml.a /opt/acml/4.2.0/pathscale64/lib/libacml_mv.a -L/project/projectdirs/facets/franklin/contrib-path-3.2/fciowrappers-1.0.47-r114-par/lib /project/projectdirs/facets/franklin/contrib-path-3.2/fciowrappers-1.0.47-r114-par/lib/libezcdf.a /project/projectdirs/facets/franklin/contrib-path-3.2/fciowrappers-1.0.47-r114-par/lib/libvshdf5.a -L/project/projectdirs/facets/franklin/contrib-path-3.2/netcdf-4.1.1-par/lib /project/projectdirs/facets/franklin/contrib-path-3.2/netcdf-4.1.1-par/lib/libnetcdf_c++.a /project/projectdirs/facets/franklin/contrib-path-3.2/netcdf-4.1.1-par/lib/libnetcdf.a -lpthread -ldl -lm -lc -L/opt/cray/hdf5-parallel/1.8.3.1/hdf5-parallel-pathscale/lib -lhdf5_fortran -lhdf5_hl -lhdf5 /global/common/franklin/usg/szip/2.1/lib/libsz.a -lz -pthread -Wl,-rpath -Wl,/opt/cray/pmi/1.0-1.0000.7901.22.1.ss/lib64 -Wl,-rpath -Wl,/usr/lib64/gcc/x86_64-suse-linux/4.1.2 -Wl,-rpath -Wl,/opt/cray/pmi/1.0-1.0000.7901.22.1.ss/lib64 -Wl,-rpath -Wl,/usr/lib64/gcc/x86_64-suse-linux/4.1.2
$




--
Tech-X Corp., 5621 Arapahoe Ave, Suite A, Boulder CO 80303
address@hidden, p 303-448-0727, f 303-448-7756



reply via email to

[Prev in Thread] Current Thread [Next in Thread]