libtool
[Top][All Lists]
Advanced

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

Re: Unwanted shared runtime libraries getting added


From: Robert Boehne
Subject: Re: Unwanted shared runtime libraries getting added
Date: Fri, 8 Oct 2010 14:24:26 -0500

I think the mode=compile line doesn't tell us much about what happens when mode=link - post what you get on the "libtool --mode=link" command.

On Fri, Oct 8, 2010 at 1:22 PM, Ethan Mallove <address@hidden> wrote:
On Fri, Oct/08/2010 07:50:39PM, Ralf Wildenhues wrote:
> * Ethan Mallove wrote on Fri, Oct 08, 2010 at 07:26:45PM CEST:
> > On Fri, Oct/08/2010 07:14:18PM, Ralf Wildenhues wrote:
> > > * Ethan Mallove wrote on Fri, Oct 08, 2010 at 02:42:53PM CEST:
> > > > I'm trying to create a library which has no shared library
> > > > dependencies using the Intel compilers, but it appears Libtool might
> > > > be automatically adding in some -lfoo flags that are forcing the
> > > > issue.  How can I tell Libtool to not add the -lfoo flags?
> > >
> > > Which libraries are added?
> >
> > libimf and friends.
> > >
> > > Which of those would you like to avoid?
> >
> > If possible, all of the Intel runtime libraries (e.g., libimf,
> > libsvml, libintlc).
>
> > > libtool normally adds all direct and indirect library dependencies
> > > (the latter only when link_all_deplibs is true, which it currently is
> > > everywhere except in the Debian-modified libtool), as well as compiler
> > > support libraries.  The indirect deplibs is an obvious issue for at
> > > least distributors, the rest is usually the right thing to do.
> > >
> >
> > So if I set "link_all_deplibs" to "false", will that turn off the
> > "-limf -lsvml ..." we're seeing in the link line?
>
> Nope.
>
> Does running the link command with --tag=CC "fix" that, i.e., avoid the
> libraries for you?

I still get the libs that I don't want.  To ensure I did what you
asked:

$ /bin/sh ../../../libtool --tag=CC --mode=compile icpc -DHAVE_CONFIG_H -I. -I../../../opal/include -I../../../orte/include -I../../../ompi/include -I../../../opal/mca/paffinity/linux/plpa/src/libplpa -DOMPI_BUILDING_CXX_BINDINGS_LIBRARY=1 -DOMPI_SKIP_MPICXX=1 -I../../.. -O3 -DNDEBUG -Wall -static-intel -m64 -finline-functions -fexceptions -pthread -MT comm.lo -MD -MP -MF \$depbase.Tpo -c -o comm.lo comm.cc
libtool: compile:  icpc -DHAVE_CONFIG_H -I. -I../../../opal/include -I../../../orte/include -I../../../ompi/include -I../../../opal/mca/paffinity/linux/plpa/src/libplpa -DOMPI_BUILDING_CXX_BINDINGS_LIBRARY=1 -DOMPI_SKIP_MPICXX=1 -I../../.. -O3 -DNDEBUG -Wall -static-intel -m64 -finline-functions -fexceptions -pthread -MT comm.lo -MD -MP -MF \$depbase.Tpo -c comm.cc  -fPIC -DPIC -o .libs/comm.o
...
$ ldd .libs/libmpi_cxx.so
       libmpi.so.0 => not found
       libnsl.so.1 => /lib64/libnsl.so.1 (0x00002af01713f000)
       libutil.so.1 => /lib64/libutil.so.1 (0x00002af017358000)
       libimf.so => not found
       libsvml.so => not found
       libm.so.6 => /lib64/libm.so.6 (0x00002af01755c000)
       libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002af0177df000)
       libirc.so => not found
       libpthread.so.0 => /lib64/libpthread.so.0 (0x00002af017ae0000)
       libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002af017cfb000)
       libdl.so.2 => /lib64/libdl.so.2 (0x00002af017f09000)
       libc.so.6 => /lib64/libc.so.6 (0x00002af01810e000)
       /lib64/ld-linux-x86-64.so.2 (0x0000003fb7000000)
       libintlc.so.5 => not found

Thanks,
Ethan

>
> Maybe we should just make postdeps et al overridable with a cache
> variable.
>
> Thanks,
> Ralf

_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool


reply via email to

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