babeltrace2: Define LDCXXSHARED
PATCH 1/1 babeltrace2: Define LDCXXSHARED
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
Define LDCXXSHARED like it is in setuptools-base class
[1] https://github.com/pypa/setuptools/commit/2c937116cc0dcd9b26b6070e89a3dc5dcbedc2ae
--- meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb +2 -0
@@ -23,6 +23,8 @@ inherit autotools pkgconfig ptest python3targetconfig EXTRA_OECONF = "--disable-debug-info --disable-Werror --enable-python-plugins --enable-python-bindings" +export LDCXXSHARED = "{CXX} -shared" + export DISTSETUPOPTS = " --install-lib=${PYTHON_SITEPACKAGES_DIR}" PACKAGECONFIG ??= "manpages"
Hi Khem,
Quoted 28 lines · Khem Raj via lists.openembedded.org
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
Define LDCXXSHARED like it is in setuptools-base class
[1] https://github.com/pypa/setuptools/commit/2c937116cc0dcd9b26b6070e89a3dc5dcbedc2ae
Signed-off-by Khem Raj <[email protected]>--- meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb | 2 ++ 1 file changed, 2 insertions(+)meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb +0
-0
meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb inherit autotools pkgconfig ptest python3targetconfig · line 26
Quoted 4 lines
meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb +1
-0@@ -23,6 +23,8 @@ inherit autotools pkgconfig ptest python3targetconfig EXTRA_OECONF = "--disable-debug-info --disable-Werror --enable-python-plugins --enable-python-bindings" +export LDCXXSHARED = "{CXX} -shared"
It seems that the {CXX} should be ${CXX} ?
// Robert
Quoted 15 lines
meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb +1
-1+ export DISTSETUPOPTS = " --install-lib=${PYTHON_SITEPACKAGES_DIR}" PACKAGECONFIG ??= "manpages" -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#222488): https://lists.openembedded.org/g/openembedded-core/message/222488
Mute This Topic: https://lists.openembedded.org/mt/114912971/3616940
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-