libtool
[Top][All Lists]
Advanced

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

Re: predep_objects & postdep_objects with Intel 8.1


From: Ralf Wildenhues
Subject: Re: predep_objects & postdep_objects with Intel 8.1
Date: Fri, 17 Dec 2004 13:42:17 +0100
User-agent: Mutt/1.4.1i

[ slightly reordered ]

* Gary Kumfert wrote on Fri, Dec 17, 2004 at 12:17:17AM CET:
> On Thu, 16 Dec 2004, Gary Kumfert wrote:
> >
> > I'm tracking down an issue between Intel 8.1 and libtool 1.5.10.
> > It seems that libtool adds and crtbeginS.o crtendS.o files to
> > the link line for shared libraries... then icpc does the same..
> > then ld complains about multiply defined symbols!  Eeek!

Wait..

> > Shouldn't libtool (or libtool.m4) detect these object files
> > already appear in the link line and not add them directly?

hmm

> > Interestingly libtool (correctly) does not insert crtbeginS.o and
> > crtendS.o into shared library link lines with icc or ifort.
> > Why icpc?

hmm.  What does
$ ./libtool --config | grep with_gcc
say?

> > Here's some of the differences in what Intel 7.0, 8.0, and 8.1
> > pass to ld.  Note that the differences between 8.0 and 8.1 seem
> > to be significant!  In particular 8.1 seems to use GNU's crtbeginS.o and
> > crtendS.o.   7.0 & 8.0 seems to rely on intel's crtxi.o and crtxn.o files
> > instead.

I believe it's even more complicated than that.  It might also depend on
how ICC was installed -- whether to its provided or GNU libstdc++, and
whether the latter was found by ICC at installation time (maybe that's
what you are seeing).

I haven't had a chance to look how Libtool fares with all of this.
(BTW, multi-file interprocedural optimization and template libraries
provide more opportunity for failure, feel free to go wild if you have
time to look at this and cure possible problems.  :-)

> > I admit that I don't really understand what low-level linker trickery
> > these files accomplish.  (A pointer to some literature would be helpful.)

Runtime initialization and termination for the library/program given.
No, I can't give you a good answer on this, but there are bits of
information to be found in the gcc and ld manuals (info files), and
http://en.tldp.org/HOWTO/Program-Library-HOWTO/miscellaneous.html#INIT-AND-CLEANUP
http://docs.sun.com/app/docs/doc/817-1984/6mhm7pl17?a=view
and links therein are quite informative.  If you'd like to see how complicate
this stuff can get, browsing around
http://www.lnf.infn.it/computing/doc/aixcxx/html/complink/concepts/cushrlib.htm
is fun.

> I think I found the problem.  When I upgraded with libtoolize.
> "libtoolize -f -c" it copied things like config.guess, config.sub,
> and ltmain.sh correctly into my AC_CONFIG_AUX_DIR.
> 
> But, it did *not* update my libtool.m4 in AC_CONFIG_MACRO_DIR.
> After copying by hand, I saw that indeed the version of icpc is
> checked and different flags are selected.

Does that mean all your other problems above are gone now?
I haven't looked at them yet because of this statement.

> Wasn't libtoolize supposed to update the libtool.m4 file?

I'll leave this question for somebody else to answer.

Regards,
Ralf




reply via email to

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