[haiku-bugs] Re: [Haiku] #8031: new gcc indirect linking policy changes cause build failures / missing symbols.

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Tue, 18 Oct 2011 15:57:33 -0000

#8031: new gcc indirect linking policy changes cause build failures / missing
symbols.
----------------------------+----------------------------
   Reporter:  kallisti5     |      Owner:  bonefish
       Type:  bug           |     Status:  new
   Priority:  high          |  Milestone:  R1/beta1
  Component:  Build System  |    Version:  R1/Development
 Resolution:                |   Keywords:
 Blocked By:                |   Blocking:
Has a Patch:  0             |   Platform:  All
----------------------------+----------------------------

Comment (by bonefish):

 Replying to [comment:7 kallisti5]:
 > #gcc:
 >
 > {{{
 > 09:40 < Zordan> if you are using e.g. newer gold linker
 >      (and perhaps newer regular ld as well?) then indirect shared
 >      library dependencies are no longer followed (e.g. shared
 >      libraries have to list their own direct dependencies)
 > }}}

 The first part of this statement seems to refer to what is explained in
 the "UnderstandingDSOLinkChange" wiki page. It basically says that, if
 your app uses a library function, it has to be linked directly to that
 library and cannot rely on another library pulling in the first library.
 This makes sense. (BTW, it is something that was mandatory on BeOS as
 well, as the runtime loader did support resolving symbols only in direct
 dependencies.)

 The part in the last parentheses is a bit ambiguous. It might either mean
 when a library is linked, it has to be linked against all its dependencies
 or that when linking against a library all its dependencies have to be
 listed as well. The latter I would find rather ridiculous.

 Anyway, we do list libroot_build.so, both when linking libbe_build.so as
 well as when linking the app, so either way any condition the statement
 might refer to is fulfilled.

 What apparently seems to be the problem is that the linker (the verbose
 output doesn't show which one is actually invoked by collect2 -- the error
 message says "ld returned 1 exit status", but that might not refer to the
 actual name of the linker) even requires the libraries to be listed in
 dependency order. That I would consider a bug or at least a seriously
 missing feature.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/8031#comment:10>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: