Bug 259815 - kst (2.0.2) fails to build with GNU binutils-gold.
Summary: kst (2.0.2) fails to build with GNU binutils-gold.
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 2.0.2
Platform: Debian unstable Linux
: NOR normal
Target Milestone: 2.0.3
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 09:04 UTC by Ruben Molina
Modified: 2011-01-19 20:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ruben Molina 2010-12-14 09:04:59 UTC
Version:           2.0.2 (using KDE 1.2) 
OS:                Linux

kst (2.0.2) fails to build with GNU binutils-gold.  Gold is a new, faster, ELF only linker, still in beta test.

The important difference is that --no-add-needed is the default behavior of GNU
binutils-gold, so we need to provide all the needed libraries to the linker when building the executables.

Reproducible: Always

Steps to Reproduce:
Use --no-add-needed, or install binutils-gold

Actual Results:  
 build/lib/libkst2lib.so: error: undefined reference to 'clock_gettime' 


Expected Results:  
It should build :)

Using the following patch the package builds fine.
Please note I'm not fluent in qmake, so I don't know if this is the proper way.

--- kst-2.0.2.orig/src/libkst/libkst.pro
+++ kst-2.0.2/src/libkst/libkst.pro
@@ -6,6 +6,7 @@ CONFIG += dll
 DEFINES += BUILD_KSTCORE
 TARGET = $$kstlib(kst2lib)
 DESTDIR = $$OUTPUT_DIR/lib
+QMAKE_LFLAGS_SHLIB *= -lrt
Comment 1 Nicolas Brisset 2010-12-15 14:33:13 UTC
I have just tested the patch (one added line) with standard binutils on openSuse 11.1 64 bits: it still builds.
So if it helps with binutils-gold and does no harm to standard binutils, I'd suggest applying the patch. We just need to check that it does not break things on Windows.
Then we'll also have to find out what is needed with cmake (Peter: this is already the second action for you on this bug!).

@Ruben: FYI, we are in the process of switching to cmake, right now cmake support is still experimental and qmake is the default, but it should change soon.
Comment 2 Peter Kümmel 2010-12-15 18:57:36 UTC
SVN commit 1206738 by kuemmel:

Build with GNU binutils-gold, thx to Ruben Molina 
BUG: 259815

 M  +2 -1      cmake/src/libkst/CMakeLists.txt  
 M  +1 -1      src/libkst/libkst.pro  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1206738