How to fix webOS build error

Hi,
I have tried to build according to tutorial in bring-up guide for NVIDIA jetson nano board.
But, I encountered compile error for qtbase as following.
Can any one help to fix this error?

Tutorial - Jetson Nano | webOS Open Source Edition (webosose.org)

/home/kimdy2/build-webos/BUILD/work/jetson_nano_devkit-webos-linux/qtbase/6.2.2-r0/recipe-sysroot/usr/lib/libGLESv2.so /home/kimdy2/build-webos/BUILD/work/jetson_nano_devkit-webos-linux/qtbase/6.2.2-r0/recipe-sysroot/usr/lib/libEGL.so && :
| /home/kimdy2/build-webos/BUILD/work/jetson_nano_devkit-webos-linux/qtbase/6.2.2-r0/recipe-sysroot-native/usr/bin/aarch64-webos-linux/../../libexec/aarch64-webos-linux/gcc/aarch64-webos-linux/9.3.0/ld.gold: error: /home/kimdy2/build-webos/BUILD/work/jetson_nano_devkit-webos-linux/qtbase/6.2.2-r0/recipe-sysroot-native/usr/lib/libgbm.so: incompatible target
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp:122: error: undefined reference to 'gbm_bo_destroy'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp:253: error: undefined reference to 'gbm_bo_get_handle'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp:209: error: undefined reference to 'gbm_bo_write'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp:211: error: undefined reference to 'gbm_bo_get_handle'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp:90: error: undefined reference to 'gbm_bo_create'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp:98: error: undefined reference to 'gbm_device_destroy'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp:76: error: undefined reference to 'gbm_create_device'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp:97: error: undefined reference to 'gbm_surface_create'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp:108: error: undefined reference to 'gbm_surface_destroy'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp:76: error: undefined reference to 'gbm_bo_get_device'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp:77: error: undefined reference to 'gbm_device_get_fd'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp:428: error: undefined reference to 'gbm_surface_release_buffer'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp:86: error: undefined reference to 'gbm_bo_get_user_data'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp:91: error: undefined reference to 'gbm_bo_get_width'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp:92: error: undefined reference to 'gbm_bo_get_height'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp:93: error: undefined reference to 'gbm_bo_get_handle'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp:94: error: undefined reference to 'gbm_bo_get_stride'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp:96: error: undefined reference to 'gbm_bo_get_format'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp:110: error: undefined reference to 'gbm_bo_set_user_data'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp:186: error: undefined reference to 'gbm_surface_create'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp:169: error: undefined reference to 'gbm_surface_create'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp:304: error: undefined reference to 'gbm_surface_lock_front_buffer'
| /usr/src/debug/qtbase/6.2.2-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp:353: error: undefined reference to 'gbm_surface_release_buffer'
| collect2: error: ld returned 1 exit status
| [43/144] /home/kimdy2/build-webos/BUILD/work/jetson_nano_devkit-webos-linux/qtbase/6.2.2-r0/recipe-sysroot-native/usr/bin/aarch64-webos-linux/aarch64-webos-linux-g++ -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DEVICEDISCOVERY_SUPPORT_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_FB_SUPPORT_LIB -DQT_GUI_LIB -DQT_INPUT_SUPPORT_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_PLUGIN -DQVncIntegrationPlugin_EXPORTS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -Isrc/plugins/platforms/vnc/QVncIntegrationPlugin_autogen/include -I/home/kimdy2/build-webos/BUILD/work/jetson_nano_devkit-webos-linux/qtbase/6.2.2-r0/git/src/plugins/platforms/vnc -Isrc/plugins/platforms/vnc -Iinclude -Iinclude/QtCore -I/home/kimdy2/build-webos/BUILD/work/jetson_nano_devkit-webos-linux/qtbase/6.2.2-r0/git/mkspecs/linux-g++ -Isrc/corelib -Iinclude/QtCore/6.2.2 -Iinclude/QtCore/6.2.2/QtCore -Iinclude/QtFbSupport -Isrc/platformsupport/fbconvenience -Iinclude/QtFbSupport/6.2.2 -Iinclude/QtFbSupport/6.2.2/QtFbSupport -Isrc/gui -Iinclude/QtGui/6.2.2 -Iinclude/QtGui/6.2.2/QtGui -Iinclude/QtGui -Iinclude/QtNetwork -Iinclude/QtInputSupport -Isrc/platformsupport/input -Iinclude/QtInputSupport/6.2.2 -Iinclude/QtInputSupport/6.2.2/QtInputSupport -Iinclude/QtDeviceDiscoverySupport -Isrc/platformsupport/devicediscovery -Iinclude/QtDeviceDiscoverySupport/6.2.2 -Iinclude/QtDeviceDiscoverySupport/6.2.2/QtDeviceDiscoverySupport -march=armv8-a+crc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type --sysroot=/home/kimdy2/build-webos/BUILD/work/jetson_nano_devkit-webos-linux/qtbase/6.2.2-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/kimdy2/build-webos/BUILD/work/jetson_nano_devkit-webos-linux/qtbase/6.2.2-r0=/usr/src/debug/qtbase/6.2.2-r0 -fdebug-prefix-map=/home/kimdy2/build-webos/BUILD/work/jetson_nano_devkit-webos-linux/qtbase/6.2.2-r0=/usr/src/debug/qtbase/6.2.2-r0 -fdebug-prefix-map=/home/kimdy2/build-webos/BUILD/work/jetson_nano_devkit-webos-linux/qtbase/6.2.2-r0/recipe-sysroot= -fdebug-prefix-map=/home/kimdy2/build-webos/BUILD/work/jetson_nano_devkit-webos-linux/qtbase/6.2.2-r0/recipe-sysroot-native= -D__WEBOS__ -D__WEBOS__ -DQFONTCACHE_MIN_COST=512 -fvisibility-inlines-hidden -march=armv8-a+crc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type --sysroot=/home/kimdy2/build-webos/BUILD/work/jetson_nano_devkit-webos-linux/qtbase/6.2.2-r0/recipe-sysroot -DNDEBUG -O2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-exceptions -Wsuggest-override -std=c++17 -MD -MT src/plugins/platforms/vnc/CMakeFiles/QVncIntegrationPlugin.dir/qvncscreen.cpp.o -MF src/plugins/platforms/vnc/CMakeFiles/QVncIntegrationPlugin.dir/qvncscreen.cpp.o.d -o src/plugins/platforms/vnc/CMakeFiles/QVncIntegrationPlugin.dir/qvncscreen.cpp.o -c /home/kimdy2/build-webos/BUILD/work/jetson_nano_devkit-webos-linux/qtbase/6.2.2-r0/git/src/plugins/platforms/vnc/qvncscreen.cpp
| ninja: build stopped: subcommand failed.
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/kimdy2/build-webos/BUILD/work/jetson_nano_devkit-webos-linux/qtbase/6.2.2-r0/temp/run.do_compile.14597' failed with exit code 1
ERROR: Task (/home/kimdy2/build-webos/meta-qt6/recipes-qt/qt6/qtbase_git.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1571 tasks of which 1568 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 2 seconds
NOTE: Build completion summary:
NOTE: do_package: 0.0% sstate reuse(0 setscene, 1 scratch)

Summary: 1 task failed:
/home/kimdy2/build-webos/meta-qt6/recipes-qt/qt6/qtbase_git.bb:do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Hi @kimdy2

Could you provide us the commands you'd entered?

Thanks

Hi, :slightly_smiling_face:
I just followed the tutorial page as below.

$ git clone https://github.com/webosose/build-webos.git
$ cd build-webos
$ sudo scripts/prerequisites.sh

Add jetson-nano-devkit to build-webos/weboslayer.py

To add the repository, add the following codes to build-webos/weboslayer.py
('meta-tegra', 30, 'https://github.com/OE4T/meta-tegra.git', '
branch=dunfell-l4t-r32.5.0,commit=65b548a', ''),

$ ./mcf -p 2 -b 2 jetson-nano-devkit
$ source oe-init-build-env

Copy and paste the following codes at the end of the build-webos/meta-webosose/meta-webos/conf/layer.conf

#=============================================================================

Add meta-tegra layer information.

IMAGE_CLASSES and IMAGE_FSTYPES is used to flash the target device.

IMAGE_CLASSES += "image_types_tegra"
IMAGE_FSTYPES = "tegraflash tar.gz.bz2"
IMAGE_TYPES += "tegraflash"

The default value for IMAGE_NAME_SUFFIX occurs an error when you build webOS OSE with u-boot.

To avoid this error, set IMAGE_NAME_SUFFIX as blank.

IMAGE_NAME_SUFFIX = ""

Disable SOTA (Software-Over-the-Air) features.

SOTA features are not supported in NVIDIA devices.

INHERIT_remove = "sota"
DISTRO_FEATURES_remove = "sota usrmerge"
DISTRO_FEATURES_NATIVE_remove = "sota"

Set rootfs for Jetson Nano.

mmcblk0p1 is root in Jetson Nano development module for MicroSD card.

KERNEL_ROOTSPEC = "root=/dev/mmcblk0p1 rw rootwait"

Fix bash runtime dependency with respect to WEBOS_PREFERRED_PROVIDER_FOR_BASH

VIRTUAL-RUNTIME_bash ?= "bash"
RDEPENDS_tegra-nvs-base_append_class-target = " ${VIRTUAL-RUNTIME_bash}"
RDEPENDS_tegra-nvs-base_remove_class-target = "${@oe.utils.conditional('WEBOS_PREFERRED_PROVIDER_FOR_BASH', 'busybox', 'bash', '', d)}"
RDEPENDS_tegra-nvphs-base_append_class-target = " ${VIRTUAL-RUNTIME_bash}"
RDEPENDS_tegra-nvphs-base_remove_class-target = "${@oe.utils.conditional('WEBOS_PREFERRED_PROVIDER_FOR_BASH', 'busybox', 'bash', '', d)}"
RDEPENDS_tegra-configs-nvstartup_append_class-target = " ${VIRTUAL-RUNTIME_bash}"
RDEPENDS_tegra-configs-nvstartup_remove_class-target = "${@oe.utils.conditional('WEBOS_PREFERRED_PROVIDER_FOR_BASH', 'busybox', 'bash', '', d)}"

Disable com.webos.app.volume, com.webos.app.notification, and g-media-pipeline

These applications are not guaranteed to work properly on NVIDIA devices.

VIRTUAL-RUNTIME_com.webos.app.notification = ""
VIRTUAL-RUNTIME_com.webos.app.volume = ""
VIRTUAL-RUNTIME_g-media-pipeline = ""

#=============================================================================

$ bitbake webos-image

  1. Could you check typos in target name?

  2. Did you do the libhanguel.bb step?

  1. There is no typo in target name : jetson-nano-devkit

  2. Yes, I applied it already.

Next week, I'll re-test the build and share the result (maybe after Thursday due to Covid issues).