Skip to contentSkip to conversation

sstate/relocatable: remove manual relocation of .pc files

PATCH In review Ross Burton 5 participants 13 messages Mar 20 – Mar 25

lore
Share & tools
lore
#0 lore raw

PATCH 1/7 sstate/relocatable: remove manual relocation of .pc files

There's no need to manually relocate .pc files in relocatable.bbclass as the path remapping in sstate.bbclass can do it, if we add .pc to SSTATE_SCAN_FILES.

This removes some hardcoded behaviour, and puts absolute sysroot paths into the .pc files instead of paths like ${pcfiledir}/../../include, which makes it possible for pkgconfig to normalise and strip redundant paths.

This also has the side effect of not forcibly turning .pc symlinks into real files, which the sed was doing.

---
 meta/classes-global/sstate.bbclass |  2 +-
 meta/classes/relocatable.bbclass   | 15 +--------------
 2 files changed, 2 insertions(+), 15 deletions(-)
meta/classes-global/sstate.bbclass +1 -1
index 88449d19c7b..3b50985eab1 100644
@@ -67,7 +67,7 @@ SSTATE_ALLOW_OVERLAP_FILES += "${DEPLOY_DIR_IMAGE}/grub-efi"
 SSTATE_ALLOW_OVERLAP_FILES += "${DEPLOY_DIR_IMAGE}/systemd-boot"
 SSTATE_ALLOW_OVERLAP_FILES += "${DEPLOY_DIR_IMAGE}/microcode"
 
-SSTATE_SCAN_FILES ?= "*.la *-config *_config postinst-*"
+SSTATE_SCAN_FILES ?= "*.la *-config *_config postinst-* *.pc"
 SSTATE_SCAN_CMD ??= 'find ${SSTATE_BUILDDIR} \( -name "${@"\" -o -name \"".join(d.getVar("SSTATE_SCAN_FILES").split())}" \) -type f'
 SSTATE_SCAN_CMD_NATIVE ??= 'grep -Irl -e ${RECIPE_SYSROOT} -e ${RECIPE_SYSROOT_NATIVE} -e ${HOSTTOOLS_DIR} ${SSTATE_BUILDDIR}'
 SSTATE_HASHEQUIV_FILEMAP ?= " \
meta/classes/relocatable.bbclass +1 -14
index d0a623fb0a9..35b2d6ec474 100644
@@ -6,21 +6,8 @@
 
 inherit chrpath
 
-SYSROOT_PREPROCESS_FUNCS += "relocatable_binaries_preprocess relocatable_native_pcfiles"
+SYSROOT_PREPROCESS_FUNCS += "relocatable_binaries_preprocess"
 
 python relocatable_binaries_preprocess() {
     rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d)
 }
