Cross compiling QT 5.11 for ARM - no device matching $MKSPEC
-
Hi there,
I am trying to compile QT for an arm board which I have on my desk. However, I am unable to configure it. After reading some tutorials I came up with the following configure command:
../configure -release -no-gui -device arm-gad-linux-gnueabi-g++ -device-option CROSS_COMPILE=/home/johndoe/opt/gad/R9.0/sysroots/x86_64-gadsdk-linux/usr/bin/arm-gad-linux-gnueabi/arm-gad-linux-gnueabi- -sysroot /home/johndoe/opt/gad/R9.0/sysroots/cortexa9hf-vfp-neon-gad-linux-gnueabi -prefix /home/johndoe/usr/local/qt5
I copied the mkspec for
linux-arm-gnueabi-g++
to a new directoryarm-gad-linux-gnueabi-g++
and adjusted the config:MAKEFILE_GENERATOR = UNIX CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib include(../common/linux.conf) include(../common/gcc-base-unix.conf) include(../common/g++-unix.conf) # modifications to g++.conf #arm-gad-linux-gnueabi QMAKE_CC = arm-gad-linux-gnueabi-gcc QMAKE_CXX = arm-gad-linux-gnueabi-g++ QMAKE_LINK = arm-gad-linux-gnueabi-g++ QMAKE_LINK_SHLIB = arm-gad-linux-gnueabi-g++ # modifications to linux.conf QMAKE_AR = arm-gad-linux-gnueabi-ar cqs QMAKE_OBJCOPY = arm-gad-linux-gnueabi-objcopy QMAKE_NM = arm-gad-linux-gnueabi-nm -P QMAKE_STRIP = arm-gad-linux-gnueabi-strip load(qt_config)
However, when I try to configure, this is what the output looks like:
johndoe@e655ff6124da:~/opt/resources/qt-5.11/qt-everywhere-src-5.11.0/build$ ./build.sh + cd qtbase + /home/johndoe/opt/resources/qt-5.11/qt-everywhere-src-5.11.0/qtbase/configure -top-level -release -no-gui -device arm-gad-linux-gnueabi-g++ -device-option CROSS_COMPILE=/home/johndoe/opt/gad/R9.0/sysroots/x86_64-gadsdk-linux/usr/bin/arm-gad-linux-gnueabi/arm-gad-linux-gnueabi- -sysroot /home/johndoe/opt/gad/R9.0/sysroots/cortexa9hf-vfp-neon-gad-linux-gnueabi -prefix /home/johndoe/usr/local/qt5 Preparing build tree... Creating qmake... .Done. ERROR: No device matching 'arm-gad-linux-gnueabi-g++'.
I use a docker container as a build environment where I usually compile my c++ code using plain old makefiles.
The environment looks like this:
johndoe@e655ff6124da:~/opt/resources/qt-5.11/qt-everywhere-src-5.11.0/build$ env AS=arm-gad-linux-gnueabi-as OECORE_TARGET_SYSROOT=/home/johndoe/opt/gad/R9.0/sysroots/cortexa9hf-vfp-neon-gad-linux-gnueabi AR=arm-gad-linux-gnueabi-ar LDFLAGS=-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed TARGET_PREFIX=arm-gad-linux-gnueabi- HOSTNAME=e655ff6124da M4=m4 TERM=xterm NM=arm-gad-linux-gnueabi-nm CPPFLAGS= OECORE_DISTRO_VERSION=1.0.0 GDB=arm-gad-linux-gnueabi-gdb OECORE_SDK_VERSION=1.0.0 LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: PKG_CONFIG_SYSROOT_DIR=/home/johndoe/opt/gad/R9.0/sysroots/cortexa9hf-vfp-neon-gad-linux-gnueabi CONFIG_SITE=/home/johndoe/opt/gad/R9.0/site-config-cortexa9hf-vfp-neon-gad-linux-gnueabi CXXFLAGS= -O2 -pipe -g -feliminate-unused-debug-types CPP=arm-gad-linux-gnueabi-gcc -E -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/home/johndoe/opt/gad/R9.0/sysroots/cortexa9hf-vfp-neon-gad-linux-gnueabi PATH=/home/johndoe/opt/gad/R9.0/sysroots/x86_64-gadsdk-linux/usr/bin:/home/johndoe/opt/gad/R9.0/sysroots/x86_64-gadsdk-linux/usr/bin/arm-gad-linux-gnueabi:/home/johndoe/opt/python-virtual/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin LD=arm-gad-linux-gnueabi-ld --sysroot=/home/johndoe/opt/gad/R9.0/sysroots/cortexa9hf-vfp-neon-gad-linux-gnueabi PWD=/home/johndoe/opt/resources/qt-5.11/qt-everywhere-src-5.11.0/build STRIP=arm-gad-linux-gnueabi-strip LANG=C.UTF-8 OECORE_NATIVE_SYSROOT=/home/johndoe/opt/gad/R9.0/sysroots/x86_64-gadsdk-linux PYTHONHOME=/home/johndoe/opt/gad/R9.0/sysroots/x86_64-gadsdk-linux/usr CONFIGURE_FLAGS=--target=arm-gad-linux-gnueabi --host=arm-gad-linux-gnueabi --build=x86_64-linux --with-libtool-sysroot=/home/johndoe/opt/gad/R9.0/sysroots/cortexa9hf-vfp-neon-gad-linux-gnueabi CXX=arm-gad-linux-gnueabi-g++ -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/home/johndoe/opt/gad/R9.0/sysroots/cortexa9hf-vfp-neon-gad-linux-gnueabi OBJCOPY=arm-gad-linux-gnueabi-objcopy HOME=/home/johndoe SHLVL=2 CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types DEBIAN_FRONTEND=noninteractive OECORE_ACLOCAL_OPTS=-I /home/johndoe/opt/gad/R9.0/sysroots/x86_64-gadsdk-linux/usr/share/aclocal PKG_CONFIG_PATH=/home/johndoe/opt/gad/R9.0/sysroots/cortexa9hf-vfp-neon-gad-linux-gnueabi/usr/lib/pkgconfig RANLIB=arm-gad-linux-gnueabi-ranlib ARCH=arm CC=arm-gad-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/home/johndoe/opt/gad/R9.0/sysroots/cortexa9hf-vfp-neon-gad-linux-gnueabi CROSS_COMPILE=arm-gad-linux-gnueabi- OBJDUMP=arm-gad-linux-gnueabi-objdump SDKTARGETSYSROOT=/home/johndoe/opt/gad/R9.0/sysroots/cortexa9hf-vfp-neon-gad-linux-gnueabi _=/usr/bin/env OLDPWD=/home/johndoe/opt/resources/qt-5.11/qt-everywhere-src-5.11.0
Any hints what I am doing wrong? Please ask for additional information if required.
Thanks in advance
Jochen
-
Hi,
From what you wrote you copied a "top level" mkspec in the same folder. The device related mkspecs are under the
devices
folder.