OE4T / meta-tegra

BSP layer for NVIDIA Jetson platforms, based on L4T
MIT License
404 stars 222 forks source link

scarthgap: gtk-4.14.1 build failed, dependency "libdrm" not found #1582

Closed adfernandes closed 2 months ago

adfernandes commented 3 months ago

Build Configuration:

BB_VERSION           = "2.8.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-22.04"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "jetson-agx-orin-devkit"
DISTRO               = "poky"
DISTRO_VERSION       = "5.0.1"
TUNE_FEATURES        = "aarch64 armv8a crc"
meta-tegra           = "scarthgap-l4t-r35.x:09b70bc78185e3de3b10f204ceee9c38f4c83996"
meta-yocto-bsp       = "scarthgap:83793ccd865e3e72563e6d5733b6bd02943feb8a"

Build image: core-image-sato-dev

Local conf:

CONF_VERSION = "2"
DISTRO_FEATURES = "x11 opengl gobject-introspection-data seccomp systemd overlayfs virtualization vulkan xattr usrmerge"
DISTRO ?= "poky"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
IMAGE_CLASSES += "image_types_tegra"
IMAGE_FSTYPES = "tegraflash"
INIT_MANAGER = "systemd"
MACHINE ??= "jetson-agx-orin-devkit"
PACKAGE_CLASSES ?= "package_deb"
PATCHRESOLVE = "noop"
TNSPEC_BOOTDEV:${MACHINE} = "nvme0n1p1"
USE_DEVFS = "1"
USER_CLASSES ?= "buildstats"
VIRTUAL-RUNTIME_dev_manager = "udev"

Build results:

Build is clean, starting with a completely fresh build directory, empty caches, etc.

Executing bitbake core-image-sato-dev, shortly after Running task 8871 of 8929, results in:

| Run-time dependency xinerama found: YES 1.1.5
| Header "X11/extensions/Xinerama.h" has symbol "XineramaQueryExtension" with dependency xinerama: YES
| Checking for function "ngettext" : YES
| Run-time dependency vulkan found: YES 1.3.275
| Program glslc found: YES (/home/andrew/Local/yocto-tegra/build/tmp/work/armv8a_tegra-poky-linux/gtk4/4.14.1/recipe-sysroot-native/usr/bin/glslc)
| Found CMake: NO
| Run-time dependency libdrm found: NO (tried pkgconfig)
| 
| ../gtk-4.14.1/meson.build:631:13: ERROR: Dependency "libdrm" not found, tried pkgconfig
| 
| A full log can be found at /home/andrew/Local/yocto-tegra/build/tmp/work/armv8a_tegra-poky-linux/gtk4/4.14.1/build/meson-logs/meson-log.txt
| ERROR: meson failed
| WARNING: exit code 1 from a shell command.
NOTE: recipe gtk4-4.14.1-r0: task do_configure: Failed
ERROR: Task (/home/andrew/Local/yocto-tegra/sources/poky/meta/recipes-gnome/gtk+/gtk4_4.14.1.bb:do_configure) failed with exit code '1'
NOTE: recipe gst-examples-1.18.6-r0: task do_install: Succeeded
NOTE: recipe gstreamer1.0-plugins-bad-1.22.11-r0: task do_package: Succeeded
NOTE: Tasks Summary: Attempted 8871 tasks of which 6 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/andrew/Local/yocto-tegra/sources/poky/meta/recipes-gnome/gtk+/gtk4_4.14.1.bb:do_configure
Summary: There was 1 WARNING message.
Summary: There were 2 ERROR messages, returning a non-zero exit code.

Notes

adfernandes commented 3 months ago

Update: submitted upstream as Yocto Bug 15513

madisongh commented 3 months ago

Looks like gtk4 has a direct dependency on 'libdrm', but that's not mentioned in the DEPENDS setting in the recipe (as it should be). I don't see failures because libdrm getting pulled into the recipe sysroot on my builds via gstreamer1.0-plugins-base, but it looks like that's because my DISTRO_FEATURES has wayland in it.

You should be able to work around the problem by adding DEPENDS:append:pn-gtk4 = " libdrm" to your local.conf

adfernandes commented 3 months ago

Thank you, @madisongh! I just tested and built, and the build completed successfully.

I will submit a patch to oe-core.

adfernandes commented 3 months ago

Submitted (https://lists.yoctoproject.org/g/poky/message/13369)

ichergui commented 2 months ago

Hi @madisongh @adfernandes Should we close this issue ?

adfernandes commented 2 months ago

Probably... I believe it was merged from here