All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/pkgconf: fix BR2_SHARED_STATIC_LIBS build
@ 2022-04-16 21:13 Fabrice Fontaine
  2022-04-23 14:40 ` Arnout Vandecappelle
  0 siblings, 1 reply; 7+ messages in thread
From: Fabrice Fontaine @ 2022-04-16 21:13 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Add --static when calling pkg-config with BR2_SHARED_STATIC_LIBS to
avoid the following build failure if a package (e.g. dash or zabbix)
decide to use the static library of of its dependency instead of the
shared library (e.g. edit or openssl) resulting in the following build
failures:

/home/autobuild/autobuild/instance-3/output-1/host/lib/gcc/powerpc64-buildroot-linux-gnu/10.3.0/../../../../powerpc64-buildroot-linux-gnu/bin/ld: /home/autobuild/autobuild/instance-3/output-1/host/bin/../powerpc64-buildroot-linux-gnu/sysroot/usr/lib/libedit.a(terminal.o): in function `terminal_tputs':
terminal.c:(.text+0x1d4): undefined reference to `tputs'

/nvmedata/autobuild/instance-28/output-1/host/lib/gcc/powerpc64le-buildroot-linux-gnu/10.3.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: /nvmedata/autobuild/instance-28/output-1/host/powerpc64le-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.a(dso_dlfcn.o): in function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x28): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

Fixes:
 - http://autobuild.buildroot.org/results/2032d6b1233ce5c79a0c9421052ab1b9184c5b89
 - http://autobuild.buildroot.org/results/b0e1bd19f0612a0e90d89ad8fe9e294f57871f6b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/pkgconf/pkgconf.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/pkgconf/pkgconf.mk b/package/pkgconf/pkgconf.mk
index 5d65f69c10..c40c8b9433 100644
--- a/package/pkgconf/pkgconf.mk
+++ b/package/pkgconf/pkgconf.mk
@@ -35,10 +35,10 @@ endef
 PKGCONF_POST_INSTALL_TARGET_HOOKS += PKGCONF_LINK_PKGCONFIG
 HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_INSTALL_WRAPPER
 
-ifeq ($(BR2_STATIC_LIBS),y)
-HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_STATIC
-else
+ifeq ($(BR2_SHARED_LIBS),y)
 HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_SHARED
+else
+HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_STATIC
 endif
 
 $(eval $(autotools-package))
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-04-26 20:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-16 21:13 [Buildroot] [PATCH 1/1] package/pkgconf: fix BR2_SHARED_STATIC_LIBS build Fabrice Fontaine
2022-04-23 14:40 ` Arnout Vandecappelle
2022-04-23 16:49   ` Fabrice Fontaine
2022-04-24 15:03     ` [Buildroot] Removing BR2_SHARED_STATIC_LIBS [was: [PATCH 1/1] package/pkgconf: fix BR2_SHARED_STATIC_LIBS build] Arnout Vandecappelle
2022-04-24 16:33       ` Yann E. MORIN
2022-04-25  5:42         ` Arnout Vandecappelle
2022-04-26 20:22           ` Petr Vorel

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.