12-13-2018 01:08 PM
I have been trying to build qt 5.11.1 manually using the Xilinx SDK 2018.2 linux-aarch64-gnu-g++ toolchain. But end up with an internal compiler error:
In file included from items/qquickitem_p.h:64:0,
from items/qquickwindow.cpp:45:
items/qquickclipnode_p.h:57:30: error: comdat-local function called by void QQuickWindowIncubationController::incubate() outside its comdat
class Q_QUICK_PRIVATE_EXPORT QQuickDefaultClipNode : public QSGClipNode
^~~~~~~~~~~~~~~~~~~~~
_ZN32QQuickWindowIncubationController28incubatingObjectCountChangedEi.part.89/22535 (virtual void QQuickWindowIncubationController::incubatingObjectCountChanged(int)) @0x100978d580
Type: function definition analyzed
Visibility: comdat_group:_ZN32QQuickWindowIncubationController28incubatingObjectCountChangedEi artificial
Same comdat group as: _ZN32QQuickWindowIncubationController28incubatingObjectCountChangedEi/13415
References:
Referring:
Availability: local
First run: 1
Function flags: body local icf_merged split_part
Called by: _ZN32QQuickWindowIncubationController8incubateEv.part.90/22536 (1.00 per call) _ZN32QQuickWindowIncubationController28incubatingObjectCountChangedEi/13415 (0.24 per call)
Calls: _ZN7QObject10startTimerEiN2Qt9TimerTypeE/21768 (0.37 per call)
items/qquickclipnode_p.h:57:30: internal compiler error: verify_cgraph_node failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.linaro.org> for instructions.
Makefile:72748: recipe for target '.obj/qquickwindow.o' failed
make[3]: *** [.obj/qquickwindow.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/home/xilinx/Projects/qt-everywhere-src-5.11.1/qtdeclarative/src/quick'
Makefile:94: recipe for target 'sub-quick-make_first-ordered' failed
make[2]: *** [sub-quick-make_first-ordered] Error 2
make[2]: Leaving directory '/home/xilinx/Projects/qt-everywhere-src-5.11.1/qtdeclarative/src'
Makefile:47: recipe for target 'sub-src-make_first' failed
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory '/home/xilinx/Projects/qt-everywhere-src-5.11.1/qtdeclarative'
Makefile:360: recipe for target 'module-qtdeclarative-make_first' failed
make: *** [module-qtdeclarative-make_first] Error 2
Here is my environment setup
export CROSS_COMPILE=aarch64-linux-gnu-
export PATH=/opt/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/bin/:$PATH
export ZYNQ_QT_BUILD=/home/xilinx/Projects/QT/build
export ZYNQ_QT_INSTALL=/home/xilinx/Projects/QT/install
export PATH=$ZYNQ_QT_INSTALL/bin:$PATH
and the configure options are as follows,
./configure -xplatform linux-aarch64-gnu-g++ -opensource -confirm-license -nomake examples -verbose -no-opengl -sysroot /home/xilinx/Projects/xilinx-ultra96-reva-2018.2/images/linux/sdk/sysroots/aarch64-xilinx-linux -prefix $ZYNQ_QT_INSTALL
Can anyone kindly point me in the right direction to get this build working?
05-15-2019 01:51 PM
Hello,
I got side tracked for a while but I gave it another try. This time with Petalinux 2018.3 toolchain and QT 5.12.3 sources. This worked for me:
my mkspecs file looks like this:
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
QMAKE_CC = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-gcc
QMAKE_CXX = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-g++
QMAKE_LINK = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-g++
QMAKE_LINK_SHLIB = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-g++
# modifications to linux.conf
QMAKE_AR = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-ar cqs
QMAKE_OBJCOPY = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-objcopy
QMAKE_NM = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-nm -P
QMAKE_STRIP = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-strip
load(qt_config)
My configuration:
export CROSS_COMPILE=aarch64-linux-gnu- export PATH=/opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/:$PATH export ZYNQ_QT_BUILD=/home/xilinx/Projects/QT/build export ZYNQ_QT_INSTALL=/home/xilinx/Projects/QT/install export PATH=$ZYNQ_QT_INSTALL/bin:$PATH
./configure -v -xplatform linux-aarch64-gnu-g++ -opensource -confirm-license -nomake examples -skip qtactiveqt -skip qtandroidextras -skip qtimageformats -skip qtmacextras -skip qtserialport -skip qtx11extras -skip qtxmlpatterns -skip qtconnectivity -skip qtdoc -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia -skip qtsensors -skip qttools -skip qttranslations -skip qtwebchannel -skip qtwebsockets -skip qtwinextras -verbose -no-gif -no-libjpeg -no-mtdev -no-sql-db2 -qt-freetype -no-fontconfig -no-harfbuzz -no-xcb-xlib -no-cups -no-iconv -no-icu -no-openssl -no-opengl -prefix $ZYNQ_QT_INSTALL
gmake gmake install
Hope this helps.
-Harsha
12-18-2018 02:22 AM
Hi @harsha103
I never built QT myself so not have too much experience with it but from the error message is not clear for me if the issue reports a compilation issue (either code, configuration....) or is related to the toolchain issue. To be honest I think you might have more feedback on QT support channels than Xilinx ones for this particular issue.
Regards
01-30-2019 02:29 AM
hi
i got the same problem when i try to build qt source
did you fixed the problem?
03-29-2019 01:47 AM
I have the same problem, building Qt 5.12.2 from source using Xilinx 2018.2 aarch64-linux-gnu
Have anyone found a fix for this?
05-15-2019 01:51 PM
Hello,
I got side tracked for a while but I gave it another try. This time with Petalinux 2018.3 toolchain and QT 5.12.3 sources. This worked for me:
my mkspecs file looks like this:
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
QMAKE_CC = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-gcc
QMAKE_CXX = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-g++
QMAKE_LINK = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-g++
QMAKE_LINK_SHLIB = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-g++
# modifications to linux.conf
QMAKE_AR = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-ar cqs
QMAKE_OBJCOPY = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-objcopy
QMAKE_NM = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-nm -P
QMAKE_STRIP = /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-strip
load(qt_config)
My configuration:
export CROSS_COMPILE=aarch64-linux-gnu- export PATH=/opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/:$PATH export ZYNQ_QT_BUILD=/home/xilinx/Projects/QT/build export ZYNQ_QT_INSTALL=/home/xilinx/Projects/QT/install export PATH=$ZYNQ_QT_INSTALL/bin:$PATH
./configure -v -xplatform linux-aarch64-gnu-g++ -opensource -confirm-license -nomake examples -skip qtactiveqt -skip qtandroidextras -skip qtimageformats -skip qtmacextras -skip qtserialport -skip qtx11extras -skip qtxmlpatterns -skip qtconnectivity -skip qtdoc -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia -skip qtsensors -skip qttools -skip qttranslations -skip qtwebchannel -skip qtwebsockets -skip qtwinextras -verbose -no-gif -no-libjpeg -no-mtdev -no-sql-db2 -qt-freetype -no-fontconfig -no-harfbuzz -no-xcb-xlib -no-cups -no-iconv -no-icu -no-openssl -no-opengl -prefix $ZYNQ_QT_INSTALL
gmake gmake install
Hope this helps.
-Harsha
05-27-2019 11:59 PM
Hi,
I had problems to cross compile Qt5.12.2 with the petalinux 2018.2 installed cross compilers:
Finally it is working with an installation of gcc 7.3.1
Qt without X11, mali support fbdev
Create in qt installation folder ...5.12.2/qt-everwhere-src-5.12.2/qtbase/mkspecs/devices a new folder 'linux-US-g++' with following 2 files:
platformdefs.h
#include "../../linux-g++/qplatformdefs.h"
qmake.conf
# # qmake configuration for linux-g++ using the $${CROSS_COMPILE}g++ crosscompiler for Ultrascale+ # include(../common/linux_device_pre.conf) # modifications to g++.conf COMPILERFLAGS = -march=armv8-a -mcpu=cortex-a53 -mtune=cortex-a53 QMAKE_CFLAGS = $${COMPILERFLAGS} QMAKE_CXXFLAGS = $${COMPILERFLAGS} DISTRO_OPTS += aarch64 QMAKE_LIBS_EGL += -lEGL QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL # Preferred eglfs backend EGLFS_DEVICE_INTEGRATION = eglfs_mali include(../common/linux_arm_device_post.conf) load(qt_config)
Create a buildscript, must be placed in ..5.12.2/qt-everwhere-src-5.12.2/
QT_VERSION=5.12.2
# aarch64-linux-gnu-gcc Version 7.3.1: CROSS_COMPILE_PATH=/home/user/gcc/aarch64/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin
export CROSS_COMPILE=aarch64-linux-gnu- DEVICE=linux-US-g++ SYSROOT=/home/user/PetaLinuxBSPs/ZCU104/xilinx-zcu104-2018.2/images/linux/sdk/sysroots/aarch64-xilinx-linux PREFIX="/opt/QtEmbedded-ARM" export ARCH=aarch64 PWD=$(pwd) SOURCE_FOLDER=$(pwd) cd ../ BUILD_FOLDER=$(pwd) cd - QT_SOURCE_FILENAME="qt-everywhere-src-$QT_VERSION" export PATH=$CROSS_COMPILE_PATH:$SYSROOT:$PATH SHADOW_BUILD_FOLDER="qt-build" cd .. rm -rf $SHADOW_BUILD_FOLDER mkdir -p $SHADOW_BUILD_FOLDER cd $SHADOW_BUILD_FOLDER CONFIGURE_COMMAND=" -device $DEVICE \ -sysroot $SYSROOT \ -device-option CROSS_COMPILE=$CROSS_COMPILE \ -opensource \ -confirm-license \ -prefix $PREFIX \ -release \ -no-use-gold-linker \ -shared \ -silent \ -no-pch \ -no-rpath \ -pkg-config \ -accessibility \ -cups \ -dbus \ -no-directfb \ -eglfs \ -evdev \ -fontconfig \ -system-freetype \ -no-gbm \ -no-gif \ -opengl desktop \ -opengl es2 \ -no-glib \ -no-gtk \ -no-harfbuzz \ -no-ico \ -no-iconv \ -no-icu \ -no-journald \ -system-libjpeg \ -no-kms \ -libinput \ -system-libpng \ -no-libproxy \ -make libs \ -linuxfb \ -mtdev \ -openssl \ -qt-pcre \ -no-sm \ -c++std c++11 \ -no-sql-db2 \ -no-sql-ibase \ -no-sql-mysql \ -no-sql-oci \ -no-sql-odbc \ -no-sql-psql \ -no-sql-sqlite \ -no-sql-sqlite2 \ -no-sql-tds \ -nomake tests \ -no-tslib \ -libudev \ -widgets \ -no-xcb \ -nomake examples \ -system-zlib \ -skip qt3d \ -skip qtcharts \ -skip qtcanvas3d \ -skip qtactiveqt \ -skip qtandroidextras \ -skip qtconnectivity \ -skip qtdatavis3d \ -skip qtdoc \ -skip qtgraphicaleffects \ -skip qtlocation \ -skip qtnetworkauth \ -skip qtmacextras \ -skip qtsensors \ -skip qttools \ -skip qttranslations \ -skip qtpurchasing \ -skip qtqa \ -skip qtquickcontrols \ -skip qtquickcontrols2 \ -skip qtremoteobjects \ -skip qtspeech \ -skip qtvirtualkeyboard \ -skip qtwayland \ -skip qtwebchannel \ -skip qtwebengine \ -skip qtwebview \ -skip qtwinextras \ -skip qtx11extras \ -L${SYSROOT}/usr/lib \ -I${SYSROOT}/usr/include \ -qml-debug \ -verbose" ../$QT_SOURCE_FILENAME/configure $CONFIGURE_COMMAND make make install echo "Adapt read permissions (otherwise problems mit mkspecs/devices/linux../qmake.conf" cd $SYSROOT/$PREFIX chmod -R +r * cd - echo "+++++++++++++++++++++++++++++++++++++++++++++" echo "Qt successfully build" echo "Qt installed in $SYSROOT/$PREFIX" echo "+++++++++++++++++++++++++++++++++++++++++++++"
Execute buildscript, extract the $SYSROOT/opt/QtEmbedded-ARM content in a tar.gz, pass it to the target and install it in the same folder /opt/QtEmbedded-ARM
Build QT app:
Create a profile script with following content
echo "Using Qt 5.12.2 with aarch64-linux compiler" QT_PATH=opt/QtEmbedded-ARM CROSS_COMPILE_PATH=/home/user/gcc/aarch64/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin CROSS_COMPILE=aarch64-linux-gnu- SYSROOT=/home/user/PetaLinuxBSPs/ZCU104/xilinx-zcu104-2018.2/images/linux/sdk/sysroots/aarch64-xilinx-linux #+++++++++++++++++++++++++++++++++++++++++++++++++++ #+++++++++++++++++++++++++++++++++++++++++++++++++++ # Setting path with cross compiler and Qt path: PATH=$CROSS_COMPILE_PATH:$SYSROOT:$SYSROOT/$QT_PATH/bin:$PATH #+++++++++++++++++++++++++++++++++++++++++++++++++++ # Export all variables export CROSS_COMPILE export PATH export SYSROOT # Set ARCH to aarch64 if not yet done [ -z $ARCH ] && export ARCH=aarch64 qmake -v ${CROSS_COMPILE}gcc -v
source the profile file
and build your qt application
To start the application on the target you have to add this in a start script
export LD_LIBRARY_PATH=/opt/QtEmbedded-ARM/lib export QT_QPA_PLATFORM=eglfs export QT_QPA_EGLFS_FB=/dev/fb0 export QT_QPA_EGLFS_INTEGRATION=eglfs_mali ./appname
Hope this helps somebody
H.
07-31-2019 08:21 AM
Hi,
when i followed your steps to quild the Qmake with Xilinx provided rootfs in https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841937/Zynq+UltraScale+MPSoC+Ubuntu+part+2+-+Building+and+Running+the+Ubuntu+Desktop+From+Sources
i got the below errors
Good you please help me with this
Thanks for your help
08-01-2019 05:44 AM
Hi,
seems that something is messy with your sysroots which seems to be located here: /home/quest/Sharafali/Qt_ZCU104/rootfs
1) Check if this is really the correct sysroot containing all libraries for the target (libudev...., libz..., etc.)
2) Maybe a better way is to start from scratch with a provided BSP (for ZCU102, ZCU104,...boards) from Xilinx. Here the sysroot must be populated in following manner: (This is working with PetaLinux 2018.2)
Create a petalinux-user-image.bbappend:
touch /home/user/PetaLinuxBSPs/ZCU104/xilinx-zcu104-v2018.2/project-spec/meta-user/recipes-core/images/petalinux-user-image.bbappend
with following content:
inherit populate_sdk
Info:this will generate a script that will install all parts
Then do a
petalinux-build petalinux-build --sdk
petalinux-package --sysroot
Finding the sysroot in following folder
/home/user/PetaLinuxBSPs/ZCU104/Xilinx-zcu104-2018.2/images/linux/sdk/sysroots/aarch64-xilinx-linux
With this sysroot the QT build should work properly.
Regards,
H.
08-07-2019 09:25 AM
Thank you....it work for me...