Building on Ubuntu 14.04 for ARM fails with Project ERROR: Unknown module(s) in QT: quick-private
-
I am trying to compile Qt 5.3 for ARM architecture on Ubuntu 14.04. I have the following qmake.conf
@MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublibinclude(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)load(device_config)
QT_QPA_DEFAULT_PLATFORM = eglfs
modifications to g++.conf
QMAKE_CC = $${CROSS_COMPILE}gcc
QMAKE_CXX = $${CROSS_COMPILE}g++
QMAKE_LINK = $${QMAKE_CXX}
QMAKE_LINK_SHLIB = $${QMAKE_CXX}modifications to linux.conf
QMAKE_AR = $${CROSS_COMPILE}ar cqs
QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
QMAKE_NM = $${CROSS_COMPILE}nm -P
QMAKE_STRIP = $${CROSS_COMPILE}stripCOMPILER_FLAGS = -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=softfp
#modifications to gcc-base.conf
QMAKE_CFLAGS += $${COMPILER_FLAGS}
QMAKE_CXXFLAGS += $${COMPILER_FLAGS}
QMAKE_CXXFLAGS_RELEASE += -O3QMAKE_LIBS += -lrt -lpthread -ldl
Extra stuff (OpenGL, DirectFB, ...)
QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/usr/include:/usr/arm-linux-gnueabi/include/
QMAKE_LIBDIR_EGL = $$[QT_SYSROOT]/usr/lib:/usr/arm-linux-gnueabi/lib/Sanity check
deviceSanityCheckCompiler()
load(qt_config)
@I have installed gcc-arm-linux-gnueabi and g++-arm-linux-gnueabi packages available in /usr/bin
@
$ /usr/bin » ll | grep arm | grep gnu
-rwxr-xr-x 1 root root 28K gru 2 2013 arm-linux-gnueabi-addr2line
-rwxr-xr-x 2 root root 60K gru 2 2013 arm-linux-gnueabi-ar
-rwxr-xr-x 2 root root 619K gru 2 2013 arm-linux-gnueabi-as
-rwxr-xr-x 1 root root 2.7M gru 2 2013 arm-linux-gnueabi-dwp
-rwxr-xr-x 1 root root 31K gru 2 2013 arm-linux-gnueabi-elfedit
lrwxrwxrwx 1 root root 25 paź 6 2012 arm-linux-gnueabi-g++ -> arm-linux-gnueabi-g++-4.7
-rwxr-xr-x 1 root root 554K kwi 16 23:22 arm-linux-gnueabi-g++-4.7
lrwxrwxrwx 1 root root 25 paź 6 2012 arm-linux-gnueabi-gcc -> arm-linux-gnueabi-gcc-4.7
-rwxr-xr-x 1 root root 550K kwi 16 23:22 arm-linux-gnueabi-gcc-4.7
.... and more
@@
/usr » tree -L 1 arm-linux-gnueabi
arm-linux-gnueabi
├── bin
├── include
└── lib
@Now after downloading Qt 5.3 sources I go to their root dir and launch the following configure command
@
./configure -no-mips_dspr2 -no-mips_dsp -no-accessibility -opensource -confirm-license -device-option CROSS_COMPILE=arm-linux-gnueabi- -no-cups -no-openssl -no-opengl -no-kms -qt-zlib -qt-libjpeg -qt-libpng -no-sse4.2 -no-sse4.1 -no-sse3 -no-sse2 -prefix ~/programming/tools/qt/qt-arm-5.3 -platform linux-g++ -xplatform linux-arm-gnueabi-g++ -device linux-arm-cortex9-mine-g++ -v 2>&1 | tee configure.log && colormake -j4 2>&1 | tee make.log
@"configure.log at pastebin":http://pastebin.com/m5jUS93v
"make.log at pastebin":http://pastebin.com/gNupMq6H@cd quickwidgets/ && ( test -e Makefile || /home/USER/programming/tools/qt/qt-everywhere-opensource-src-5.3.0/qtbase/bin/qmake /home/USER/programming/tools/qt/qt-everywhere-opensource-src-5.3.0/qtdeclarative/src/quickwidgets/quickwidgets.pro -o Makefile ) && make -f Makefile
Project ERROR: Unknown module(s) in QT: quick-private
make[2]: *** [sub-quickwidgets-make_first-ordered] Error 3
make[2]: Leaving directory/home/USER/programming/tools/qt/qt-everywhere-opensource-src-5.3.0/qtdeclarative/src' make[1]: *** [sub-src-make_first] Error 2 make[1]: Leaving directory
/home/USER/programming/tools/qt/qt-everywhere-opensource-src-5.3.0/qtdeclarative'
make: *** [module-qtdeclarative-make_first] Error 2
@Should I link/include the libs/headers somehow ? I do not need opengl are qtquick here.
EDIT
Ok so I have removed the source directory, extracted the sources again, copied my device conf back, and launched the following configure command this time :
@
./configure -no-glib -nomake examples -no-sse4.2 -no-sse4.1 -no-sse3 -no-sse2 -no-cups -no-openssl -no-opengl -no-kms -no-nis -no-pch -no-mips_dspr2 -no-mips_dsp -no-accessibility -opensource -confirm-license -device-option CROSS_COMPILE=arm-linux-gnueabi- -qt-zlib -qt-libjpeg -qt-libpng -prefix ~/programming/tools/qt/qt-arm-5.3 -platform linux-g++ -xplatform linux-arm-gnueabi-g++ -device linux-arm-cortex9-mine-g++ -I/home/monkey/programming/tools/qt/Qt-5.3.0/5.3/gcc_64/include/ 2>&1 | tee configure.log && colormake -j1 2>&1 | tee make.log
@I have added there -no-glib and changed building on 4 cores to building on 1 core to be sure that there is no race condition anywhere.
After that I have received the following make log ( the end ) :
"make.log":http://pastebin.com/NKsGRP7C
In the end :
@
.obj/qthread_unix.o: In functionQThreadPrivate::createEventDispatcher(QThreadData*)': qthread_unix.cpp:(.text+0x27c): undefined reference to
QEventDispatcherGlib::versionSupported()'
qthread_unix.cpp:(.text+0x298): undefined reference toQEventDispatcherGlib::QEventDispatcherGlib(QObject*)' .obj/qcoreapplication.o: In function
QCoreApplicationPrivate::createEventDispatcher()':
qcoreapplication.cpp:(.text+0x7c): undefined reference toQEventDispatcherGlib::versionSupported()' qcoreapplication.cpp:(.text+0x98): undefined reference to
QEventDispatcherGlib::QEventDispatcherGlib(QObject*)'
collect2: error: ld returned 1 exit status
make[3]: *** [../../lib/libQt5Core.so.5.3.0] Error 1
make[3]: Leaving directory/home/USER/programming/tools/qt/qt-everywhere-opensource-src-5.3.0/qtbase/src/corelib' make[2]: *** [sub-corelib-make_first] Error 2 make[2]: Leaving directory
/home/USER/programming/tools/qt/qt-everywhere-opensource-src-5.3.0/qtbase/src'
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory `/home/USER/programming/tools/qt/qt-everywhere-opensource-src-5.3.0/qtbase'
make: *** [module-qtbase-make_first] Error 2
@What am I doing wrong here ? Do I miss a package ? Which one ?
-
Maybe add -skip qtquick or -skip qtdeclarative (I also recommend using -skip qtwebkit) to the configure, and do not use no-glib.
-
Ok so after using
@
-skip qtwebkit -skip qtdeclarative -no-xcb
@I have managed to compile it successfully :)
BUT! After remove skip qtdeclarative I am not able to build it and I get the following compile error :
@
cd quickwidgets/ && ( test -e Makefile || /home/USER/programming/tools/qt/qt-everywhere-opensource-src-5.3.0/builds/local/qtbase/bin/qmake /home/USER/programming/tools/qt/qt-everywhere-opensource-src-5.3.0/qtdeclarative/src/quickwidgets/quickwidgets.pro -o Makefile ) && make -f Makefile
2
make[2]: *** [sub-quickwidgets-make_first-ordered] Error 3
make[2]: Leaving directory/home/USER/programming/tools/qt/qt-everywhere-opensource-src-5.3.0/builds/local/qtdeclarative/src' make[1]: *** [sub-src-make_first] Error 2 make[1]: Leaving directory
/home/USER/programming/tools/qt/qt-everywhere-opensource-src-5.3.0/builds/local/qtdeclarative'
make: *** [module-qtdeclarative-make_first] Error 2
@