-
-relocatable_native_pcfiles() {
-	for dir in ${libdir}/pkgconfig ${datadir}/pkgconfig; do
-		files_template=${SYSROOT_DESTDIR}$dir/*.pc
-		# Expand to any files matching $files_template
-		files=$(echo $files_template)
-		# $files_template and $files will differ if any files were found
-		if [ "$files_template" != "$files" ]; then
-			rel=$(realpath -m --relative-to=$dir ${base_prefix})
-			sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" $files
-		fi
-	done
-}
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/7 pkgconf: inherit pkgconfig

pkgconf needs to know the value of PKG_CONFIG_LIBDIR, so it needs to inherit the pkgconfig class.

---
 meta/recipes-devtools/pkgconf/pkgconf_2.5.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/pkgconf/pkgconf_2.5.1.bb +1 -1
index e335c843bda..a8455577f63 100644
@@ -22,7 +22,7 @@ SRC_URI = "\
 "
 SRC_URI[sha256sum] = "cd05c9589b9f86ecf044c10a2269822bc9eb001eced2582cfffd658b0a50c243"
 
-inherit autotools
+inherit autotools pkgconfig
 
 do_install:append () {
     # Install a wrapper which deals, as much as possible with pkgconf vs
Signature · 1 line
2.43.0
#2 lore raw

PATCH 3/7 pkgconf: ensure pkgconf-native doesn't try and look on the host

In reply to Ross Burton

Neuter the native build of pkgconf so that it doesn't default to looking on the build host for .pc files, to avoid accidental host contamination.

---
 meta/recipes-devtools/pkgconf/pkgconf_2.5.1.bb | 6 ++++++
 1 file changed, 6 insertions(+)
meta/recipes-devtools/pkgconf/pkgconf_2.5.1.bb +6 -0
index a8455577f63..277ef9786c4 100644
@@ -24,6 +24,12 @@ SRC_URI[sha256sum] = "cd05c9589b9f86ecf044c10a2269822bc9eb001eced2582cfffd658b0a
 
 inherit autotools pkgconfig
 
+# Tell the native pkgconf to use directories that don't exist, so we _need_ to
+# tell it the paths with environment variables.
+EXTRA_OECONF:append:class-native = " --with-pkg-config-dir='/not/exist' \
+                                     --with-system-includedir=/not/exist/include \
+                                     --with-system-libdir=/not/exist/lib"
+
 do_install:append () {
     # Install a wrapper which deals, as much as possible with pkgconf vs
     # pkg-config compatibility issues.
Signature · 1 line
2.43.0
#3 lore raw

PATCH 4/7 pkgconf: minimise wrapper

In reply to Ross Burton

There's no need to look at the passed arguments and unset variables, we want fdo's pkgconfig behaviour when called from the pkg-config wrapper and this can be done by exporting PKG_CONFIG_FDO_SYSROOT_RULES.

---
 .../pkgconf/pkgconf/pkg-config-wrapper          | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)
meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper +4 -13
index 695f349566d..89081672abd 100755
@@ -1,16 +1,7 @@
-#!/bin/sh
-# pkgconf wrapper to deal with pkg-config/pkgconf compatibility issues
-#
-# Copyright (C) 2015 Christopher Larson <[email protected]>
-# License: MIT (see COPYING.MIT at the root of the repository for terms)
+#! /bin/sh
 
-for arg; do
-    case "$arg" in
-        --variable|--variable=*)
-            # pkg-config doesn't sysroot-prefix user variables
-            unset PKG_CONFIG_SYSROOT_DIR
-            ;;
-    esac
-done
+# Tell pkgconf to use pkgconfig behaviour when dealing with the sysroot to ease
+# migration.
+export PKG_CONFIG_FDO_SYSROOT_RULES="1"
 
 exec pkgconf "$@"
Signature · 1 line
2.43.0
#4 lore raw

PATCH 5/7 class/pkgconfig: use pkgconf instead of pkgconfig

In reply to Ross Burton

The last meaningful change to freedesktop.org pkgconfig was in 2019, but pkgconf is actively maintained.

Major distributions such as Fedora (and derivates), Debian (ditto), Arch Linux, Buildroot, and Alpine have all moved to pkgconf already.

There's a subtle behaviour change between pkgconfig and pkgconf, whereas pkgconfig appends the sysroot to PKG_CONFIG_SYSTEM_INCLUDE_PATH pkgconf does not, so we need to sysroot-prefix those variables.

---
 meta/classes-recipe/pkgconfig.bbclass          | 6 +++---
 meta/conf/distro/include/default-providers.inc | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
meta/classes-recipe/pkgconfig.bbclass +3 -3
index c0d91393b36..4912b9904ba 100644
@@ -4,7 +4,7 @@
 # SPDX-License-Identifier: MIT
 #
 
-DEPENDS:prepend = "pkgconfig-native "
+DEPENDS:prepend = "pkgconf-native "
 
 export PKG_CONFIG_PATH ?= ""
 export PKG_CONFIG_LIBDIR ?= "${STAGING_LIBDIR}/pkgconfig:${STAGING_DATADIR}/pkgconfig"
@@ -12,5 +12,5 @@ export PKG_CONFIG_LIBDIR ?= "${STAGING_LIBDIR}/pkgconfig:${STAGING_DATADIR}/pkgc
 export PKG_CONFIG_SYSROOT_DIR ?= "${STAGING_DIR_HOST}"
 export PKG_CONFIG_DISABLE_UNINSTALLED ?= "yes"
 
-export PKG_CONFIG_SYSTEM_LIBRARY_PATH ?= "${base_libdir}:${libdir}"
-export PKG_CONFIG_SYSTEM_INCLUDE_PATH ?= "${includedir}"
+export PKG_CONFIG_SYSTEM_LIBRARY_PATH ?= "${STAGING_BASELIBDIR}:${STAGING_LIBDIR}"
+export PKG_CONFIG_SYSTEM_INCLUDE_PATH ?= "${STAGING_INCDIR}"
meta/conf/distro/include/default-providers.inc +3 -3
index 5101ad78f88..c0a5d1c75e5 100644
@@ -56,9 +56,9 @@ PREFERRED_PROVIDER_getopt ?= "util-linux-getopt"
 PREFERRED_PROVIDER_openssl ?= "openssl"
 PREFERRED_PROVIDER_openssl-native ?= "openssl-native"
 PREFERRED_PROVIDER_nativesdk-openssl ?= "nativesdk-openssl"
-PREFERRED_PROVIDER_pkgconfig ?= "pkgconfig"
-PREFERRED_PROVIDER_nativesdk-pkgconfig ?= "nativesdk-pkgconfig"
-PREFERRED_PROVIDER_pkgconfig-native ?= "pkgconfig-native"
+PREFERRED_PROVIDER_pkgconfig ?= "pkgconf"
+PREFERRED_PROVIDER_nativesdk-pkgconfig ?= "nativesdk-pkgconf"
+PREFERRED_PROVIDER_pkgconfig-native ?= "pkgconf-native"
 PREFERRED_RPROVIDER_initd-functions ?= "initscripts"
 
 PREFERRED_PROVIDER_nativesdk-mesa ?= "nativesdk-mesa"
Signature · 1 line
2.43.0
#5 lore raw

Re: [OE-core] [PATCH 5/7] class/pkgconfig: use pkgconf instead of pkgconfig

FWIW there are two recipes in meta-oe which are regressing with this

xmlsec1 and protobuf

https://autobuilder.yoctoproject.org/valkyrie/api/v2/logs/5941365/raw_inline

Quoted 74 lines · Ross Burton via lists.openembedded.org

The last meaningful change to freedesktop.org pkgconfig was in 2019, but pkgconf is actively maintained.

Major distributions such as Fedora (and derivates), Debian (ditto), Arch Linux, Buildroot, and Alpine have all moved to pkgconf already.

There's a subtle behaviour change between pkgconfig and pkgconf, whereas pkgconfig appends the sysroot to PKG_CONFIG_SYSTEM_INCLUDE_PATH pkgconf does not, so we need to sysroot-prefix those variables.

---
 meta/classes-recipe/pkgconfig.bbclass          | 6 +++---
 meta/conf/distro/include/default-providers.inc | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
meta/classes-recipe/pkgconfig.bbclass +1 -1
index c0d91393b36..4912b9904ba 100644
@@ -4,7 +4,7 @@
 # SPDX-License-Identifier: MIT
 #
 
-DEPENDS:prepend = "pkgconfig-native "
+DEPENDS:prepend = "pkgconf-native "
 
 export PKG_CONFIG_PATH ?= ""
 export PKG_CONFIG_LIBDIR ?=

"${STAGING_LIBDIR}/pkgconfig:${STAGING_DATADIR}/pkgconfig"

meta/classes-recipe/pkgconfig.bbclass +0 -0
@@ -12,5 +12,5 @@ export PKG_CONFIG_LIBDIR ?=

"${STAGING_LIBDIR}/pkgconfig:${STAGING_DATADIR}/pkgc
export PKG_CONFIG_SYSROOT_DIR ?= "${STAGING_DIR_HOST}" export PKG_CONFIG_DISABLE_UNINSTALLED ?= "yes"

meta/classes-recipe/pkgconfig.bbclass +1 -2
-export PKG_CONFIG_SYSTEM_LIBRARY_PATH ?= "${base_libdir}:${libdir}"
-export PKG_CONFIG_SYSTEM_INCLUDE_PATH ?= "${includedir}"
+export PKG_CONFIG_SYSTEM_LIBRARY_PATH ?=

"${STAGING_BASELIBDIR}:${STAGING_LIBDIR}"

meta/classes-recipe/pkgconfig.bbclass +1 -0
+export PKG_CONFIG_SYSTEM_INCLUDE_PATH ?= "${STAGING_INCDIR}"
meta/conf/distro/include/default-providers.inc +3 -4
index 5101ad78f88..c0a5d1c75e5 100644
@@ -56,9 +56,9 @@ PREFERRED_PROVIDER_getopt ?= "util-linux-getopt"
 PREFERRED_PROVIDER_openssl ?= "openssl"
 PREFERRED_PROVIDER_openssl-native ?= "openssl-native"
 PREFERRED_PROVIDER_nativesdk-openssl ?= "nativesdk-openssl"
-PREFERRED_PROVIDER_pkgconfig ?= "pkgconfig"
-PREFERRED_PROVIDER_nativesdk-pkgconfig ?= "nativesdk-pkgconfig"
-PREFERRED_PROVIDER_pkgconfig-native ?= "pkgconfig-native"
+PREFERRED_PROVIDER_pkgconfig ?= "pkgconf"
+PREFERRED_PROVIDER_nativesdk-pkgconfig ?= "nativesdk-pkgconf"
+PREFERRED_PROVIDER_pkgconfig-native ?= "pkgconf-native"
 PREFERRED_RPROVIDER_initd-functions ?= "initscripts"
 
 PREFERRED_PROVIDER_nativesdk-mesa ?= "nativesdk-mesa"
--

2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#233603):
https://lists.openembedded.org/g/openembedded-core/message/233603
Mute This Topic: https://lists.openembedded.org/mt/118416246/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#6 lore raw

Re: [OE-core] [PATCH 5/7] class/pkgconfig: use pkgconf instead of pkgconfig

Quoted 6 lines · Khem Raj

FWIW there are two recipes in meta-oe which are regressing with this

xmlsec1 and protobuf

https://autobuilder.yoctoproject.org/valkyrie/api/v2/logs/5941365/raw_inline

The protobuf change is because there’s some frankly horrifying sedding of .pc files which I’m surprised survived the recent changes to how pkgconfig.bbclass works. There’s got to be a better way to do this.

The xmlsec failure looks similar.

I can look at these on Monday and try and sort out the mess.

Ross

#7 lore raw

Re: [PATCH 5/7] class/pkgconfig: use pkgconf instead of pkgconfig

In reply to Ross Burton
Quoted 10 lines · Ross Burton

The last meaningful change to freedesktop.org pkgconfig was in 2019, but pkgconf is actively maintained.

Major distributions such as Fedora (and derivates), Debian (ditto), Arch Linux, Buildroot, and Alpine have all moved to pkgconf already.

There's a subtle behaviour change between pkgconfig and pkgconf, whereas pkgconfig appends the sysroot to PKG_CONFIG_SYSTEM_INCLUDE_PATH pkgconf does not, so we need to sysroot-prefix those variables.

Quoted 5 lines
---
 meta/classes-recipe/pkgconfig.bbclass          | 6 +++---
 meta/conf/distro/include/default-providers.inc | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

FWIW pkgconfig -> pkgconf change also break gst-plugins-imsdk build in meta-qcom. Reverting this series makes the build succeed.

| FAILED: [code=1] gst-plugin-mlaconverter/CMakeFiles/gstqtimlaconverter.dir/audio-converter-engine.cc.o
| ccache /home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot-native/usr/bin/aarch64-qcom-linux/aarch64-qcom-linux-g++ --sysroot=/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot -DHAVE_CONFIG_H -DHAVE_LINUX_DMA_BUF_H -Dgstqtimlaconverter_EXPORTS -I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/build/gst-plugin-mlaconverter -I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/sources/gst-plugins-imsdk-0.1.0/gst-plugin-mlaconverter -I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot/usr/include/gstreamer-1.0 -I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot/usr/include/glib-2.0 -I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot/usr/lib/glib-2.0/include -I/usr/include/gstreamer-1.0 -I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/sources/gst-plugins-imsdk-0.1.0/gst-plugin-base -I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot/usr/include/json-glib-1.0 -I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot/usr/include/libmount -I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot/usr/include/blkid -march=armv8.2-a+crypto -mbranch-protection=standard -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security  --sysroot=/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot  -O2 -g -fcanon-prefix-map  -ffile-prefix-map=/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/sources/gst-plugins-imsdk-0.1.0=/usr/src/debug/gst-plugins-imsdk/0.1.0  -ffile-prefix-map=/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/build=/usr/src/debug/gst-plugins-imsdk/0.1.0  -ffile-prefix-map=/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot=  -ffile-prefix-map=/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot-native=  -pipe -fvisibility-inlines-hidden -Wall -Wextra -Werror -Wno-unused-parameter -std=gnu++17 -fPIC -MD -MT gst-plugin-mlaconverter/CMakeFiles/gstqtimlaconverter.dir/audio-converter-engine.cc.o -MF gst-plugin-mlaconverter/CMakeFiles/gstqtimlaconverter.dir/audio-converter-engine.cc.o.d -o gst-plugin-mlaconverter/CMakeFiles/gstqtimlaconverter.dir/audio-converter-engine.cc.o -c /home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/sources/gst-plugins-imsdk-0.1.0/gst-plugin-mlaconverter/audio-converter-engine.cc
| cc1plus: error: include location "/usr/include/gstreamer-1.0" is unsafe for cross-compilation [-Werror=poison-system-directories]
| cc1plus: all warnings being treated as errors
| ninja: build stopped: subcommand failed.
|
| WARNING: exit code 1 from a shell command.

ERROR: Task (/home/lumag/Projects/RPB/build-rpb/conf/../../layers/meta-qcom/recipes-multimedia/imsdk/gst-plugins-imsdk_0.1.0.bb:do_compile) failed with exit code '1'

Signature · 2 lines
With best wishes
Dmitry
#8 lore raw

Re: [OE-core] [PATCH 5/7] class/pkgconfig: use pkgconf instead of pkgconfig

Quoted 56 lines · Dmitry Baryshkov via lists.openembedded.org
Quoted 10 lines · Ross Burton

The last meaningful change to freedesktop.org pkgconfig was in 2019, but pkgconf is actively maintained.

Major distributions such as Fedora (and derivates), Debian (ditto), Arch Linux, Buildroot, and Alpine have all moved to pkgconf already.

There's a subtle behaviour change between pkgconfig and pkgconf, whereas pkgconfig appends the sysroot to PKG_CONFIG_SYSTEM_INCLUDE_PATH pkgconf does not, so we need to sysroot-prefix those variables.

Quoted 5 lines
---
 meta/classes-recipe/pkgconfig.bbclass          | 6 +++---
 meta/conf/distro/include/default-providers.inc | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

FWIW pkgconfig -> pkgconf change also break gst-plugins-imsdk build in meta-qcom. Reverting this series makes the build succeed.

| FAILED: [code=1]
gst-plugin-mlaconverter/CMakeFiles/gstqtimlaconverter.dir/audio-converter-engine.cc.o
| ccache /home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot-native/usr/bin/aarch64-qcom-linux/aarch64-qcom-linux-g++ --sysroot=/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot

(quoted diff) +0 -22
-DHAVE_CONFIG_H -DHAVE_LINUX_DMA_BUF_H -Dgstqtimlaconverter_EXPORTS
-I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/build/gst-plugin-mlaconverter
-I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/sources/gst-plugins-imsdk-0.1.0/gst-plugin-mlaconverter
-I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot/usr/include/gstreamer-1.0
-I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot/usr/include/glib-2.0
-I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot/usr/lib/glib-2.0/include
-I/usr/include/gstreamer-1.0
-I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/sources/gst-plugins-imsdk-0.1.0/gst-plugin-base
-I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot/usr/include/json-glib-1.0
-I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot/usr/include/libmount
-I/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot/usr/include/blkid
-march=armv8.2-a+crypto -mbranch-protection=standard
-fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security
--sysroot=/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot
-O2 -g -fcanon-prefix-map
-ffile-prefix-map=/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/sources/gst-plugins-imsdk-0.1.0=/usr/src/debug/gst-plugins-imsdk/0.1.0
-ffile-prefix-map=/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/build=/usr/src/debug/gst-plugins-imsdk/0.1.0
-ffile-prefix-map=/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot=
-ffile-prefix-map=/home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/recipe-sysroot-native=
-pipe -fvisibility-inlines-hidden -Wall -Wextra -Werror
-Wno-unused-parameter -std=gnu++17 -fPIC -MD -MT

gst-plugin-mlaconverter/CMakeFiles/gstqtimlaconverter.dir/audio-converter-engine.cc.o
-MF
gst-plugin-mlaconverter/CMakeFiles/gstqtimlaconverter.dir/audio-converter-engine.cc.o.d
-o
gst-plugin-mlaconverter/CMakeFiles/gstqtimlaconverter.dir/audio-converter-engine.cc.o
-c /home/lumag/Projects/RPB/build-rpb/tmp-qcom-distro/work/armv8-2a-qcom-linux/gst-plugins-imsdk/0.1.0/sources/gst-plugins-imsdk-0.1.0/gst-plugin-mlaconverter/audio-converter-engine.cc | cc1plus: error: include location "/usr/include/gstreamer-1.0" is unsafe
for cross-compilation [-Werror=poison-system-directories]

Quoted 9 lines
| cc1plus: all warnings being treated as errors
| ninja: build stopped: subcommand failed.
|
| WARNING: exit code 1 from a shell command.

ERROR: Task (/home/lumag/Projects/RPB/build-rpb/conf/../../layers/meta-qcom/recipes-multimedia/imsdk/gst-plugins-imsdk_0.1.0.bb:do_compile) failed with exit code '1'

I wonder if CMake is using unwrapper'ed version of pkgconf and not filterning non sysrooted target paths. Try changing the CMakefiles.txt for the concerned plugin to use
IMPORTED_TARGET and see if it helps

change
pkg_check_modules(GST
REQUIRED gstreamer-1.0>=${GST_VERSION_REQUIRED})

to
pkg_check_modules(GST
REQUIRED IMPORTED_TARGET gstreamer-1.0>=${GST_VERSION_REQUIRED})

in

https://github.com/qualcomm/gst-plugins-imsdk/blob/main/gst-plugin-mlaconverter/CMakeLists.txt

It might help.

Quoted 14 lines

With best wishes
Dmitry

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#233836):
https://lists.openembedded.org/g/openembedded-core/message/233836
Mute This Topic: https://lists.openembedded.org/mt/118416246/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#9 lore raw

PATCH 6/7 pkgconfig: remove

In reply to Ross Burton

We're now using pkgconf, so drop the pkgconfig recipe.

---
 meta/conf/distro/include/maintainers.inc      |   1 -
 ...e-g-u-intptr-atomics-in-builtin-glib.patch | 157 ------------------
 ...0001-Do-not-use-bool-as-a-field-name.patch |  36 ----
 ...Update-AM_GLIB_GNU_GETTEXT-to-match-.patch |  41 -----
 .../pkgconfig/pkgconfig/pkg-config-esdk.in    |  24 ---
 .../pkgconfig/pkgconfig/pkg-config-native.in  |   7 -
 .../pkgconfig/pkgconfig_git.bb                |  78 ---------
 7 files changed, 344 deletions(-)
 delete mode 100644 meta/recipes-devtools/pkgconfig/pkgconfig/0001-Backport-g-s-size-g-u-intptr-atomics-in-builtin-glib.patch
 delete mode 100644 meta/recipes-devtools/pkgconfig/pkgconfig/0001-Do-not-use-bool-as-a-field-name.patch
 delete mode 100644 meta/recipes-devtools/pkgconfig/pkgconfig/0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch
 delete mode 100644 meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in
 delete mode 100644 meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in
 delete mode 100644 meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
meta/conf/distro/include/maintainers.inc +0 -1
index 86a11867a1d..f9a600ff114 100644
@@ -605,7 +605,6 @@ RECIPE_MAINTAINER:pn-pigz = "Hongxu Jia <[email protected]>"
 RECIPE_MAINTAINER:pn-pinentry = "Unassigned <[email protected]>"
 RECIPE_MAINTAINER:pn-pixman = "Unassigned <[email protected]>"
 RECIPE_MAINTAINER:pn-pkgconf = "Ross Burton <[email protected]>"
-RECIPE_MAINTAINER:pn-pkgconfig = "Ross Burton <[email protected]>"
 RECIPE_MAINTAINER:pn-pm-utils = "Ross Burton <[email protected]>"
 RECIPE_MAINTAINER:pn-pointercal-xinput = "Unassigned <[email protected]>"
 RECIPE_MAINTAINER:pn-pong-clock = "Unassigned <[email protected]>"
meta/recipes-devtools/pkgconfig/pkgconfig/0001-Backport-g-s-size-g-u-intptr-atomics-in-builtin-glib.patch deleted +0 -157

157 lines not on this page · raw message

meta/recipes-devtools/pkgconfig/pkgconfig/0001-Do-not-use-bool-as-a-field-name.patch deleted +0 -36
deleted file mode 100644
index bcb7e94d69b..00000000000
@@ -1,36 +0,0 @@
-From b3b26a7e125e5e4f5b69975cc17eb6d33198ebaa Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <[email protected]>
-Date: Thu, 11 Apr 2024 14:40:21 +0100
-Subject: [PATCH] Do not use bool as a field name
-
-C99 aliases `bool` to `_Bool`, and C23 introduces `bool` as a reserved
-keyword. Let's avoid using `bool` as a field name.
-
-Upstream-Status: Backport [Backport from glib to bunlded version in pkg-config https://github.com/GNOME/glib/commit/9e320e1c43a4770ed1532248fe5416eb0c618120]
-Signed-off-by: Martin Jansa <[email protected]>
----
- glib/glib/goption.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/glib/glib/goption.c b/glib/glib/goption.c
-index 0a22f6f..f439fd4 100644
---- a/glib/glib/goption.c
-+++ b/glib/glib/goption.c
-@@ -166,7 +166,7 @@ typedef struct
-   gpointer arg_data;
-   union
-   {
--    gboolean bool;
-+    gboolean boolean;
-     gint integer;
-     gchar *str;
-     gchar **array;
-@@ -1600,7 +1600,7 @@ free_changes_list (GOptionContext *context,
-           switch (change->arg_type)
-             {
-             case G_OPTION_ARG_NONE:
--              *(gboolean *)change->arg_data = change->prev.bool;
-+              *(gboolean *)change->arg_data = change->prev.boolean;
-               break;
-             case G_OPTION_ARG_INT:
-               *(gint *)change->arg_data = change->prev.integer;
meta/recipes-devtools/pkgconfig/pkgconfig/0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch deleted +0 -41

41 lines not on this page · raw message

meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in deleted +0 -24
deleted file mode 100644
index 4fc9b0a4a7b..00000000000
@@ -1,24 +0,0 @@
-#! /bin/sh
-
-# Orignal pkg-config-native action when called as pkg-config-native
-# NO Change here
-if [ "pkg-config-native" = "`basename $0`" ] ; then
-	PKG_CONFIG_PATH="@PATH_NATIVE@"
-	PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
-	unset PKG_CONFIG_SYSROOT_DIR
-else
-	# in this case check if we are in the esdk
-	if [ "$OE_SKIP_SDK_CHECK" = "1" ] ; then
-		parentpid=`ps -o ppid= -p $$`
-		parentpid_info=`ps -wo comm= -o args= -p $parentpid`
-
-		# check if we are being called from  the kernel's make menuconfig
-		if ( echo $parentpid_info | grep -q check-lxdialog ) ; then
-			PKG_CONFIG_PATH="@PATH_NATIVE@"
-			PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
-			unset PKG_CONFIG_SYSROOT_DIR
-		fi
-	fi
-fi
-
-pkg-config.real "$@"
meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in deleted +0 -7
deleted file mode 100644
index 8addefbb803..00000000000
@@ -1,7 +0,0 @@
-#! /bin/sh
-
-export PKG_CONFIG_PATH="@PATH_NATIVE@$EXTRA_NATIVE_PKGCONFIG_PATH"
-export PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
-unset PKG_CONFIG_SYSROOT_DIR
-
-pkg-config "$@"
meta/recipes-devtools/pkgconfig/pkgconfig_git.bb deleted +0 -78

78 lines not on this page · raw message

Signature · 1 line
2.43.0
#10 lore raw

PATCH 7/7 layer.conf: update pkgconfig-native exclusions to pkgconf-native

In reply to Ross Burton
---
 meta/conf/layer.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/conf/layer.conf +2 -2
index a7d44a55912..b097c34c7ba 100644
@@ -106,7 +106,7 @@ SSTATE_EXCLUDEDEPS_SYSROOT += "\
     .*->meson-native \
     .*->ninja-native \
     .*->patch-native \
-    .*->pkgconfig-native \
+    .*->pkgconf-native \
     .*->quilt-native \
     ^(?!gtk-doc-native).*->xmlto-native \
     .*->gperf-native \
@@ -121,7 +121,7 @@ SSTATE_EXCLUDEDEPS_SYSROOT += "\
 # libgcc-native and the C runtime. Omitting these build dependencies can save
 # significant disk space and speeds up packaging into signed rpms a little.
 SSTATE_EXCLUDEDEPS_SYSROOT += "\
-    rpm-sequoia-native->(pkgconfig-native|cargo-native|python3-native|rust-native) \
+    rpm-sequoia-native->(pkgconf-native|cargo-native|python3-native|rust-native) \
 "
 # Nothing needs to depend on libc-initial
 # base-passwd/shadow-sysroot don't need their dependencies
Signature · 1 line
2.43.0
#11 lore raw

Patchtest results for [PATCH 7/7] layer.conf: update pkgconfig-native exclusions to pkgconf-native

Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:

---
Testing patch /home/patchtest/share/mboxes/7-7-layer.conf-update-pkgconfig-native-exclusions-to-pkgconf-native.patch

FAIL: test commit message presence: Please include a commit message on your patch explaining the change (test_mbox.TestMbox.test_commit_message_presence)

PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!

#12 lore raw
In reply to Ross Burton
Quoted 11 lines · Ross Burton via lists.openembedded.org

There's no need to manually relocate .pc files in relocatable.bbclass as the path remapping in sstate.bbclass can do it, if we add .pc to SSTATE_SCAN_FILES.

This removes some hardcoded behaviour, and puts absolute sysroot paths into the .pc files instead of paths like ${pcfiledir}/../../include, which makes it possible for pkgconfig to normalise and strip redundant paths.

This also has the side effect of not forcibly turning .pc symlinks into real files, which the sed was doing.

Please don't effectively revert https://git.openembedded.org/openembedded-core/commit/meta/classes/relocatable.bbclass?id=a3f4e9ff55c7d9eba175e83eb6c99cf349a74432

The sstate relocation code creates loads of copies of files rather than allowing us to hardlink them and is bad for performance. By making the files relocatable, we don't have to do all the fixup handling in that code and it is generally lower overhead on the system. I think I did this to stop a lot of sstate objects needing relocations at all.

If there is a symlink issue, we should just make it skip those.

Cheers,

Richard