libtool
[Top][All Lists]
Advanced

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

Re: Call for help: Solaris C++ and Sun CC


From: Tim Mooney
Subject: Re: Call for help: Solaris C++ and Sun CC
Date: Fri, 26 Aug 2005 16:30:58 -0500 (CDT)

In regard to: Re: Call for help: Solaris C++ and Sun CC, Ralf Wildenhues...:

These two threads contain the patches recently applied to fix the
failure with undefined symbols on Solaris with CC (Sun C++ compiler):

http://lists.gnu.org/archive/html/libtool-patches/2005-07/msg00088.html
http://lists.gnu.org/archive/html/libtool-patches/2005-08/msg00043.html

I've never (manually) created these links or the links for libiostream.

The system I tested on does not have above unversioned symlinks, and so
links against a libCstd.a with PIC objects.  Obviously, the libbaz.so
created by the 'tagdemo-shared tagdemo-make' tests then has half of
libCstd contained in it.  Having this huge lib is both uncomfortable and
dangerous: when you start linking against several C++ libraries, you can
end up with all sorts of very subtle problems.

Then I found this documentation.  Now I'm unsure whether we should guard
against this issue (I'd like to), but more importantly: I don't know how
we _can_ guard against it easily.

If I'm following that thread correctly, the original problem (needing
-lCstd -lCrun -lc for C++) is fixed with Peter's patch and your subsequent
fixups.  The new issue is that at least Cstd and probably Crun will be
linked statically if the admin hasn't added the symlinks in the
appropriate place.

While I agree in principle that it would be nice for libtool to help
people avoid shooting themselves in the foot, I think in this case it's
more important to document the danger than it is to completely mitigate
it.  I say this primarily because there might be quite a lot of work to
actually get libtool to protect the user.

A comment in the docs and likely also in the Solaris C++ section of the
code would be "good enough", I think, unless someone comes up with an easy
way to guard against the issue.

I suppose the test could be special-cased for Solaris, and ldd or some
other tool used after linking to verify that a library we're expecting
would show up on the list of NEEDED shared libraries, but that seems
like a lot of work.

Tim
--
Tim Mooney                              address@hidden
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164




reply via email to

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