Unsolved Cross Compiling Problem for Apalis-TK1 (qt-qml)
-
Hi all,
I am build qt cross compiling for Nvidia Toradex Apalis-TK1. I need to run a qml application on Apalis-TK1. The QtBase modules work correct.I am getting the following error when doing qmake for Qtdeclarativ. (-b 5.7)
abdullah@abdullah:~/qtdeclarative$ ~/trdx-sdk/qt5/bin/qmake -r Reading /home/abdullah/qtdeclarative/src/src.pro Reading /home/abdullah/qtdeclarative/src/qml/qml.pro Project MESSAGE: perl -w /home/abdullah/trdx-sdk/qt5/bin/syncqt.pl -module QtQml -version 5.3.3 -outdir /home/abdullah/qtdeclarative /home/abdullah/qtdeclarative <srcbase> = /home/abdullah/qtdeclarative <outbase> = /home/abdullah/qtdeclarative Reading /home/abdullah/qtdeclarative/src/plugins/plugins.pro Reading /home/abdullah/qtdeclarative/src/plugins/qmltooling/qmltooling.pro Reading /home/abdullah/qtdeclarative/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro Reading /home/abdullah/qtdeclarative/src/plugins/accessible/accessible.pro Reading /home/abdullah/qtdeclarative/src/imports/imports.pro Reading /home/abdullah/qtdeclarative/src/imports/folderlistmodel/folderlistmodel.pro Reading /home/abdullah/qtdeclarative/src/imports/localstorage/localstorage.pro Reading /home/abdullah/qtdeclarative/src/imports/models/models.pro Reading /home/abdullah/qtdeclarative/src/imports/settings/settings.pro Reading /home/abdullah/qtdeclarative/src/imports/xmllistmodel/xmllistmodel.pro Reading /home/abdullah/qtdeclarative/src/qmldevtools/qmldevtools.pro Reading /home/abdullah/qtdeclarative/tools/tools.pro Reading /home/abdullah/qtdeclarative/tools/qmlmin/qmlmin.pro Reading /home/abdullah/qtdeclarative/tools/qmlimportscanner/qmlimportscanner.pro Reading /home/abdullah/qtdeclarative/tools/qml/qml.pro Reading /home/abdullah/qtdeclarative/tools/qmlprofiler/qmlprofiler.pro Reading /home/abdullah/qtdeclarative/tools/qmlbundle/qmlbundle.pro Reading /home/abdullah/qtdeclarative/examples/examples.pro Reading /home/abdullah/qtdeclarative/examples/qml/qml.pro Reading /home/abdullah/qtdeclarative/examples/qml/referenceexamples/referenceexamples.pro Reading /home/abdullah/qtdeclarative/examples/qml/referenceexamples/adding/adding.pro Reading /home/abdullah/qtdeclarative/examples/qml/referenceexamples/coercion/coercion.pro Reading /home/abdullah/qtdeclarative/examples/qml/referenceexamples/default/default.pro Reading /home/abdullah/qtdeclarative/examples/qml/referenceexamples/properties/properties.pro Reading /home/abdullah/qtdeclarative/examples/qml/referenceexamples/methods/methods.pro Reading /home/abdullah/qtdeclarative/examples/qml/referenceexamples/extended/extended.pro Reading /home/abdullah/qtdeclarative/examples/qml/shell/shell.pro Reading /home/abdullah/qtdeclarative/tests/tests.pro Reading /home/abdullah/qtdeclarative/tests/auto/auto.pro Reading /home/abdullah/qtdeclarative/tests/auto/qml/qml.pro Reading /home/abdullah/qtdeclarative/tests/auto/qml/parserstress/parserstress.pro Reading /home/abdullah/qtdeclarative/tests/auto/qml/qjsvalueiterator/qjsvalueiterator.pro Reading /home/abdullah/qtdeclarative/tests/auto/qml/qjsonbinding/qjsonbinding.pro Reading /home/abdullah/qtdeclarative/tests/auto/qml/qmlmin/qmlmin.pro Reading /home/abdullah/qtdeclarative/tests/auto/qml/qmlplugindump/qmlplugindump.pro Reading /home/abdullah/qtdeclarative/tests/auto/qml/qqmlcomponent/qqmlcomponent.pro Project ERROR: Unknown module(s) in QT: quick-private
The configuration is as follows.
./configure -release -opensource -confirm-license -device linux-apalis-g++ \ -device-option CROSS_COMPILE=~/trdx-sdk/sysroots/x86_64-angstromsdk-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi- \ -sysroot ~/trdx-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi \ -make libs -nomake tests -nomake examples -prefix /usr/local/qt5trdx -extprefix ~/trdx-sdk/qt5trdx -hostprefix ~/trdx-sdk/qt5 -v
qmake.conf file
MAKEFILE_GENERATOR = UNIX CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib include(../../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}strip COMPILER_FLAGS += -mtune=cortex-a15 -march=armv7-a -mfpu=neon-vfpv4 #modifications to gcc-base.conf QMAKE_CFLAGS += $${COMPILER_FLAGS} QMAKE_CXXFLAGS += $${COMPILER_FLAGS} QMAKE_CXXFLAGS_RELEASE += -O3 QMAKE_LIBS += -lrt -lpthread -ldl # Extra stuff (OpenGL, DirectFB, ...) QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/usr/include QMAKE_LIBDIR_EGL = $$[QT_SYSROOT]/usr/lib QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL} QMAKE_LIBDIR_OPENGL_ES2 = $${QMAKE_LIBDIR_EGL} QMAKE_INCDIR_OPENVG = $${QMAKE_INCDIR_EGL} QMAKE_LIBDIR_OPENVG = $${QMAKE_LIBDIR_EGL} QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $${QMAKE_LIBS_EGL} QMAKE_LIBS_OPENVG = -lOpenVG $${QMAKE_LIBS_EGL} DISTRO_OPTS += hard-float include(../common/linux_arm_device_post.conf) load(qt_config)
-
Hi,
There seem to be a mismatch somewhere. You are writing that you are building Qt 5.7 however you seem to try to build the module with Qt 5.3.3.
-
@SGaist
Thank you for your reply.Sorry, I got the wrong screen display.
I install modules as follows.git clone https://github.com/qt/qtdeclarative.git -b 5.7 git clone https://github.com/qt/qt5.git -b 5.7
The correct output is as follows.
abdullah@abdullah:~/qtdeclarative$ ~/apalis-sdk/qt5/bin/qmake -r Reading /home/abdullah/qtdeclarative/src/src.pro Reading /home/abdullah/qtdeclarative/src/qml/qml.pro Project MESSAGE: perl -w /home/abdullah/apalis-sdk/qt5/bin/syncqt.pl -module QtQml -version 5.7.1 -outdir /home/abdullah/qtdeclarative /home/abdullah/qtdeclarative <srcbase> = /home/abdullah/qtdeclarative <outbase> = /home/abdullah/qtdeclarative Reading /home/abdullah/qtdeclarative/src/plugins/plugins.pro Reading /home/abdullah/qtdeclarative/src/plugins/qmltooling/qmltooling.pro Reading /home/abdullah/qtdeclarative/src/plugins/qmltooling/packetprotocol/packetprotocol.pro Project MESSAGE: perl -w /home/abdullah/apalis-sdk/qt5/bin/syncqt.pl -module QtPacketProtocol -version 5.7.1 -outdir /home/abdullah/qtdeclarative /home/abdullah/qtdeclarative <srcbase> = /home/abdullah/qtdeclarative <outbase> = /home/abdullah/qtdeclarative Reading /home/abdullah/qtdeclarative/src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro Reading /home/abdullah/qtdeclarative/src/plugins/qmltooling/qmldbg_server/qmldbg_server.pro Reading /home/abdullah/qtdeclarative/src/plugins/qmltooling/qmldbg_local/qmldbg_local.pro Reading /home/abdullah/qtdeclarative/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro Reading /home/abdullah/qtdeclarative/src/plugins/qmltooling/qmldbg_debugger/qmldbg_debugger.pro Reading /home/abdullah/qtdeclarative/src/plugins/qmltooling/qmldbg_profiler/qmldbg_profiler.pro Reading /home/abdullah/qtdeclarative/src/imports/imports.pro Reading /home/abdullah/qtdeclarative/src/imports/builtins/builtins.pro Reading /home/abdullah/qtdeclarative/src/imports/qtqml/qtqml.pro Reading /home/abdullah/qtdeclarative/src/imports/folderlistmodel/folderlistmodel.pro Reading /home/abdullah/qtdeclarative/src/imports/localstorage/localstorage.pro Reading /home/abdullah/qtdeclarative/src/imports/models/models.pro Reading /home/abdullah/qtdeclarative/src/imports/settings/settings.pro Reading /home/abdullah/qtdeclarative/src/imports/statemachine/statemachine.pro Reading /home/abdullah/qtdeclarative/src/imports/xmllistmodel/xmllistmodel.pro Reading /home/abdullah/qtdeclarative/src/qmldevtools/qmldevtools.pro Project MESSAGE: perl -w /home/abdullah/apalis-sdk/qt5/bin/syncqt.pl -module QtQmlDevTools -version 5.7.1 -outdir /home/abdullah/qtdeclarative /home/abdullah/qtdeclarative <srcbase> = /home/abdullah/qtdeclarative <outbase> = /home/abdullah/qtdeclarative Reading /home/abdullah/qtdeclarative/src/qmldebug/qmldebug.pro Project MESSAGE: perl -w /home/abdullah/apalis-sdk/qt5/bin/syncqt.pl -module QtQmlDebug -version 5.7.1 -outdir /home/abdullah/qtdeclarative /home/abdullah/qtdeclarative <srcbase> = /home/abdullah/qtdeclarative <outbase> = /home/abdullah/qtdeclarative Reading /home/abdullah/qtdeclarative/tools/tools.pro Reading /home/abdullah/qtdeclarative/tools/qmlmin/qmlmin.pro Reading /home/abdullah/qtdeclarative/tools/qmlimportscanner/qmlimportscanner.pro Reading /home/abdullah/qtdeclarative/tools/qml/qml.pro Reading /home/abdullah/qtdeclarative/tools/qmllint/qmllint.pro Reading /home/abdullah/qtdeclarative/tools/qmlprofiler/qmlprofiler.pro Reading /home/abdullah/qtdeclarative/examples/examples.pro Reading /home/abdullah/qtdeclarative/examples/qml/qml.pro Reading /home/abdullah/qtdeclarative/examples/qml/referenceexamples/referenceexamples.pro Reading /home/abdullah/qtdeclarative/examples/qml/referenceexamples/adding/adding.pro Reading /home/abdullah/qtdeclarative/examples/qml/referenceexamples/coercion/coercion.pro Reading /home/abdullah/qtdeclarative/examples/qml/referenceexamples/default/default.pro Reading /home/abdullah/qtdeclarative/examples/qml/referenceexamples/properties/properties.pro Reading /home/abdullah/qtdeclarative/examples/qml/referenceexamples/methods/methods.pro Reading /home/abdullah/qtdeclarative/examples/qml/referenceexamples/extended/extended.pro Reading /home/abdullah/qtdeclarative/examples/qml/tutorials/tutorials.pro Reading /home/abdullah/qtdeclarative/examples/qml/shell/shell.pro Reading /home/abdullah/qtdeclarative/tests/tests.pro Reading /home/abdullah/qtdeclarative/tests/auto/auto.pro Reading /home/abdullah/qtdeclarative/tests/auto/qml/qml.pro Reading /home/abdullah/qtdeclarative/tests/auto/qml/parserstress/parserstress.pro Reading /home/abdullah/qtdeclarative/tests/auto/qml/qjsvalueiterator/qjsvalueiterator.pro Reading /home/abdullah/qtdeclarative/tests/auto/qml/qjsonbinding/qjsonbinding.pro Reading /home/abdullah/qtdeclarative/tests/auto/qml/qmlmin/qmlmin.pro Reading /home/abdullah/qtdeclarative/tests/auto/qml/qmlplugindump/qmlplugindump.pro Reading /home/abdullah/qtdeclarative/tests/auto/qml/qqmlcomponent/qqmlcomponent.pro Project ERROR: Unknown module(s) in QT: quick-private
-
You should clone from https://code.qt.io which is the official repository. Github is just a mirror.
Why are you cloning both Qt5 and QtDeclarative ?
-
I want to build all qt5 modules for apalis-tk1.So I cloned qt5. I use https://code.qt.io but I get the same error again.
Where is the problem? I can not find a solution.
-
qtbase qmake.conf file
-
kernel local.conf file
-
lIn the qt configuration (./configure)
local.conf file
WARN_QA_remove = "host-user-contaminated" DISTRO_FEATURES_remove = "wayland" BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}" PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}" MACHINE ?= "apalis-tk1" DL_DIR ?= "${TOPDIR}/downloads" DEPLOY_DIR = "${TOPDIR}/../deploy" PACKAGE_CLASSES ?= "package_ipk" EXTRA_IMAGE_FEATURES = "debug-tweaks package-management" USER_CLASSES ?= "buildstats image-mklibs image-prelink" PATCHRESOLVE = "noop" BB_DISKMON_DIRS = "\ STOPTASKS,${TMPDIR},1G,100K \ STOPTASKS,${DL_DIR},1G,100K \ STOPTASKS,${SSTATE_DIR},1G,100K \ ABORT,${TMPDIR},100M,1K \ ABORT,${DL_DIR},100M,1K \ ABORT,${SSTATE_DIR},100M,1K" PACKAGECONFIG_pn-qemu-native = "sdl" ASSUME_PROVIDED += "libsdl-native" CONF_VERSION = "1" INHERIT += "rm_work" INHERIT += "toradex-mirrors" DISTRO = "angstrom" IMAGE_FSTYPES += "tar.bz2" PREFERRED_PROVIDER_psplash-support = "psplash-angstrom" IMAGE_INSTALL_append = " qtbase qtbase-fonts qtbase-plugins cinematicexperience qt3d qt5-plugin-generic-vboxtouch qtcanvas3d qtcharts qtconnectivity qtdatavis3d qtdeclarative qtenginio qtgraphicaleffects qtimageformats qtlocation qtmultimedia qtquick1 qtquickcontrols2 qtquickcontrols qtscript qtsensors qtserialport qtsvg qtsystems qttools qttranslations qtvirtualkeyboard qtwebchannel qtwebkit-examples qtwebkit qtwebsockets qtxmlpatterns openssh-sftp-server gdb gdbserver" PACKAGECONFIG_FONTS_append_pn-qtbase = " fontconfig"
Qwidget works fine. Qml and quick do not work.
-
-
What do you mean by do not work, you can't build the modules or you can't run an application ?
-
@SGaist
I mean I can't build the modules. But I solved the problem.
I have set Qt mkspec as described on the link below.
http://developer.toradex.com/knowledge-base/how-to-set-up-qt-creator-to-cross-compile-for-embedded-linux#Add_KitQt mkspec :
/home/abdullah/apalis-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++
In this case, there is a new error.. I am getting the following error in Qt Creator.
10:37:58: Running steps for project quick... 10:37:58: Starting: "/home/abdullah/apalis-sdk/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/qmake" /home/abdullah/QtApp/quick/quick.pro -spec /home/abdullah/apalis-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ CONFIG+=debug CONFIG+=qml_debug 10:37:58: The process "/home/abdullah/apalis-sdk/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/qmake" exited normally. 10:37:58: Starting: "/usr/bin/make" qmake_all Makefile:677: warning: overriding commands for target `install_target' Makefile:668: warning: ignoring old commands for target `install_target' Makefile:681: warning: overriding commands for target `uninstall_target' Makefile:672: warning: ignoring old commands for target `uninstall_target' make: Nothing to be done for `qmake_all'. 10:37:58: The process "/usr/bin/make" exited normally. 10:37:58: Starting: "/usr/bin/make" Makefile:677: warning: overriding commands for target `install_target' Makefile:668: warning: ignoring old commands for target `install_target' Makefile:681: warning: overriding commands for target `uninstall_target' Makefile:672: warning: ignoring old commands for target `uninstall_target' o quick main.o qrc_qml.o -L/home/abdullah/apalis-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib -lQt5Quick -L/home/abdullah/apalis/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/arm-linux-gnueabihf/tegra -L/home/abdullah/apalis/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lrt -ldl -lGL -lpthread make: o: Command not found make: [quick] Error 127 (ignored) 10:37:58: The process "/usr/bin/make" exited normally. 10:37:58: Connecting to device... 10:37:58: The remote file system has 14121 megabytes of free space, going ahead. 10:37:58: Deploy step finished. 10:37:58: Uploading file "/home/abdullah/QtApp/build-quick-Toradex-Debug/quick"... 10:37:58: Failed to upload file "/home/abdullah/QtApp/build-quick-Toradex-Debug/quick": Could not open for reading. 10:37:58: Deploy step failed. Error while building/deploying project quick (kit: Toradex) When executing step "Upload files via SFTP" 10:37:58: Elapsed time: 00:00.
-
Looks like your mkspec contains an error since you just have o rather linux-oe-g++.