public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "iains at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/44107] libstdc++ (dylib) is built with an erroneous dependency towards /usr/lib
Date: Sun, 20 Mar 2011 14:50:00 -0000	[thread overview]
Message-ID: <bug-44107-4-DByjck7Huw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-44107-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44107

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.1

--- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> 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!!


  parent reply	other threads:[~2011-03-20  9:27 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-44107-4@http.gcc.gnu.org/bugzilla/>
2011-03-19 11:42 ` Denis.Excoffier at airbus dot com
2011-03-19 11:42 ` mikestump at comcast dot net
2011-03-19 15:03 ` iains at gcc dot gnu.org
2011-03-19 15:13 ` iains at gcc dot gnu.org
2011-03-19 23:26 ` howarth at nitro dot med.uc.edu
2011-03-20 12:43 ` Denis.Excoffier at airbus dot com
2011-03-20 14:50 ` iains at gcc dot gnu.org [this message]
2011-03-20 14:52 ` howarth at nitro dot med.uc.edu
2011-03-20 21:10 ` Denis.Excoffier at airbus dot com
2011-03-20 21:27 ` iains at gcc dot gnu.org
2011-03-20 21:50 ` iains at gcc dot gnu.org
2011-03-21  8:18 ` Denis.Excoffier at airbus dot com
2011-03-21  8:34 ` iains at gcc dot gnu.org
2011-03-21 19:30 ` mikestump at comcast dot net
2011-04-28 16:28 ` rguenth at gcc dot gnu.org
2011-06-26 17:38 ` [Bug target/44107] gcc emits frame (epilogue) info incompatible with the darwin {8,9}-unwinder,10-compacter iains at gcc dot gnu.org
2011-12-11 19:53 ` gcc@Denis-Excoffier.org
2011-12-11 20:04 ` iains at gcc dot gnu.org
2013-07-16 13:02 ` iains at gcc dot gnu.org
2013-07-16 16:16 ` howarth at nitro dot med.uc.edu
2013-09-09 13:56 ` dominiq at lps dot ens.fr
2013-09-09 19:57 ` fang at csl dot cornell.edu
2013-09-09 21:46 ` mrs at gcc dot gnu.org
2013-09-10 13:57 ` howarth at nitro dot med.uc.edu
2013-09-14 11:58 ` iains at gcc dot gnu.org
2013-09-14 12:01 ` iains at gcc dot gnu.org
2014-01-22  7:58 ` gcc@Denis-Excoffier.org
2014-01-22  8:13 ` iains at gcc dot gnu.org
2014-01-22  8:58 ` gcc@Denis-Excoffier.org
2014-01-22 19:49 ` iains at gcc dot gnu.org
2014-11-03 19:44 ` fxcoudert at gcc dot gnu.org
2014-11-03 19:49 ` gcc@Denis-Excoffier.org
2021-02-28 15:36 ` egallager at gcc dot gnu.org
2021-03-01 19:37 ` cvs-commit at gcc dot gnu.org
2021-03-21 23:52 ` cvs-commit at gcc dot gnu.org
2021-05-01 13:08 ` cvs-commit at gcc dot gnu.org
2023-05-16 19:14 ` iains at gcc dot gnu.org
2010-05-13  6:27 [Bug bootstrap/44107] New: libstdc++ (dylib) is built with an erroneous dependency towards /usr/lib Denis dot Excoffier at airbus dot com
2010-05-13  8:42 ` [Bug bootstrap/44107] " paolo dot carlini at oracle dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-44107-4-DByjck7Huw@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).