gregd72002
Posts: 31
Joined: Tue May 08, 2012 9:17 pm

building qt5 on the board itself

Thu Aug 23, 2012 2:53 pm

Hi,

I'm trying to build qt5 on the board itself as described in: http://qt-project.org/wiki/RaspberryPi

So far I've got all the sources HF patched but the configure process for qtbase fails.

Any advice on this?

Code: Select all

[email protected] ~/qt5/qtbase $ ./configure -opengl es2 -opensource -confirm-license -optimized-qmake -reduce-relocations -reduce-exports -release -make libs -sysroot / -prefix /usr/local/qt5pi -v 
Precompiled-headers support enabled.
g++ -c -fvisibility=hidden fvisibility.c
Symbol visibility control enabled.
g++ --sysroot=/ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
Symbolic function binding enabled.

This is the Qt Open Source Edition.

You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.

You have already accepted the terms of the  license.

<srcbase> = /home/pi/qt5/qtbase 
<outbase> = /home/pi/qt5/qtbase 
Creating qmake. Please wait...
make: Nothing to be done for `first'.
Determining architecture... ()
g++ -c -pipe --sysroot=/ -g -Wall -W -fPIE  -I../../mkspecs/linux-g++ -I. -o arch.o arch.cpp
g++  -o arch arch.o   --sysroot=/ 
{ test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'arch' && test -f arch.gdb-index && objcopy --add-section '.gdb_index=arch.gdb-index' --set-section-flags '.gdb_index=readonly' 'arch' 'arch' && rm -f arch.gdb-index || true
    Found architecture in binary
CFG_ARCH="arm"
CFG_CPUFEATURES=""
System architecture: 'arm'
Host architecture: 'arm'
C++11 auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -std=c++0x -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o c++11.o c++11.cpp
g++ -Wl,-O1 -o c++11 c++11.o   --sysroot=/ 
C++11 enabled.
floatmath auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o floatmath.o floatmath.cpp
floatmath.cpp:44:5: warning: unused parameter ‘argc’ [-Wunused-parameter]
floatmath.cpp:44:5: warning: unused parameter ‘argv’ [-Wunused-parameter]
g++ -Wl,-O1 -o floatmath floatmath.o   --sysroot=/ 
floatmath enabled.
sse2 auto-detection... ()
g++ -c -pipe --sysroot=/ -msse2 -g -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o sse2.o sse2.cpp
cc1plus: error: unrecognized command line option ‘-msse2’
make: *** [sse2.o] Error 1
sse2 disabled.
sse3 auto-detection... ()
g++ -c -pipe --sysroot=/ -msse3 -g -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o sse3.o sse3.cpp
cc1plus: error: unrecognized command line option ‘-msse3’
make: *** [sse3.o] Error 1
sse3 disabled.
ssse3 auto-detection... ()
g++ -c -pipe --sysroot=/ -mssse3 -g -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o ssse3.o ssse3.cpp
cc1plus: error: unrecognized command line option ‘-mssse3’
make: *** [ssse3.o] Error 1
ssse3 disabled.
sse4_1 auto-detection... ()
g++ -c -pipe --sysroot=/ -msse4.1 -g -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o sse4_1.o sse4_1.cpp
cc1plus: error: unrecognized command line option ‘-msse4.1’
make: *** [sse4_1.o] Error 1
sse4_1 disabled.
sse4_2 auto-detection... ()
g++ -c -pipe --sysroot=/ -msse4.2 -g -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o sse4_2.o sse4_2.cpp
cc1plus: error: unrecognized command line option ‘-msse4.2’
make: *** [sse4_2.o] Error 1
sse4_2 disabled.
avx auto-detection... ()
g++ -c -pipe --sysroot=/ -mavx -g -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o avx.o avx.cpp
cc1plus: error: unrecognized command line option ‘-mavx’
make: *** [avx.o] Error 1
avx disabled.
neon auto-detection... ()
g++ -c -pipe --sysroot=/ -mfpu=neon -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o neon.o neon.cpp
g++ -Wl,-O1 -o neon neon.o   --sysroot=/ 
neon enabled.
zlib auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o zlib.o zlib.cpp
zlib.cpp: In function ‘int main(int, char**)’:
zlib.cpp:46:15: warning: variable ‘stream’ set but not used [-Wunused-but-set-variable]
zlib.cpp:48:17: warning: variable ‘ver’ set but not used [-Wunused-but-set-variable]
zlib.cpp:51:9: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
g++ -Wl,-O1 -o zlib zlib.o   --sysroot=/ -lz 
zlib enabled.
libjpeg auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o libjpeg.o libjpeg.cpp
libjpeg.cpp:45:21: fatal error: jpeglib.h: No such file or directory
compilation terminated.
make: *** [libjpeg.o] Error 1
libjpeg disabled.
libpng auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o libpng.o libpng.cpp
libpng.cpp:42:17: fatal error: png.h: No such file or directory
compilation terminated.
make: *** [libpng.o] Error 1
libpng disabled.
DB2 auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o db2.o db2.cpp
db2.cpp:42:20: fatal error: sqlcli.h: No such file or directory
compilation terminated.
make: *** [db2.o] Error 1
DB2 disabled.
InterBase auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o ibase.o ibase.cpp
ibase.cpp:42:19: fatal error: ibase.h: No such file or directory
compilation terminated.
make: *** [ibase.o] Error 1
InterBase disabled.
MySQL (thread-safe) auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o mysql.o ../mysql/mysql.cpp
../mysql/mysql.cpp:42:19: fatal error: mysql.h: No such file or directory
compilation terminated.
make: *** [mysql.o] Error 1
MySQL (thread-safe) disabled.
MySQL (thread-unsafe) auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o mysql.o mysql.cpp
mysql.cpp:42:19: fatal error: mysql.h: No such file or directory
compilation terminated.
make: *** [mysql.o] Error 1
MySQL (thread-unsafe) disabled.
OCI auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o oci.o oci.cpp
oci.cpp:42:17: fatal error: oci.h: No such file or directory
compilation terminated.
make: *** [oci.o] Error 1
OCI disabled.
ODBC auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o odbc.o odbc.cpp
odbc.cpp:45:17: fatal error: sql.h: No such file or directory
compilation terminated.
make: *** [odbc.o] Error 1
ODBC disabled.
iODBC auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o iodbc.o iodbc.cpp
iodbc.cpp:42:17: fatal error: sql.h: No such file or directory
compilation terminated.
make: *** [iodbc.o] Error 1
iODBC disabled.
PostgreSQL auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o psql.o psql.cpp
psql.cpp:42:22: fatal error: libpq-fe.h: No such file or directory
compilation terminated.
make: *** [psql.o] Error 1
PostgreSQL disabled.
SQLite2 auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o sqlite2.o sqlite2.cpp
sqlite2.cpp:42:20: fatal error: sqlite.h: No such file or directory
compilation terminated.
make: *** [sqlite2.o] Error 1
SQLite2 disabled.
TDS auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o tds.o tds.cpp
tds.cpp:42:22: fatal error: sybfront.h: No such file or directory
compilation terminated.
make: *** [tds.o] Error 1
TDS disabled.
NIS auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o nis.o nis.cpp
g++ -Wl,-O1 -o nis nis.o   --sysroot=/ -lnsl 
NIS enabled.
Cups auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o cups.o cups.cpp
cups.cpp:42:23: fatal error: cups/cups.h: No such file or directory
compilation terminated.
make: *** [cups.o] Error 1
Cups disabled.
POSIX iconv auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o iconv.o iconv.cpp
g++ -Wl,-O1 -o iconv iconv.o   --sysroot=/ 
POSIX iconv enabled.
D-Bus auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -I/usr/include/dbus-1.0 -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include -o dbus.o dbus.cpp
g++ -Wl,-O1 -o dbus dbus.o   --sysroot=/ -ldbus-1 
D-Bus enabled.
Glib auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -o glib.o glib.cpp
glib.cpp: In function ‘int main(int, char**)’:
glib.cpp:48:19: warning: variable ‘context’ set but not used [-Wunused-but-set-variable]
glib.cpp:55:38: warning: ‘pollfd’ is used uninitialized in this function [-Wuninitialized]
g++ -Wl,-O1 -o glib glib.o   --sysroot=/ -pthread -lgthread-2.0 -lrt -lglib-2.0 
Glib enabled.
GStreamer auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/include/libxml2 -o gstreamer.o gstreamer.cpp
gstreamer.cpp:53:5: warning: unused parameter ‘argc’ [-Wunused-parameter]
gstreamer.cpp:53:5: warning: unused parameter ‘argv’ [-Wunused-parameter]
g++ -Wl,-O1 -o gstreamer gstreamer.o   --sysroot=/ -pthread -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lxml2 -lglib-2.0 -lgstinterfaces-0.10 -lgstvideo-0.10 -lgstbase-0.10 
GStreamer enabled.
ICU auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o icu.o icu.cpp
g++ -Wl,-O1 -o icu icu.o   --sysroot=/ -licuuc -licui18n 
ICU enabled.
PulseAudio auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o pulseaudio.o pulseaudio.cpp
pulseaudio.cpp:42:30: fatal error: pulse/pulseaudio.h: No such file or directory
compilation terminated.
make: *** [pulseaudio.o] Error 1
PulseAudio disabled.
OpenGL ES 2.x auto-detection... ()
g++ -c -pipe --sysroot=/ -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o opengles2.o opengles2.cpp
opengles2.cpp:45:25: fatal error: GLES2/gl2.h: No such file or directory
compilation terminated.
make: *** [opengles2.o] Error 1
OpenGL ES 2.x disabled.
The OpenGL ES 2.0 functionality test failed!
 You might need to modify the include and library search paths by editing
 QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
 /home/pi/qt5/qtbase/mkspecs/linux-g++.
[email protected] ~/qt5/qtbase $

dms75
Posts: 25
Joined: Mon Aug 06, 2012 1:41 pm

Re: building qt5 on the board itself

Thu Aug 23, 2012 8:42 pm

Hi,

I had a simmillar problem when crosscompiling qt5 (crosscompiling since I am still waiting for my Pi... why on earth did i order at RS.... )

in the qtbase directory type
git branch

If it shows this:
* (no branch)
master

Then you must checkout to master branch before running ./configure. To do so type :
git checkout master

and after that you might want to recheck if it's set to master now:
git branch should show the following:
* master

before you do annother ./configure you might want to enter the following 2 commands to restart with a clean qtbase dir:
git reset --hard
git clean -dxf

I hope this helps you fixing the issue.

Dirk

Kernald
Posts: 1
Joined: Fri Aug 24, 2012 7:39 pm

Re: building qt5 on the board itself

Fri Aug 24, 2012 7:41 pm

If you are running Debian (or Raspbian), you also need to install OpenGL ES headers, which are, I believe, in libegl1-mesa-dev.

g3vbv
Posts: 15
Joined: Tue Jul 17, 2012 2:01 pm

Re: building qt5 on the board itself

Tue Aug 28, 2012 2:05 am

I downloaded qt50-snapshot from the repo but it only contains one file.
I also tried to build on Ubuntu x86_64 but it failed part of the way through and I haven't had time to get back to it.
I wonder if someone who has been able to successfully build qt5 for raspbian can supply built packages or an installable tarball.

blumble-pi
Posts: 6
Joined: Tue Jul 31, 2012 7:13 am

Re: building qt5 on the board itself

Tue Aug 28, 2012 7:01 am

Guys from QtopPi mailing list has created a beginner guide how to cross compile qt5 for RPi:
Please also check the archives of the mailing list. They have also created a script, that do all the downloads ans checkouts and a raspbian image with qt5

Heater
Posts: 13704
Joined: Tue Jul 17, 2012 3:02 pm

Re: building qt5 on the board itself

Tue Aug 28, 2012 12:29 pm

Just follow the instructions under "Installing Qt 5 nightlies from the repo" found ion this page http://qt-project.org/wiki/RaspberryPi

Basically:

Edit the file /etc/apt/sources.list and add the following line:

deb http://archive.qmh-project.org/rpi-wheezy/debian unstable main

Then upgrade your system and install qt5 from the nightly builds:

apt-get update
apt-get upgrade
apt-get install qt50-snapshot

You will then have Qt5 installed in /opt/qt50-snapshot/

Now. Can anyone tell me how to get my app built with those Qt 5 libs?
Memory in C++ is a leaky abstraction .

Return to “Raspbian”