[Buildroot] [PATCH 1/1] package/zeromq: disable libbsd on static build
Fabrice Fontaine
fontaine.fabrice at gmail.com
Sat Jan 30 13:32:01 UTC 2021
Static linking with libbsd fails because of multiple definition of the
strlcpy symbol. uClibc optionally provides these symbols.
So disable libbsd on zeromq when linking statically to avoid the
following build failure with bitcoin and zeromq:
CXXLD bitcoind
/tmp/instance-1/output-1/host/lib/gcc/powerpc-buildroot-linux-uclibc/9.3.0/../../../../powerpc-buildroot-linux-uclibc/bin/ld: /tmp/instance-1/output-1/host/powerpc-buildroot-linux-uclibc/sysroot/usr/lib//libc.a(strlcpy.os): in function `__GI_strlcpy':
strlcpy.c:(.text+0x0): multiple definition of `strlcpy'; /tmp/instance-1/output-1/host/powerpc-buildroot-linux-uclibc/sysroot/usr/lib/libbsd.a(strlcpy.o):strlcpy.c:(.text+0x0): first defined here
Fixes:
- http://autobuild.buildroot.org/results/ba87544d42ad5e77a27a7a504bc6336a06f6e291
Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
---
package/zeromq/zeromq.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/zeromq/zeromq.mk b/package/zeromq/zeromq.mk
index 182699403c..495f1aa5a3 100644
--- a/package/zeromq/zeromq.mk
+++ b/package/zeromq/zeromq.mk
@@ -68,7 +68,7 @@ else
ZEROMQ_CONF_OPTS += --without-tls
endif
-ifeq ($(BR2_PACKAGE_LIBBSD),y)
+ifeq ($(BR2_PACKAGE_LIBBSD):$(BR2_STATIC_LIBS),y:)
ZEROMQ_DEPENDENCIES += host-pkgconf libbsd
ZEROMQ_CONF_OPTS += --enable-libbsd
else
--
2.29.2
More information about the buildroot
mailing list