[Buildroot] [git commit] package/libtorrent: fix build with libexecinfo

Peter Korsgaard peter at korsgaard.com
Mon Mar 7 19:10:48 UTC 2022


commit: https://git.buildroot.net/buildroot/commit/?id=301b7c3c8120e6bd05872777b6c292ebc8230a27
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Fix the following build failure on rtorrent raised on uclibc and musl
since the addition of libexecinfo package in commit
eea8ba446c10701a273432552108d80fb2224ef4:

/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-musl/10.3.0/../../../../x86_64-buildroot-linux-musl/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/x86_64-buildroot-linux-musl/sysroot/usr/lib/libtorrent.so: undefined reference to `backtrace_symbols'

Fixes:
 - http://autobuild.buildroot.org/results/6cb4ba56fc0a3a8bd02b246ab9bc82edaa552ad9

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/libtorrent/libtorrent.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/libtorrent/libtorrent.mk b/package/libtorrent/libtorrent.mk
index c8310cab65..b966a72788 100644
--- a/package/libtorrent/libtorrent.mk
+++ b/package/libtorrent/libtorrent.mk
@@ -14,6 +14,11 @@ LIBTORRENT_INSTALL_STAGING = YES
 LIBTORRENT_LICENSE = GPL-2.0
 LIBTORRENT_LICENSE_FILES = COPYING
 
+ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
+LIBTORRENT_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lexecinfo"
+LIBTORRENT_DEPENDENCIES += libexecinfo
+endif
+
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 LIBTORRENT_CONF_OPTS += --enable-openssl
 LIBTORRENT_DEPENDENCIES += openssl



More information about the buildroot mailing list