Hello,

On Tuesday, 5th November 2013 at 08:02 am, Hongyi Zhao wrote:
> 
> 
> Hi all,
> 
> I use Debian Wheezy, and I build qt-everywhere-opensource-src-4.8.5 failed 
> with the following error:
> 
> -------------
> 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.4] Error 1
> make[2]: Leaving directory 
> `/home/werner/software/TUG/IDE/eric-ide-phtyon/qt-project.org/qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebKit/qt'
> make[1]: *** [sub-WebKit-qt-QtWebKit-pro-make_default-ordered] Error 2
> make[1]: Leaving directory 
> `/home/werner/software/TUG/IDE/eric-ide-phtyon/qt-project.org/qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source'
> make: *** [sub-webkit-make_default-ordered] Error 2
> -----------------
> 
> Any hints?

I suppose you are using GCC version 4.7 or newer and have the gold linker 
installed. Linking QtWebKit using gold does not work with that GCC version, but 
the flag that sets it as the linker is added to QMAKE_LFLAGS anyway if gold is 
installed. 

A quick workaround for this is to edit the file 
src/3rdparty/webkit/Source/common.pri in your qt source tree and comment out 
the following lines with a #: 

#message(Using gold linker)
#QMAKE_LFLAGS+=-fuse-ld=gold

This will deactivate the gold linker.

Best regards,
Michael
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to