]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
babeltrace2: Disable ccache explicitly and inherit setuptools3-base
authorKhem Raj <raj.khem@gmail.com>
Thu, 28 Aug 2025 19:37:50 +0000 (12:37 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 1 Sep 2025 22:07:03 +0000 (23:07 +0100)
ccache does not work with this package

python plugins use setuptools/distutils to build and it tries to compute
LDCXXSHARED as described in [1] in /src/bindings/python/bt2/setup.py.in
It gets confused and ends up specifying compiler twice and the result is
that linker fails with cryptic errors e.g.

| /mnt/b/yoe/master/sources/poky/build/tmp/work/x86-64-v3-poky-linux-musl/babeltrace2/2.1.1/recipe-sysroot-native/usr/bin/x86_64-poky-linux-musl/../../libexec/x86_64-poky-linux-musl/gcc/x86_64-poky-linux-musl/15.2.0/ld: cannot find x86_64-poky-linux-musl-g++: No such file or directory
| collect2: error: ld returned 1 exit status
| error: command '/mnt/b/yoe/master/sources/poky/build/tmp/hosttools/ccache' failed with exit code 1
| make[3]: *** [Makefile:741: build-python-bindings.stamp] Error 1
| make[3]: Leaving directory '/mnt/b/yoe/master/sources/poky/build/tmp/work/x86-64-v3-poky-linux-musl/babeltrace2/2.1.1/build/src/bindings/python/bt2'

This is because first occurance of linker is encountering second linker on its
cmdline and tries to treat it as an input object to linker

It seems LDCXXSHARED computation gets confused when CXX contains ccache

[1] https://github.com/pypa/setuptools/commit/2c937116cc0dcd9b26b6070e89a3dc5dcbedc2ae

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb

index 1dc8cd8a4981e186da5ddf1416ac0f57d6160294..945f82ef34a94260aa6cc898b91a6655e818a316 100644 (file)
@@ -19,10 +19,12 @@ SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-2.1;protocol=http
 SRCREV = "7f2f8cd6dac497cbb466efb31219b531c62013f5"
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>2(\.\d+)+)$"
 
-inherit autotools pkgconfig ptest python3targetconfig
+inherit autotools pkgconfig ptest setuptools3-base
 
 EXTRA_OECONF = "--disable-debug-info --disable-Werror --enable-python-plugins --enable-python-bindings"
 
+CCACHE_DISABLE = "1"
+
 export DISTSETUPOPTS = " --install-lib=${PYTHON_SITEPACKAGES_DIR}"
 
 PACKAGECONFIG ??= "manpages"