3118b7e222
The meson upgrade from 1.1.1 to 1.2.0 have been reverted because
host-qemu (version v8.0.3) was searching libraries in the build machine
instead of buildroot host directory [1].
$ grep -r LINK_ARGS * | grep "\-L/usr"
build.ninja: LINK_ARGS =
-L/usr/lib/gcc/x86_64-linux-gnu/10 \
-L/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu \
-L/usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib -L/usr/lib \
-L/lib/x86_64-linux-gnu \
-L/lib/../lib \
-L/usr/lib/../lib \
-L/usr/lib/gcc/x86_64-linux-gnu/10/../../.. \
-L/lib \
-I/[...]/host/include \
-L/[...]/host/lib \
-I/[...]/host/include/libfdt \
...
Upgrading qemu to version v8.1.0 solves the problem:
$ grep -r LINK_ARGS * | grep "\-L/usr"
build.ninja: LINK_ARGS =
-I/[...]/host/include \
-L/[...]/host/lib \
-I/[...]/host/include/libfdt \
...
Those two tests were done with the same buildroot version (2023.08) on
the same machine were the bug appeared. Using, git bisect, in this
environment, it was found that the problem was fixed in qemu by the
commit [2].
Thus, it is possible that the problem was introduced by improper use of
meson by qemu <= v8.0.3. Also, meson has been updated to version 1.2.1
and 1.3.0 in yocto and it doesn't seem to create any issue. [3]
The original problem is no longer present and some projects require
meson > 1.1.1 (e.g. rusticl requires meson 1.2.0 since mesa 23.3.0 and
meson 1.3.1 since mesa 24.0.0).
"pkgconfig" field is deprecated by meson 1.3.0 and replaced by
"pkg-config". See: [4]
The patch that adds the pkg_config_static property has been rebased.
[1] acfdf21f0b
[2] https://gitlab.com/qemu-project/qemu/-/commit/Fc9a809e0d28417fa1e7f7efc19f845bda4c1be9
[3] https://github.com/yoctoproject/poky/commits/master/meta/recipes-devtools/meson
[4] https://mesonbuild.com/Release-notes-for-1-3-0.html#machine-files-pkgconfig-field-deprecated-and-replaced-by-pkgconfig
Signed-off-by: Antoine Coutant <antoine.coutant@smile.fr>
[yann.morin.1998@free.fr:
- keep our formatting in the patch
- reflow commit log (to keep busy while test-building!)
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
46 lines
3.7 KiB
Diff
46 lines
3.7 KiB
Diff
From 59934e2116e025ecfe23baf6febc4a0eb85f60cd Mon Sep 17 00:00:00 2001
|
|
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Date: Sat, 15 Feb 2020 15:13:59 +0100
|
|
Subject: [PATCH] mesonbuild/dependencies/base.py: add pkg_config_static
|
|
|
|
Allow the user to always call pkg-config with --static thanks to a
|
|
pkg_config_static property. This will allow to fix static build failures
|
|
with libglib2:
|
|
|
|
FAILED: gio/gio
|
|
/home/naourr/work/instance-0/output-1/host/bin/arm-linux-gcc -o gio/gio 'gio/6ae6c9e@@gio@exe/gio-tool.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-cat.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-copy.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-info.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-list.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-mime.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-mkdir.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-monitor.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-mount.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-move.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-open.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-rename.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-remove.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-save.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-set.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-trash.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-tree.c.o' -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -static -Wl,--start-group gio/libgio-2.0.a glib/libglib-2.0.a gobject/libgobject-2.0.a gmodule/libgmodule-2.0.a -pthread /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libz.a /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libmount.a /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libpcre.a -lm /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libffi.a -Wl,--end-group '-Wl,-rpath,$ORIGIN/:$ORIGIN/../glib:$ORIGIN/../gobject:$ORIGIN/../gmodule' -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/gio -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/glib -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/gobject -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/gmodule
|
|
/home/naourr/work/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libmount.a(la-fs.o): in function `__mnt_fs_set_source_ptr':
|
|
fs.c:(.text+0x5ec): undefined reference to `blkid_parse_tag_string'
|
|
|
|
Fixes:
|
|
- http://autobuild.buildroot.org/results/0d36952def63cb69628697fa6408aeb6ce10cb5b
|
|
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
[Romain: Fix if condition, pkg_config_static is a string not a boolean]
|
|
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
|
[Rebased on 0.57.1]
|
|
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
|
[rebased on 1.3.0]
|
|
Signed-off-by: Antoine Coutant <antoine.coutant@smile.fr>
|
|
---
|
|
mesonbuild/dependencies/pkgconfig.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/mesonbuild/dependencies/pkgconfig.py b/mesonbuild/dependencies/pkgconfig.py
|
|
index e86206b88..94888657d 100644
|
|
--- a/mesonbuild/dependencies/pkgconfig.py
|
|
+++ b/mesonbuild/dependencies/pkgconfig.py
|
|
@@ -169,7 +169,8 @@ class PkgConfigCLI(PkgConfigInterface):
|
|
env['PKG_CONFIG_ALLOW_SYSTEM_LIBS'] = '1'
|
|
args: T.List[str] = []
|
|
args += self._define_variable_args(define_variable)
|
|
- if static:
|
|
+ if static or \
|
|
+ (self.env.properties[self.for_machine].get('pkg_config_static', None) == 'true'):
|
|
args.append('--static')
|
|
args += ['--libs', name]
|
|
ret, out, err = self._call_pkgbin(args, env=env)
|
|
--
|
|
2.25.1
|
|
|