incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Constenla-Haile <>
Subject Re: R: ld: gold vs bfd
Date Fri, 23 Dec 2011 15:07:10 GMT
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 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.

> >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:
> >
> >
> 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/ - 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

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.

Ariel Constenla-Haile
La Plata, Argentina

View raw message