Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 269559

Summary: dev-libs/rasqal-0.9.16 fails to compile with GOLD linker
Product: Gentoo Linux Reporter: Bartosz Szreder <zgredder>
Component: [OLD] Core systemAssignee: Gentoo Sound Team <sound>
Status: RESOLVED FIXED    
Severity: normal CC: ansla80, esigra, lfarkas, toolchain
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 269315    
Attachments: build log
emerge --info

Description Bartosz Szreder 2009-05-12 14:59:06 UTC
Compiling dev-libs/rasqal with the new gold linker fails. See attached build log for details.

Reproducible: Always

Steps to Reproduce:
1. USE="gold" emerge binutils
2. emerge =dev-libs/rasqal-0.9.16

Actual Results:  
Compilation fails with linker errors (undefined references).

Expected Results:  
rasqal compiles successfully
Comment 1 Bartosz Szreder 2009-05-12 15:02:13 UTC
Created attachment 191037 [details]
build log
Comment 2 Bartosz Szreder 2009-05-12 15:05:26 UTC
Created attachment 191038 [details]
emerge --info
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2009-05-14 04:45:06 UTC
USE flag info for USE "gold",

Use the new gold linker (written in C++) rather than the standard linker (this _will_ break things)

We accept patches.
Comment 4 Bartosz Szreder 2009-05-14 05:52:28 UTC
I thought that gold's bugs should be reported, as per tracker bug 269315. Other bugs blocking the tracker aren't closed.

This report could stay open (maybe "suspended"?) to at least help others searching for similar bugs instead of creating duplicate bugreports.
Comment 5 SpanKY gentoo-dev 2009-05-15 09:34:33 UTC
yes bugs should be reported, but they shouldnt be assigned to package maintainers
Comment 6 Lóránt Farkas 2009-10-28 23:45:13 UTC
The error was with the line:

x86_64-pc-linux-gnu-gcc -O2 -march=core2 -pipe -fno-ident -combine -Wl,-O1 -o .libs/roqet roqet.o  ../src/.libs/librasqal.so 

If you change it to 

x86_64-pc-linux-gnu-gcc -O2 -march=core2 -pipe -fno-ident -combine -Wl,-O1 -Wl,-lraptor -o .libs/roqet roqet.o  ../src/.libs/librasqal.so 

then it compiles and links clean. 

The problem as I see:

The gold linker does not resolve indirect dependencies as the GNU linker. This is the intended behaviour.  (see http://sourceware.org/bugzilla/show_bug.cgi?id=10238 )
Comment 7 Lóránt Farkas 2009-10-29 00:00:52 UTC
The package can be successfully patched e.g. by changing in utils/Makefile.in  

roqet_LDADD = $(top_builddir)/src/librasqal.la

line to

roqet_LDADD = $(top_builddir)/src/librasqal.la -lraptor
Comment 8 Lóránt Farkas 2009-10-29 00:13:39 UTC
(In reply to comment #5)
> yes bugs should be reported, but they shouldnt be assigned to package
> maintainers
> 

As I wrote, this is the intended behavior of the "gold" linker. If the linker does not links cleanly then there is some missing dependency from the Makefile. So I think these bugs are in the area of the package maintainers.
Comment 9 SpanKY gentoo-dev 2009-11-22 18:00:53 UTC
this does appear to be a missing library list.  roqet probably needs to link against raptor itself.

this might also show up under the normal linker with more strict flags ...
Comment 10 Lóránt Farkas 2010-05-06 09:22:12 UTC
So we have agreed that this is not a bug of the gold linker but a problem in rasqual's Makefile.in. Please report to the developers and/or patch the Makefile.in and change the status to wontfix/fixed.
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2011-07-09 08:32:12 UTC
$ ld -v
GNU gold (GNU Binutils 2.21.1) 1.11

[ebuild   R   #] dev-libs/rasqal-0.9.26  USE="crypt mhash pcre xml -gmp -static-libs -test" 0 kB

Please reopen the bug report if you can still reproduce with rasqal-0.9.26 or above.