Hi Albert, Tim, * Albert Chin wrote on Tue, Aug 23, 2005 at 05:07:24AM CEST: > On Sun, Aug 21, 2005 at 03:46:13PM +0200, Ralf Wildenhues wrote: > > We have this compiler on a Solaris 2.6 system and none of > /opt/SUNWSpro/lib/libCstd.so, /opt/SUNWSpro/lib/v8plus/libCstd.so, and > /opt/SUNWSpro/lib/v9/libCstd.so exist. There is no libCstd.so anywhere > in /opt/SUNWspro/lib.
OK, good. The system I can test on has just updated to 5.6, too, so that issue is gone.. :) > Unfortunately, we don't have CC v5.4 to test against. However, > everything about 5.5 works with the patch. I say we gamble and ignore > everything below CC v5.4 for this patch. OK. * Tim Mooney wrote on Fri, Aug 26, 2005 at 11:30:58PM CEST: > > 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. ACK, at least this is my understanding of the issue. > 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. How about this? Cheers, Ralf * README, libtool.m4 [ solaris CC ]: Document issue with C++ standard libraries. Index: README =================================================================== RCS file: /cvsroot/libtool/libtool/README,v retrieving revision 1.17.2.3 diff -u -r1.17.2.3 README --- README 25 Apr 2005 18:13:26 -0000 1.17.2.3 +++ README 28 Aug 2005 20:56:54 -0000 @@ -122,3 +122,8 @@ 9) Note that newer Sun Studio Fortran compilers might need Autoconf macros not yet present in 2.59 but only in CVS Autoconf. + +10) Note that Sun C++ compiler versions before 5.6 may need some special +setup to link properly against shared versions of the C++ standard libraries. +See http://lists.gnu.org/archive/html/libtool/2005-08/msg00088.html for +more information. Index: libtool.m4 =================================================================== RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v retrieving revision 1.314.2.101 diff -u -r1.314.2.101 libtool.m4 --- libtool.m4 18 Aug 2005 06:56:19 -0000 1.314.2.101 +++ libtool.m4 28 Aug 2005 20:56:57 -0000 @@ -3749,6 +3749,9 @@ solaris*) case $cc_basename in CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' ;; esac