incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Constenla-Haile <arie...@apache.org>
Subject Re: R: ld: gold vs bfd
Date Mon, 26 Dec 2011 23:30:52 GMT
On Fri, Dec 23, 2011 at 12:07:10PM -0300, Ariel Constenla-Haile wrote:
> On Fri, Dec 23, 2011 at 03:37:39PM +0100, Andre Fischer wrote:
> > >>I ran into a problem with a Linux build.  On Ubuntu
> > >>(both 32bit and 64bit) linking of comphelper failed
> > >>with a lot of unresolved references.  With the help of
> > >>Herbert I could solve this by using a different linker.
> > >>Instead of ld.bfd I used ld.gold and could build comphelper
> > >>and the rest of OpenOffice.
> > >>
> > >>On Fedora this seems to work out of the box.
> > >>
> > >>I am now working on CoinMP (the lp_solve
> > >>replacement).  It builds without problems on Windows
> > >>and
> > >>Mac but has linker errors on Linux.  Eventually I
> > >>found that going back to ld.bfd solved this problem.
> > >>
> > >>Has anybody else experienced problems with the linker?
> > >>
> > >>Does anybody on this list have a deeper understanding of
> > >>the Linux linkers and can explain
> > >>what is going on and how to better solve it?
> 
> the best I've read about linkers is from the gold linker developer, I'll
> try to search the articles.

Ian Lance Taylor's blog
http://www.airs.com/blog/archives/38 [begin]
...
http://www.airs.com/blog/archives/57 [end]

of course somehow too much for the related problem, though it's worth
reading.
The classical book on the topic is John Levine's Linkers and Loaders.

> 
> > >My understanding is that gold is still experimental: it
> > >is the planned replacement for GNU ld but GNU ld is
> > >still the default for some good reason.
> > >
> > >The most common problems I've seen with GNU ld are
> > >related to the linking order:
> > >
> > >http://stackoverflow.com/questions/45135/linker-order-gcc
> > 
> > That is the kind of problem that I ran (and still run) into in
> > comphelper.  Does anybody else has this problem, or is it just me?
> 
> This is obviously an Ubuntu related problem. In Fedora works out the
> box. What is the default linker in Ubuntu? 
> You can know it by running:
> 
> []$ sudo alternatives --display ld
>  
> ld - status is auto.
> link currently points to /usr/bin/ld.bfd
> /usr/bin/ld.bfd - priority 50
> /usr/bin/ld.gold - priority 30
> Current `best' version is /usr/bin/ld.bfd.
> 
> In Fedora, ld.bfd is the default linker.
> And they recommend not to mix linking with ld.bfd and ld.gold.
> 
> IIRC there was an attempt to move Fedora to the gold linker, but due to
> issues it ended in nothing. The effort did some good documentation, I'll
> search on the Fedora wiki.

http://fedoraproject.org/wiki/Features/GoldLinkerDefault
https://fedoraproject.org/wiki/GoldIncompatibilities
https://fedoraproject.org/wiki/UnderstandingDSOLinkChange

---------------------------------------------------------------------


Back to the current issue, I've successfully build AOO on Ubuntu this
weekend, with the default ld.bfd linker.

Ubuntu versions were the latest LTS one, Ubuntu 10.04.3 LTS (Lucid
Lynx). The generated binaries work fine in the latest Fedora 16 and the
latest Ubuntu 11.10 (Oneiric Ocelot).

I guess you are building in the latest Ubuntu, so it looks like
a regression in ubuntu, not a problem in AOO.

It would be interesting to know which version has the buildboot machine.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Mime
View raw message