Skip to main content
Visitor II
May 11, 2021
Solved

Qt SDK build failed

  • May 11, 2021
  • 6 replies
  • 5337 views

Hi All -

I was attempting to build the Qt example images for the DK2, following the wiki directions here:

https://wiki.st.com/stm32mpu/wiki/How_to_build_and_use_an_SDK_for_QT

I got to the step where it's building the SDK, after compiling the image successfully.

PC $> bitbake st-example-image-qt -c populate_sdk

And got a compile error:

arm-ostl-linux-gnueabi/9.3.0/ld: .obj/moc_qgeotiledmaplabs_p.o:(.data.rel.ro+0x70): undefined reference to `QGeoTiledMap::setCopyrightVisible(bool)'

| /home/mtd/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/qtlocation/5.14.2+gitAUTOINC+feb604c326_d9577fdebe-r0/recipe-sysroot-native/usr/bin/arm-ostl-linux-gnueabi/../../libexec/arm-ostl-linux-gnueabi/gcc/arm-ostl-linux-gnueabi/9.3.0/ld: .obj/moc_qgeotiledmaplabs_p.o:(.data.rel.ro+0x80): undefined reference to `QGeoTiledMap::clearScene(int)'

| /home/mtd/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/qtlocation/5.14.2+gitAUTOINC+feb604c326_d9577fdebe-r0/recipe-sysroot-native/usr/bin/arm-ostl-linux-gnueabi/../../libexec/arm-ostl-linux-gnueabi/gcc/arm-ostl-linux-gnueabi/9.3.0/ld: .obj/moc_qgeotiledmaplabs_p.o:(.data.rel.ro+0x84): undefined reference to `QGeoTiledMap::evaluateCopyrights(QSet<QGeoTileSpec> const&)'

| collect2: error: ld returned 1 exit status

| make[2]: *** [Makefile:774: ../../lib/libQt5Location.so.5.14.2] Error 1

| make[2]: Leaving directory '/home/mtd/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/qtlocation/5.14.2+gitAUTOINC+feb604c326_d9577fdebe-r0/build/src/location'

| make[1]: *** [Makefile:181: sub-location-make_first] Error 2

| make[1]: Leaving directory '/home/mtd/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/qtlocation/5.14.2+gitAUTOINC+feb604c326_d9577fdebe-r0/build/src'

| make: *** [Makefile:49: sub-src-make_first] Error 2

| WARNING: exit code 1 from a shell command.

And this summary:

Summary: 1 task failed:

 /home/mtd/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/layers/meta-qt5/recipes-qt/qt5/qtlocation_git.bb:do_compile

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Help?

    This topic has been closed for replies.
    Best answer by dubujian

    Hi @Jean-Marc B(ST Employee)

    Like the previous error, the error mentioned in the recipe qt3d is related to some "undefined reference". 

    I ran the following command: 

    $ bitbake -c cleansstate qt3d 

    $ bitbake qt3d 

    error still exists. 

    My build started in a brand new environment, and I can't determine the "bad" items in the Yocto cache.

    At present, I completely replaced the original build environment, used virtualbox6.1.26, and downloaded the VDI file Ubuntu 20.04.2 (64bit)VDI from osboxes.org according to "PC prerequisites." in the wiki.

    Both $bitbake st-example-image-qt and $bitbake st-example-image-qt -c populate_sdk were executed successfully. 

    PC $> bitbake st-example-image-qt is executed successfully. 

    PC $> bitbake st-example-image-qt -c populate_sdk is executed successfully.

    Very happy and thank you for communicating with you a few days ago.

    6 replies

    ST Employee
    May 12, 2021

    Hi @MMedv​ 

    Sorry but I can not reproduce your errors on my machine.

    Did you check the prerequisites as exposed in wiki page related to the PC prerequisites and get all the necessary packages? What is your host distribution and its version?

    Best regards,

    --JM

    MMedvAuthor
    Visitor II
    May 12, 2021

    @Jean-Marc B​  -

    I did perform all the steps listed in PC prerequisities. Running Kubuntu 20.04 in VMWare Workstation 15.5.7. The weird thing is that I ran the bitbake before the one with -c populate_sdk and it ran to completion (took HOURS though).

    Is there a log file I can attach that would be helpful? You can see I'm attempting to build 3.0.0 w/ 5.10. If it would be easier to do a zoom call or something, let me know. My company is already an ST customer.

    M

    Visitor II
    August 16, 2021

    I encountered the same error:(Ubuntu20.04)

    PC $> bitbake st-example-image-qt -c populate_sdk

    Summary: 1 task failed:

     /home/mtd/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/layers/meta-qt5/recipes-qt/qt5/qtlocation_git.bb:do_compile

    Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

    help?

    ST Employee
    August 17, 2021

    Hi @枭 陈​ 

    Could you attach the log that shows the 2 errors please? Are the same compiler errors as exposed in the first post?

    In MMedv's case, it seems there was a mismatch between several configurations. May it be the case in your configuration?

    Best regards

    --JM

    Visitor II
    August 17, 2021

    Hi @Jean-Marc B , This is the log of my operation:

    DISTRO=openstlinux-eglfs MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh

    bitbake st-example-image-qt -c populate_sdk

    Initialising tasks: 100% |#########################################################################################################################################################################################################################################| Time: 0:00:07

    Sstate summary: Wanted 325 Found 318 Missed 7 Current 1994 (97% match, 99% complete)

    NOTE: Executing Tasks

    ERROR: qtconnectivity-5.14.2+gitAUTOINC+b445ea4ff2-r0 do_compile: oe_runmake failed

    ERROR: qtconnectivity-5.14.2+gitAUTOINC+b445ea4ff2-r0 do_compile: Execution of '/home/cx/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxeglfs-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/qtconnectivity/5.14.2+gitAUTOINC+b445ea4ff2-r0/temp/run.do_compile.2711' failed with exit code 1:

    cd src/ && ( test -e Makefile || /home/cx/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxeglfs-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/qtconnectivity/5.14.2+gitAUTOINC+b445ea4ff2-r0/recipe-sysroot-native/usr/bin/qmake -o Makefile /home/cx/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxeglfs-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/qtconnectivity/5.14.2+gitAUTOINC+b445ea4ff2-r0/git/src/src.pro QT_BUILD_PARTS-=examples QT_BUILD_PARTS-=tests ) && make -f Makefile 

    make[1]: Entering directory '/home/cx/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxeglfs-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/qtconnectivity/5.14.2+gitAUTOINC+b445ea4ff2-r0/build/src'

    cd bluetooth/ && ( test -e Makefile || /home/cx/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxeglfs-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/qtconnectivity/5.14.2+gitAUTOINC+b445ea4ff2-r0/recipe-sysroot-native/usr/bin/qmake -o Makefile /home/cx/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxeglfs-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/qtconnectivity/5.14.2+gitAUTOINC+b445ea4ff2-r0/git/src/bluetooth/bluetooth.pro QT_BUILD_PARTS-=examples QT_BUILD_PARTS-=tests ) && make -f Makefile 

    cd nfc/ && ( test -e Makefile || /home/cx/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxeglfs-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/qtconnectivity/5.14.2+gitAUTOINC+b445ea4ff2-r0/recipe-sysroot-native/usr/bin/qmake -o Makefile /home/cx/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxeglfs-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/qtconnectivity/5.14.2+gitAUTOINC+b445ea4ff2-r0/git/src/nfc/nfc.pro QT_BUILD_PARTS-=examples QT_BUILD_PARTS-=tests ) && make -f Makefile 

    make[2]: Entering directory '/home/cx/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxeglfs-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/qtconnectivity/5.14.2+gitAUTOINC+b445ea4ff2-r0/build/src/nfc'

    rm -f libQt5Nfc.so.5.14.2 libQt5Nfc.so libQt5Nfc.so.5 libQt5Nfc.so.5.14

    linking ../../lib/libQt5Nfc.so.5.14.2

    make[2]: Entering directory '/home/cx/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxeglfs-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/qtconnectivity/5.14.2+gitAUTOINC+b445ea4ff2-r0/build/src/bluetooth'

    rm -f libQt5Bluetooth.so.5.14.2 libQt5Bluetooth.so libQt5Bluetooth.so.5 libQt5Bluetooth.so.5.14

    linking ../../lib/libQt5Bluetooth.so.5.14.2

    ……​

    ERROR: Task (/home/cx/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/layers/meta-qt5/recipes-qt/qt5/qtcharts_git.bb:do_compile) failed with exit code '1'

    NOTE: Tasks Summary: Attempted 6448 tasks of which 6446 didn't need to be rerun and 2 failed.

    NOTE: Writing buildhistory

    NOTE: Writing buildhistory took: 35 seconds

    Summary: 2 tasks failed:

     /home/cx/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/layers/meta-qt5/recipes-qt/qt5/qtconnectivity_git.bb:do_compile

     /home/cx/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/layers/meta-qt5/recipes-qt/qt5/qtcharts_git.bb:do_compile

    Summary: There were 4 ERROR messages shown, returning a non-zero exit code.

    ST Employee
    August 17, 2021

    Hi @枭 陈​ 

    I don't see any compilation or link errors in your log. I think the log output is cut (the ……​ in your previous post) and that hides the interesting messages.

    Could you make another attempt please by attaching the log output (use the paper clip symbol available when writing a reply).

    Best regards,

    --JM

    Visitor II
    August 17, 2021

    Hi @Jean-Marc B

    I rebuilt the SDK and recorded all build logs。

    ST Employee
    August 18, 2021

    Hello @枭 陈​ 

    I can't explain the many «undefined references» from your output log. I just make an attempt on a machine running ubuntu 18 and the following commands:

    $ rm -rf build-openstlinuxeglfs-stm32mp1
    $ DISTRO=openstlinux-eglfs MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
    $ bitbake qtconnectivity
    $ bitbake qtcharts

    Both recipes are successfully built.

    Could you give me your OS environment please?

    Could you try to re-do the whole process from scratch so the bitbake cache is empty? I suspect a mismatch between versions in Yocto cache.

    Best regards,

    --JM

    Visitor II
    August 18, 2021

    Hi @Jean-Marc B(ST Employee)

    My host uses a virtual machine environment built by VMware, as follows:

    Windows 10, 64-bit :Intel(R) Core(TM) i9-10850K CPU @ 3.60GHz  3.60 GHz, RAM 16.0 GB

    VMware® Workstation 15 Pro 15.5.0 + ubuntu-20.04.2.0(CPU:4*2, RAM:8G)

    I am trying:

    $ rm -rf build-openstlinuxeglfs-stm32mp1

    $ DISTRO=openstlinux-eglfs MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh

    $ bitbake qtconnectivity

    $ bitbake qtcharts

    and

    Both $ bitbake qtconnectivity and $ bitbake qtcharts executed successfully.

    So I continue to execute:

    PC $> bitbake st-example-image-qt is executed successfully.

    Then I execute:

    PC $> bitbake st-example-image-qt -c populate_sdk

    Currently still under construction, the following error has occurred:

    ERROR: Task (virtual:native:/home/cx/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/layers/meta-qt5/recipes-qt/qt5/qt3d_git.bb:do_compile) failed with exit code '1'

    I execute :

    $ bitbake qt3d

    Error still exists。

    I want to know your build environment, whether it is the linux host or the linux environment on the virtual machine, and the corresponding version, I will use it as a reference.Or can you recommend a software version built on a virtual machine environment for me to experiment?

    ST Employee
    August 19, 2021

    Hi @枭 陈​ 

    The build of st-example-image-qt is fine with my different configurations (ub16 native, zoostrap running ub18 or running ub20).

    Is the error you mention with the recipe qt3d related to some «undefined references» too?

    If you run these commands:

    $ bitbake -c cleansstate qt3d
    $ bitbake qt3d

    is the error still here?

    Maybe there are some «bad» items in the yocto cache. Did you share the locations defined by the variables SSTATE_DIR or SSTATE_MIRRORS (defined in conf/local.conf and conf/site.conf) with someone else or with different yocto environments?

    Best regards,

    --JM

    dubujianAnswer
    Visitor II
    August 21, 2021

    Hi @Jean-Marc B(ST Employee)

    Like the previous error, the error mentioned in the recipe qt3d is related to some "undefined reference". 

    I ran the following command: 

    $ bitbake -c cleansstate qt3d 

    $ bitbake qt3d 

    error still exists. 

    My build started in a brand new environment, and I can't determine the "bad" items in the Yocto cache.

    At present, I completely replaced the original build environment, used virtualbox6.1.26, and downloaded the VDI file Ubuntu 20.04.2 (64bit)VDI from osboxes.org according to "PC prerequisites." in the wiki.

    Both $bitbake st-example-image-qt and $bitbake st-example-image-qt -c populate_sdk were executed successfully. 

    PC $> bitbake st-example-image-qt is executed successfully. 

    PC $> bitbake st-example-image-qt -c populate_sdk is executed successfully.

    Very happy and thank you for communicating with you a few days ago.

    ST Employee
    August 23, 2021

    Hi @枭 陈​ 

    thank you for your feedback! I am happy you finally solve your problem.

    Best regards,

    --JM