From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14790 invoked by alias); 20 Mar 2011 09:27:24 -0000 Received: (qmail 14781 invoked by uid 22791); 20 Mar 2011 09:27:23 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_IB X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 20 Mar 2011 09:27:18 +0000 From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/44107] libstdc++ (dylib) is built with an erroneous dependency towards /usr/lib X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iains at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.1 X-Bugzilla-Changed-Fields: Target Milestone Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 20 Mar 2011 14:50:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-03/txt/msg02144.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44107 Iain Sandoe changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.6.1 --- Comment #8 from Iain Sandoe 2011-03-20 09:27:15 UTC --- (In reply to comment #7) > 1) In no configuration the bootstrap fails (as long as you take care of PR45381 > and PR47016). PR45381 has been fixed in trunk and on the branch - I guess it will be fixed in the release (I think there's another RC coming). As already commented in PR47016, this is a tool problem, not a gcc bug (but, since I doubt any tool fixes will be forthcoming for darwin < 11, we will endeavor to solve it somehow ;-) - patches welcome... ) > 2) Indeed, the DYLD_LIBRARY_PATH that makes things to work properly is > DYLD_LIBRARY_PATH=$(prefix)/lib If everything is linked correctly with proper rpaths, and the products are installed - there should be no need for a DYLD_LIBRARY_PATH - it should only be necessary for uninstalled testing. > 3) I have built with the patch attached in #4 (together with the addition > included in #5), it seems > to work properly now (see configuration 'y' below). > > 4) I have now 3 configurations (all with 4.6.0 RC 20110314) > - 4.6.x: built with my modification (the change in t-slibgcc-darwin) > - 4.6.y: built with the 2 patches from yesterday > - 4.6.z: no change from the distribution > I have also built the Xerces-C library 3 times, xerces-c-3.1.1x, > xerces-c-3.1.1y and > xerces-c3.1.1.z. > The libxerces-c-3.1.dylib contains (iaw otool -L) a dependency towards > /usr/lib/libgcc_s.1.dylib > in the cases 'y' and 'z'. The libxerces-c-3.1.dylib contains a dependency > towards /usr/lib/libSystem.B.dylib in the three configurations. My C++ program > links with this library. > > The sets 'x' and 'y' work properly. Hm, configuration 'x' is actually generically incorrect - it will _only_ work providing you don't link with any library that is already linked with the unwinder in /usr/lib/libgcc_s.1.dylib. This is because there can only be _one_ unwinder - the whole program must use the same one. Some stand-alone programs are unaffected (including the gcc test-suite), but - anything that uses stuff from gcc together with system frameworks is almost certainly doomed... set 'y' is correct (IMO) - and if the products are installed should work without a DYLD_LIBRARY_PATH - assuming that everything has its correct paths... The set 'z' does not work (stuck between > throw and catch, CPU running). that, to me, confirms that the bug is in our emitting unwind that is incompatible with the darwin 9 unwinder (a known issue, but without a specific bug - it has been treated as part of PR41991 to date). I don't know when (or if) the patch will make it into gcc - but surely not for 4.6.0 it's too intrusive and the time has gone - for now, a local patch is required - although it might be that fink/macports would decide to apply this too. hint: "DYLD_PRINT_LIBRARIES=1 ./myexe " is really useful for making sure that the libraries you think should be used actually are ;-) thanks for testing!!