libtool
[Top][All Lists]
Advanced

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

Re: Libtool can't find libgcc_s


From: Ethan Mallove
Subject: Re: Libtool can't find libgcc_s
Date: Wed, 10 Nov 2010 15:02:18 -0500
User-agent: Mutt/1.5.14 (2007-03-31)

On Wed, Nov/10/2010 07:59:38PM, Ralf Wildenhues wrote:
> Hello Ethan,
> 
> * address@hidden wrote on Wed, Nov 10, 2010 at 07:48:14PM CET:
> > Libtool seems to get confused about where libgcc_s is, e.g.,
> >   
> >   $ /bin/sh ../../../libtool --tag=CXX --mode=link icpc -lgcc_s foo.c -o 
> > a.out
> >   libtool: link: icpc foo.c -o a.out  -lgcc_s
> >   ld: skipping incompatible 
> > /usr/lib/gcc/x86_64-redhat-linux/3.4.6//libgcc_s.so when searching for 
> > -lgcc_s
> >   ld: cannot find -lgcc_s
> > 
> > If I help it out with my own -L, it works:
> > 
> >   $ /bin/sh ../../../libtool --tag=CXX --mode=link icpc 
> > -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/32 -lgcc_s foo.c -o a.out
> >   libtool: link: icpc foo.c -o a.out  
> > -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/32 -lgcc_s
> > 
> >   $ ../../../libtool --version
> >   ltmain.sh (GNU libtool) 2.2.6b
> 
> I think the first question to ask is why are you passing -lgcc_s in the
> first place?

I don't know.  Does libtoolize add -lgcc_s to postdeps?  The above is
a stripped down link line that happens when I build the Open MPI trunk
using Intel 11.0 compilers.

-Ethan

>
> The instance that decided that that would be necessary
> should also decide which libgcc_s to use, and whether to prepend
> suitable -L flags.
> 
> Aside, please pass -l flags after the objects that need the libraries,
> that is guaranteed to work portably, i.e., also for static linking.
> 
> Cheers,
> Ralf



reply via email to

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