PDA

View Full Version : qt 4.8 from git doesn't compile



ottoshmidt
8th October 2012, 01:20
Hi i am trying to compile Qt 4.8 from gitorious repo but I get this during compilation:


g++: error: unrecognized command line option ‘-fuse-ld=gold’

it actually happens during this compilation/linking:

http://pastebin.com/U6bGdZgx

ChrisW67
8th October 2012, 01:55
Gentoo applies this patch:


$ cat /usr/portage/x11-libs/qt-webkit/files/qt-webkit-4.8.1-no-use-ld-gold.patch
diff -urN qt-everywhere-opensource-src-4.8.1.orig/src/3rdparty/webkit/Source/common.pri qt-everywhere-opensource-src-4.8.1/src/3rdparty/webkit/Source/common.pri
--- qt-everywhere-opensource-src-4.8.1.orig/src/3rdparty/webkit/Source/common.pri 2012-04-28 12:39:16.884473572 +0200
+++ qt-everywhere-opensource-src-4.8.1/src/3rdparty/webkit/Source/common.pri 2012-04-28 12:41:14.245006363 +0200
@@ -3,13 +3,6 @@
contains(JAVASCRIPTCORE_JIT,yes): DEFINES+=ENABLE_JIT=1
contains(JAVASCRIPTCORE_JIT,no): DEFINES+=ENABLE_JIT=0

-linux-g++ {
-isEmpty($$(SBOX_DPKG_INST_ARCH)):exists(/usr/bin/ld.gold) {
- message(Using gold linker)
- QMAKE_LFLAGS+=-fuse-ld=gold
-}
-}
-
# We use this flag on production branches
# See https://bugs.webkit.org/show_bug.cgi?id=60824
CONFIG += production

graciano
8th October 2012, 18:05
Yeap ... me too.
I was building it on Debian Wheezy and got this:

...
g++: error: unrecognized command line option ‘-fuse-ld=gold’
g++: error: unrecognized command line option ‘-fuse-ld=gold’
g++: error: unrecognized command line option ‘-fuse-ld=gold’
make[2]: *** [../../../../../../lib/libQtWebKit.so.4.9.3] Error 1
make[2]: Leaving directory `/home/gt/Documentos/qt-everywhere-opensource-src-4.8.3/src/3rdparty/webkit/Source/WebKit/qt'
make[1]: *** [sub-WebKit-qt-QtWebKit-pro-make_default-ordered] Error 2
make[1]: Leaving directory `/home/gt/Documentos/qt-everywhere-opensource-src-4.8.3/src/3rdparty/webkit/Source'
make: *** [sub-webkit-make_default-ordered] Error 2

What am i doing wrong?

ottoshmidt
14th October 2012, 21:42
Gentoo applies this patch:


$ cat /usr/portage/x11-libs/qt-webkit/files/qt-webkit-4.8.1-no-use-ld-gold.patch
diff -urN qt-everywhere-opensource-src-4.8.1.orig/src/3rdparty/webkit/Source/common.pri qt-everywhere-opensource-src-4.8.1/src/3rdparty/webkit/Source/common.pri
--- qt-everywhere-opensource-src-4.8.1.orig/src/3rdparty/webkit/Source/common.pri 2012-04-28 12:39:16.884473572 +0200
+++ qt-everywhere-opensource-src-4.8.1/src/3rdparty/webkit/Source/common.pri 2012-04-28 12:41:14.245006363 +0200
@@ -3,13 +3,6 @@
contains(JAVASCRIPTCORE_JIT,yes): DEFINES+=ENABLE_JIT=1
contains(JAVASCRIPTCORE_JIT,no): DEFINES+=ENABLE_JIT=0

-linux-g++ {
-isEmpty($$(SBOX_DPKG_INST_ARCH)):exists(/usr/bin/ld.gold) {
- message(Using gold linker)
- QMAKE_LFLAGS+=-fuse-ld=gold
-}
-}
-
# We use this flag on production branches
# See https://bugs.webkit.org/show_bug.cgi?id=60824
CONFIG += production


This worked, thanks Chris.