[Development] Compiling Qt5 on Ubuntu Oneiric

Kate Alhola kate.alhola at gmail.com
Thu Jan 5 14:42:35 CET 2012


2012/1/5 Thiago Macieira <thiago.macieira at intel.com>:
> On Thursday, 5 de January de 2012 14.32.55, Kate Alhola wrote:
>> Has anyone succeeded to compile current git snapshot with Ubuntu oneiric ?
>> Least, using ./configure -prefix $PWD/qtbase -opensource -confirm-license
>> it does not work.
>>
>> I noticed that i get errors
>>
>> First try fails with error from wekbit that "nullpointer" will be
>> reserved word g++0x ( -Werror causes this )
>>
>> That could be fixed turning -Werror off on Linux
>
> Try the attached patch. It's been sitting on my tree for close to 6 months.
> When Qt 4.8 is in Gerrit, I'll be able to submit it (© me, not Intel).

I did similar but just quick and dirty patch disable -Werroro on
linux-gcc  to fix. Hoipefully some kind of fix get merget to git

>
>> Then there is linking error because it links -lpthread -ljscore when
>> it should be -ljscore -lpthread
>
> Link what? I guess you mean WebKit.
>

I got this kind of output:

make[3]: Entering directory
`/home/kate/qt5/qt5/qtwebkit/WebKitBuild/Release/JavaScriptCore'


....
g++ -Wl,-rpath-link,/home/kate/qt5/qt5/qtbase/lib -fuse-ld=gold
-Wl,-O1 -Wl,-rpath,/home/kate/qt5/qt5/qtbase/lib
-Wl,-rpath,/home/kate/qt5/qt5/qtbase/lib
-Wl,-rpath,/home/kate/qt5/qt5/qtwebkit/WebKitBuild/Release/lib -o
./jsc .obj/release-shared/jsc.o    -L/home/kate/qt5/qt5/qtbase/lib
-L./release -lQtCore -lpthread -ljscore
/usr/bin/ld: ./release/libjscore.a(FastMalloc.o): undefined reference
to symbol 'pthread_create@@GLIBC_2.1'
/usr/bin/ld: note: 'pthread_create@@GLIBC_2.1' is defined in DSO
/lib/i386-linux-gnu/libpthread.so.0 so try adding it to the linker
command line
/lib/i386-linux-gnu/libpthread.so.0: could not read symbols: Invalid operation
> src/3rdparty/webkit/Source/WebKit/qt/Makefile:LIBS          = $(SUBLIBS)  -
> L/home/thiago/obj/qt/qt-4.8-release/lib -L../../WebCore/release -
> L../../JavaScriptCore/release -L/usr/X11R6/lib -lwebcore -ljscore -lsqlite3 -
> lXrender -lQtGui -L/home/thiago/obj/qt/qt-4.8-release/lib -L/usr/X11R6/lib -
> lQtNetwork -lQtCore -lpthread -lXrender -lfontconfig -lfreetype -lXext -lX11 -
> lm
>

For this I also made just quick and dirty fix jsc.pro to get
libpthread to last library
+linux-g++* {
+    LIBS_PRIVATE += -lpthread
+}
+

That's was not all, then I needed to do several patches like following
because webcore tried to use QWidgets

diff --git a/Source/WebCore/WebCore.pro b/Source/WebCore/WebCore.pro
index 458d6a2..b257f0e 100644
--- a/Source/WebCore/WebCore.pro
+++ b/Source/WebCore/WebCore.pro
@@ -1,6 +1,7 @@
 # WebCore - qmake build info
 CONFIG += building-libs
 CONFIG += depend_includepath
+QT += widgets gui


Kate

> For me, -lpthread appears after -ljscore.
>
>> I have tried ./configure -prefix /home/kate/qt5/qt5/qtbase -opensource
>> -confirm-license -nomake tests -no-webkit
>> but that does not help, it still compiles jscore.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel Open Source Technology Center
>     Intel Sweden AB - Registration Number: 556189-6027
>     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>



More information about the Development mailing list