IMX6 Cross Compilation - Failed to process makespec
I have been having a problem cross compiling Qt 5.3.2 from source targeting an IMX6 quad processor. I am using Yocto with 1.7.1 SDK for development. Here is my ./configure:
./configure -device linux-imx6-g++ -arch arm -release -opengl es2 -device-option CROSS_COMPILE=/opt/poky/1.7.1/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi- -sysroot /opt/poky/1.7.1/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi -prefix ~/Desktop/qt_test -v -no-gcc-sysroot
The error is as shown after a file minutes of compilation:
.. .. .o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o qlogging.o qjson.o qjsondocument.o qjsonparser.o qjsonarray.o qjsonobject.o qjsonvalue.o qfilesystemengine_unix.o qfilesystemiterator_unix.o qfsfileengine_unix.o qlocale_unix.o -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--gc-sections Running configuration tests... Failed to process makespec for platform 'devices/linux-imx6-g++' /opt/Qt5.3.2/SDK/qt-everywhere-opensource-src-5.3.2/qtbase/bin/qmake: 1: /opt/Qt5.3.2/SDK/qt-everywhere-opensource-src-5.3.2/qtbase/bin/qmake: Syntax error: word unexpected (expecting ")")*
Here is also my environment that I source just prior to running ./configure: http://pastebin.com/sPbj61di
It looks like the problem is caused by an incorrect qmake executable being created at
qtbase/bin/qmake. Any ideas on how to solve this elusive error?
Might be silly question but did you modify the mkspec file ?
Nope, but I was able to solve the problem by using Yocto to bitbake the image instead of cross compiling manually.
Then it'll stay a mystery...
Well, I'm back at it trying to get this to work again with Qt 5.5.0 release. I still arrive at the same error using the identical configure statement and environment path.
The changelog for 5.5.0 states:
EGLFS has a plugin-based backend mechanism in addition to the existing, statically compiled-in solution. Most compiled-in hooks are converted to be dynamically loaded plugins that are built based on configure time tests. This reduces the reliance on the device makespecs for RPi, i.MX6 and Mali-based devices.
Which can probably explain why much of the code in the /mkspecs/devices/linux-imx6-g++/qmake.conf file has been omitted. Here is the new qmake.conf
# qmake configuration for the Freescale iMX6 boards (single, dual and quad) include(../common/linux_device_pre.conf) QMAKE_LIBS_EGL += -lEGL QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL -lGAL QMAKE_LIBS_OPENVG += -lOpenVG -lEGL -lGAL IMX6_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 QMAKE_CFLAGS += $$IMX6_CFLAGS QMAKE_CXXFLAGS += $$IMX6_CFLAGS DISTRO_OPTS += hard-float # Preferred eglfs backend EGLFS_DEVICE_INTEGRATION = eglfs_viv include(../common/linux_arm_device_post.conf) load(qt_config)
I still can't seem to find why this does not build correctly. Any thoughts?
Did you check Yocto's configuration/Qt patching ?
Looking in qtbase.inc, I see 11 patches that are applied. This is maybe why Qt is unable to configure itself properly. I've been trying to bitbake the SDK now statically inside of Yocto without any luck thus far.
Where is the static build failing ?
justin1122 last edited by justin1122
The static build is failing inside of Yocto. All I have done to get this to fail is to change
$ bitbake meta-toolchain-qt5. Building Qt dynamically will successfully create the SDK, but not statically.
I have found someone with the exact same problem here. The plugin lib directory path is incorrect and has the cross compile prefix omitted causing problems finding the necessary libraries.
I've posted my build environment and error output here.