Hello Steve, Fabrice

On Wed, Nov 10, 2010 at 12:41 AM, Steve M. Robbins <st...@sumost.ca> wrote:
> Speaking only for myself: please do explain why gold is an
> improvement.  It seems to be a regression to me and my suggestion
> would be to avoid it and use the current linker.

I fully agree. gold is faster not only because it's highly optimized,
but also because it "cheats" by skipping the costly DSO dependency
lookup.

On Wed, Nov 10, 2010 at 4:18 AM, Fabrice Coutadeur <coutade...@gmail.com> wrote:
> From what I've understood, the mess with implicit linking, default
> with previous versions of the linker, is that when the implicitly
> linked library change, the application can break without knowing it,
> and we (packagers) don't know that the application has to be linked
> again. This is at least what we've been told in Ubuntu.

This is true for most packages. It's not valid for packages that
include libraries that inline code that, when compiled, refer to
symbols from other libraries, such as boost::filesystem and probably
many others.

boost::asio, for example, inlines code that refer to symbols from
libpthread. So if you link a boost::asio project and don't explicitly
link to libpthread with gold, it'll fail to link. Now this is even
worse than the problem with boost::filesystem, because using gold
you're now supposed to add a system library (-lpthread) to the
project, so you're going to have to conditionally link to it if it's a
Linux system (not to mention other Unix-like systems which don't have
-lpthread).

That's why some packages will require the DSO dependency lookup.
Adding those dependencies ourselves (as maintainers) is not a scalable
way to deal with the issue and it's duplicating information already
specified in the DSO, leading to inconsistencies in the long term.

> And it will be the same for Wheezy (see
> http://wiki.debian.org/ToolChain/DSOLinking ): this error will become
> RC and a fix has to be found (in boost or in btag).

I haven't been subscribed at -devel for long enough, but I don't
recall a discussion about gold there (there was a MBF announcement in
2009, but nothing was said about making gold the default). I don't
think this is going to get through, not unless gold runs with
--add-needed enabled by default or at least has that option available
(it's not supported at the moment).

Thanks for reporting the issue Fabrice, but for the time being I plan
to leave things as they are and postpone further discussion for when
(and if) gold becomes the default linker.

Regards,



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to