cancel
Showing results for 
Search instead for 
Did you mean: 

Qt SDK build failed

MMedv
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
dubujian
Associate II

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.

View solution in original post

18 REPLIES 18
Jean-Marc B
ST Employee

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

@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

@Jean-Marc B​ -

Here is some output which might be useful:

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

[HOST DISTRIB check]

Linux Distrib: Ubuntu

Linux Release: 20.04

Required packages for Linux Distrib:

build-essential chrpath cpio debianutils diffstat gawk gcc-multilib git iputils-ping libegl1-mesa libgmp-dev libmpc-dev libsdl1.2-dev libssl-dev pylint python3 python3-git python3-jinja2 python3-pexpect python3-pip socat texinfo unzip wget xterm xz-utils

Check OK: all required packages are installed on host.

[source layers/openembedded-core/oe-init-build-env][with previous config]

===========================================================================

Configuration files have been created for the following configuration:

  DISTRO      : openstlinux-weston

  DISTRO_CODENAME  : dunfell

  MACHINE      : stm32mp1

  BB_NUMBER_THREADS : <no-custom-config-set>

  PARALLEL_MAKE   : <no-custom-config-set>

  BUILDDIR     : build-openstlinuxweston-stm32mp1

  DOWNLOAD_DIR   : <disable>

  SSTATE_DIR    : <disable>

  SOURCE_MIRROR_URL : <no-custom-config-set>

  SSTATE_MIRRORS  : <disable>

  WITH_EULA_ACCEPTED: YES

===========================================================================

Available images for OpenSTLinux layers are:

 - Official OpenSTLinux images:

   st-image-weston    -  OpenSTLinux weston image with basic Wayland support (if enable in distro)

 - Other OpenSTLinux images:

   - Supported images:

     st-image-core     -  OpenSTLinux core image

You can now run 'bitbake <image>'

Hello @MMedv​ 

Thank you very much for your detailed feedback.

I see that you use this configuration:

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

As you build the st-example-image-qt, may I suggest to initialize your terminal environment with the following configuration please ?

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

The difference relies on the DISTRO name (paragraph 2.2 in the wiki page).

Best regards,

--JM

@Jean-Marc B​ -

It was my intention to use the qt weston, not eglfs. I'm following the instructions as specified in paragraph 2.1 of the wiki page.

Are you saying 2.1 is incorrect?

M

@MMedv​ 

I am sorry if I was not clear enough in my replies.

In your initial post, you use the bitbake command:

bitbake st-example-image-qt -c populate_sdk

This command belongs to the paragraph 2.2 of the wiki page i.e. QT image and SDK with EGLFS. To build it, you need the distro openstlinux-eglfs. So I guess this was the distro you want to work on.

If you want to use the distro openstlinux-weston hence following instructions of the paragraph 2.1 of the wiki page, your build image is no more st-example-image-qt as you reported it but st-example-image-qtwayland. There is the suffix wayland which is appended.

So as a summary :

  • distro openstlinux-weston :
$ DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
$ bitbake st-example-image-qtwayland
$ bitbake st-example-image-qtwayland -c populate_sdk

  • distro openstlinux-eglfs
$ DISTRO=openstlinux-eglfs MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
$ bitbake st-example-image-qt
$ bitbake st-example-image-qt -c populate_sdk

I hope my explanations are more precise than before.

Best regards,

--JM

@Jean-Marc B​ 

Sorry, I see the confusion. It's my fault, I actually had a typo in my initial post. I ran this to confirm my commands:

mtd@ubuntu:~/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package$ history | grep bitbake

 160 bitbake st-example-image-qtwayland -c populate_sdk

 161 bitbake st-example-image-qtwayland

 162 bitbake st-example-image-qtwayland -c populate_sdk

I've deleted everything, redownloaded via repo init and sync, and I'm rebuilding from the bottom up.

dubujian
Associate II

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?

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