* [Buildroot] [PATCH 1/1] package/meson: fix pkg-config --static
@ 2020-02-15 15:26 Fabrice Fontaine
2020-02-20 9:29 ` Arnout Vandecappelle
2020-04-12 19:14 ` Thomas Petazzoni
0 siblings, 2 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2020-02-15 15:26 UTC (permalink / raw)
To: buildroot
pkg-config wrapper is not used since commit
4e0bc29993376613d200e892d491e31ea5a49622, this raise static build
failures with libglib2 because --static is not passed anymore to
pkg-config so add a patch to get back the old behaviour.
Fixes:
- http://autobuild.buildroot.org/results/0d36952def63cb69628697fa6408aeb6ce10cb5b
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...dencies-base.py-add-pkg_config_stati.patch | 38 +++++++++++++++++++
package/meson/cross-compilation.conf.in | 1 +
package/pkg-meson.mk | 1 +
3 files changed, 40 insertions(+)
create mode 100644 package/meson/0004-mesonbuild-dependencies-base.py-add-pkg_config_stati.patch
diff --git a/package/meson/0004-mesonbuild-dependencies-base.py-add-pkg_config_stati.patch b/package/meson/0004-mesonbuild-dependencies-base.py-add-pkg_config_stati.patch
new file mode 100644
index 0000000000..7bb00f3fba
--- /dev/null
+++ b/package/meson/0004-mesonbuild-dependencies-base.py-add-pkg_config_stati.patch
@@ -0,0 +1,38 @@
+From 3a4962ede0d12bac66b38e0843f6e2ea75b03d50 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 at exe/gio-tool.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-cat.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-copy.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-info.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-list.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-mime.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-mkdir.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-monitor.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-mount.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-move.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-open.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-rename.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-remove.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-save.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-set.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-trash.c.o' 'gio/6ae6c9e@@gio at 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>
+---
+ mesonbuild/dependencies/base.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
+index a83e3d6c..913bff6b 100644
+--- a/mesonbuild/dependencies/base.py
++++ b/mesonbuild/dependencies/base.py
+@@ -840,7 +840,7 @@ class PkgConfigDependency(ExternalDependency):
+ def _set_libs(self):
+ env = None
+ libcmd = [self.name, '--libs']
+- if self.static:
++ if self.static or self.env.properties[self.for_machine].get('pkg_config_static', False):
+ libcmd.append('--static')
+ # Force pkg-config to output -L fields even if they are system
+ # paths so we can do manual searching with cc.find_library() later.
+--
+2.24.1
+
diff --git a/package/meson/cross-compilation.conf.in b/package/meson/cross-compilation.conf.in
index 369e225b3e..d80c472de6 100644
--- a/package/meson/cross-compilation.conf.in
+++ b/package/meson/cross-compilation.conf.in
@@ -18,6 +18,7 @@ cpp_args = [@TARGET_CXXFLAGS@]
cpp_link_args = [@TARGET_LDFLAGS@]
sys_root = '@STAGING_DIR@'
pkg_config_libdir = '@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig'
+pkg_config_static = '@STATIC@'
[host_machine]
system = 'linux'
diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
index 642b715938..9482845cd3 100644
--- a/package/pkg-meson.mk
+++ b/package/pkg-meson.mk
@@ -76,6 +76,7 @@ define $(2)_CONFIGURE_CMDS
-e 's%@TARGET_CXXFLAGS@%$$(call make-comma-list,$$($(2)_CXXFLAGS))%g' \
-e 's%@HOST_DIR@%$$(HOST_DIR)%g' \
-e 's%@STAGING_DIR@%$$(STAGING_DIR)%g' \
+ -e 's%@STATIC@%$$(if $$(BR2_STATIC_LIBS),true,false)%g' \
$$(foreach x,$$($(2)_MESON_EXTRA_BINARIES), \
-e "/^\[binaries\]$$$$/s:$$$$:\n$$(x):" \
) \
--
2.24.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [Buildroot] [PATCH 1/1] package/meson: fix pkg-config --static
2020-02-15 15:26 [Buildroot] [PATCH 1/1] package/meson: fix pkg-config --static Fabrice Fontaine
@ 2020-02-20 9:29 ` Arnout Vandecappelle
2020-02-20 9:31 ` Fabrice Fontaine
2020-04-12 19:14 ` Thomas Petazzoni
1 sibling, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle @ 2020-02-20 9:29 UTC (permalink / raw)
To: buildroot
On 15/02/2020 16:26, Fabrice Fontaine wrote:
> pkg-config wrapper is not used since commit
> 4e0bc29993376613d200e892d491e31ea5a49622, this raise static build
> failures with libglib2 because --static is not passed anymore to
> pkg-config so add a patch to get back the old behaviour.
>
> Fixes:
> - http://autobuild.buildroot.org/results/0d36952def63cb69628697fa6408aeb6ce10cb5b
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...dencies-base.py-add-pkg_config_stati.patch | 38 +++++++++++++++++++
> package/meson/cross-compilation.conf.in | 1 +
> package/pkg-meson.mk | 1 +
> 3 files changed, 40 insertions(+)
> create mode 100644 package/meson/0004-mesonbuild-dependencies-base.py-add-pkg_config_stati.patch
>
> diff --git a/package/meson/0004-mesonbuild-dependencies-base.py-add-pkg_config_stati.patch b/package/meson/0004-mesonbuild-dependencies-base.py-add-pkg_config_stati.patch
> new file mode 100644
> index 0000000000..7bb00f3fba
> --- /dev/null
> +++ b/package/meson/0004-mesonbuild-dependencies-base.py-add-pkg_config_stati.patch
> @@ -0,0 +1,38 @@
> +From 3a4962ede0d12bac66b38e0843f6e2ea75b03d50 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 at exe/gio-tool.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-cat.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-copy.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-info.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-list.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-mime.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-mkdir.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-monitor.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-mount.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-move.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-open.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-rename.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-remove.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-save.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-set.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-trash.c.o' 'gio/6ae6c9e@@gio at 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-build
> root-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>
> +---
> + mesonbuild/dependencies/base.py | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
> +index a83e3d6c..913bff6b 100644
> +--- a/mesonbuild/dependencies/base.py
> ++++ b/mesonbuild/dependencies/base.py
> +@@ -840,7 +840,7 @@ class PkgConfigDependency(ExternalDependency):
> + def _set_libs(self):
> + env = None
> + libcmd = [self.name, '--libs']
> +- if self.static:
> ++ if self.static or self.env.properties[self.for_machine].get('pkg_config_static', False):
Looks OK-ish to me, *if* we can get it accepted upstream. As is, it probably
won't get accepted because it misses a documentation update.
Maybe we should go upstream and ask advice...
Regards,
Arnout
> + libcmd.append('--static')
> + # Force pkg-config to output -L fields even if they are system
> + # paths so we can do manual searching with cc.find_library() later.
> +--
> +2.24.1
> +
> diff --git a/package/meson/cross-compilation.conf.in b/package/meson/cross-compilation.conf.in
> index 369e225b3e..d80c472de6 100644
> --- a/package/meson/cross-compilation.conf.in
> +++ b/package/meson/cross-compilation.conf.in
> @@ -18,6 +18,7 @@ cpp_args = [@TARGET_CXXFLAGS@]
> cpp_link_args = [@TARGET_LDFLAGS@]
> sys_root = '@STAGING_DIR@'
> pkg_config_libdir = '@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig'
> +pkg_config_static = '@STATIC@'
>
> [host_machine]
> system = 'linux'
> diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
> index 642b715938..9482845cd3 100644
> --- a/package/pkg-meson.mk
> +++ b/package/pkg-meson.mk
> @@ -76,6 +76,7 @@ define $(2)_CONFIGURE_CMDS
> -e 's%@TARGET_CXXFLAGS@%$$(call make-comma-list,$$($(2)_CXXFLAGS))%g' \
> -e 's%@HOST_DIR@%$$(HOST_DIR)%g' \
> -e 's%@STAGING_DIR@%$$(STAGING_DIR)%g' \
> + -e 's%@STATIC@%$$(if $$(BR2_STATIC_LIBS),true,false)%g' \
> $$(foreach x,$$($(2)_MESON_EXTRA_BINARIES), \
> -e "/^\[binaries\]$$$$/s:$$$$:\n$$(x):" \
> ) \
>
^ permalink raw reply [flat|nested] 5+ messages in thread* [Buildroot] [PATCH 1/1] package/meson: fix pkg-config --static
2020-02-20 9:29 ` Arnout Vandecappelle
@ 2020-02-20 9:31 ` Fabrice Fontaine
0 siblings, 0 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2020-02-20 9:31 UTC (permalink / raw)
To: buildroot
Le jeu. 20 f?vr. 2020 ? 10:29, Arnout Vandecappelle <arnout@mind.be> a ?crit :
>
>
>
> On 15/02/2020 16:26, Fabrice Fontaine wrote:
> > pkg-config wrapper is not used since commit
> > 4e0bc29993376613d200e892d491e31ea5a49622, this raise static build
> > failures with libglib2 because --static is not passed anymore to
> > pkg-config so add a patch to get back the old behaviour.
> >
> > Fixes:
> > - http://autobuild.buildroot.org/results/0d36952def63cb69628697fa6408aeb6ce10cb5b
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> > ...dencies-base.py-add-pkg_config_stati.patch | 38 +++++++++++++++++++
> > package/meson/cross-compilation.conf.in | 1 +
> > package/pkg-meson.mk | 1 +
> > 3 files changed, 40 insertions(+)
> > create mode 100644 package/meson/0004-mesonbuild-dependencies-base.py-add-pkg_config_stati.patch
> >
> > diff --git a/package/meson/0004-mesonbuild-dependencies-base.py-add-pkg_config_stati.patch b/package/meson/0004-mesonbuild-dependencies-base.py-add-pkg_config_stati.patch
> > new file mode 100644
> > index 0000000000..7bb00f3fba
> > --- /dev/null
> > +++ b/package/meson/0004-mesonbuild-dependencies-base.py-add-pkg_config_stati.patch
> > @@ -0,0 +1,38 @@
> > +From 3a4962ede0d12bac66b38e0843f6e2ea75b03d50 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 at exe/gio-tool.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-cat.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-copy.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-info.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-list.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-mime.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-mkdir.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-monitor.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-mount.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-move.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-open.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-rename.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-remove.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-save.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-set.c.o' 'gio/6ae6c9e@@gio at exe/gio-tool-trash.c.o' 'gio/6ae6c9e@@gio at 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-build
> > root-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>
> > +---
> > + mesonbuild/dependencies/base.py | 2 +-
> > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > +
> > +diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
> > +index a83e3d6c..913bff6b 100644
> > +--- a/mesonbuild/dependencies/base.py
> > ++++ b/mesonbuild/dependencies/base.py
> > +@@ -840,7 +840,7 @@ class PkgConfigDependency(ExternalDependency):
> > + def _set_libs(self):
> > + env = None
> > + libcmd = [self.name, '--libs']
> > +- if self.static:
> > ++ if self.static or self.env.properties[self.for_machine].get('pkg_config_static', False):
>
> Looks OK-ish to me, *if* we can get it accepted upstream. As is, it probably
> won't get accepted because it misses a documentation update.
>
> Maybe we should go upstream and ask advice...
I opened a PR here: https://github.com/mesonbuild/meson/pull/6629.
I already got some feedback however I don't know yet if it will be accepted.
>
>
> Regards,
> Arnout
>
> > + libcmd.append('--static')
> > + # Force pkg-config to output -L fields even if they are system
> > + # paths so we can do manual searching with cc.find_library() later.
> > +--
> > +2.24.1
> > +
> > diff --git a/package/meson/cross-compilation.conf.in b/package/meson/cross-compilation.conf.in
> > index 369e225b3e..d80c472de6 100644
> > --- a/package/meson/cross-compilation.conf.in
> > +++ b/package/meson/cross-compilation.conf.in
> > @@ -18,6 +18,7 @@ cpp_args = [@TARGET_CXXFLAGS@]
> > cpp_link_args = [@TARGET_LDFLAGS@]
> > sys_root = '@STAGING_DIR@'
> > pkg_config_libdir = '@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig'
> > +pkg_config_static = '@STATIC@'
> >
> > [host_machine]
> > system = 'linux'
> > diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
> > index 642b715938..9482845cd3 100644
> > --- a/package/pkg-meson.mk
> > +++ b/package/pkg-meson.mk
> > @@ -76,6 +76,7 @@ define $(2)_CONFIGURE_CMDS
> > -e 's%@TARGET_CXXFLAGS@%$$(call make-comma-list,$$($(2)_CXXFLAGS))%g' \
> > -e 's%@HOST_DIR@%$$(HOST_DIR)%g' \
> > -e 's%@STAGING_DIR@%$$(STAGING_DIR)%g' \
> > + -e 's%@STATIC@%$$(if $$(BR2_STATIC_LIBS),true,false)%g' \
> > $$(foreach x,$$($(2)_MESON_EXTRA_BINARIES), \
> > -e "/^\[binaries\]$$$$/s:$$$$:\n$$(x):" \
> > ) \
> >
Best Regards,
Fabrice
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] package/meson: fix pkg-config --static
2020-02-15 15:26 [Buildroot] [PATCH 1/1] package/meson: fix pkg-config --static Fabrice Fontaine
2020-02-20 9:29 ` Arnout Vandecappelle
@ 2020-04-12 19:14 ` Thomas Petazzoni
2020-06-10 22:48 ` Romain Naour
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2020-04-12 19:14 UTC (permalink / raw)
To: buildroot
Hello,
On Sat, 15 Feb 2020 16:26:20 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> pkg-config wrapper is not used since commit
> 4e0bc29993376613d200e892d491e31ea5a49622, this raise static build
> failures with libglib2 because --static is not passed anymore to
> pkg-config so add a patch to get back the old behaviour.
>
> Fixes:
> - http://autobuild.buildroot.org/results/0d36952def63cb69628697fa6408aeb6ce10cb5b
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...dencies-base.py-add-pkg_config_stati.patch | 38 +++++++++++++++++++
> package/meson/cross-compilation.conf.in | 1 +
> package/pkg-meson.mk | 1 +
> 3 files changed, 40 insertions(+)
> create mode 100644 package/meson/0004-mesonbuild-dependencies-base.py-add-pkg_config_stati.patch
So, the feedback from upstream at
https://github.com/mesonbuild/meson/pull/6629 was not very positive,
and they suggested how it should be implemented.
However, in the mean time, we are a bit screwed, and libglib2 has
continued to fail building consistently in our autobuilders since then.
Since your solution Fabrice is simple enough and straightforward, I
decided to apply it nevertheless. I just made sure setting the STATIC
property is done in both the per-package cross-compilation.conf and the
global cross-compilation.conf.
It would however be nice to keep working on the issue with upstream, so
that we get a proper solution at some point in the future.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] package/meson: fix pkg-config --static
2020-04-12 19:14 ` Thomas Petazzoni
@ 2020-06-10 22:48 ` Romain Naour
0 siblings, 0 replies; 5+ messages in thread
From: Romain Naour @ 2020-06-10 22:48 UTC (permalink / raw)
To: buildroot
Hi Thomas, Fabrice,
Le 12/04/2020 ? 21:14, Thomas Petazzoni a ?crit?:
> Hello,
>
> On Sat, 15 Feb 2020 16:26:20 +0100
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>
>> pkg-config wrapper is not used since commit
>> 4e0bc29993376613d200e892d491e31ea5a49622, this raise static build
>> failures with libglib2 because --static is not passed anymore to
>> pkg-config so add a patch to get back the old behaviour.
>>
>> Fixes:
>> - http://autobuild.buildroot.org/results/0d36952def63cb69628697fa6408aeb6ce10cb5b
>>
>> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>> ---
>> ...dencies-base.py-add-pkg_config_stati.patch | 38 +++++++++++++++++++
>> package/meson/cross-compilation.conf.in | 1 +
>> package/pkg-meson.mk | 1 +
>> 3 files changed, 40 insertions(+)
>> create mode 100644 package/meson/0004-mesonbuild-dependencies-base.py-add-pkg_config_stati.patch
>
> So, the feedback from upstream at
> https://github.com/mesonbuild/meson/pull/6629 was not very positive,
> and they suggested how it should be implemented.
>
> However, in the mean time, we are a bit screwed, and libglib2 has
> continued to fail building consistently in our autobuilders since then.
>
> Since your solution Fabrice is simple enough and straightforward, I
> decided to apply it nevertheless. I just made sure setting the STATIC
> property is done in both the per-package cross-compilation.conf and the
> global cross-compilation.conf.
>
> It would however be nice to keep working on the issue with upstream, so
> that we get a proper solution at some point in the future.
It seems this patch introduced a build issue with libgbm mesa3d:
http://autobuild.buildroot.net/results/1b5/1b58d73ecbbe1af2c3e140563d696cf32d1c4a5a/build-end.log
See initial discussions:
http://lists.busybox.net/pipermail/buildroot/2020-June/284543.html
By reverting this patch allow to build the following defconfig:
BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_VALGRIND=y
BR2_PACKAGE_VALGRIND_SGCHECK=y
BR2_PACKAGE_VALGRIND_BBV=y
BR2_PACKAGE_VALGRIND_LACKEY=y
BR2_PACKAGE_VALGRIND_NULGRIND=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y
That's because --static is always used while calling pkg-config.
Doing so in mesa build add valgrind static libraries while building shared
library libgbm.so.
Best regards,
Romain
>
> Thanks,
>
> Thomas
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-06-10 22:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-15 15:26 [Buildroot] [PATCH 1/1] package/meson: fix pkg-config --static Fabrice Fontaine
2020-02-20 9:29 ` Arnout Vandecappelle
2020-02-20 9:31 ` Fabrice Fontaine
2020-04-12 19:14 ` Thomas Petazzoni
2020-06-10 22:48 ` Romain Naour
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.