From patchwork Tue Aug 28 09:23:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 962789 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=embedded.rocks Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4203Gm4PvSz9s1x for ; Tue, 28 Aug 2018 19:24:00 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 012DB86631; Tue, 28 Aug 2018 09:23:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FIJ0NWp4+2vt; Tue, 28 Aug 2018 09:23:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 2D7388647B; Tue, 28 Aug 2018 09:23:57 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 1DC661CF2D1 for ; Tue, 28 Aug 2018 09:23:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 19C978647B for ; Tue, 28 Aug 2018 09:23:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TLO6oRzFiNUr for ; Tue, 28 Aug 2018 09:23:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.141]) by hemlock.osuosl.org (Postfix) with ESMTPS id 6D9C886402 for ; Tue, 28 Aug 2018 09:23:53 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 45DE920DD0 for ; Tue, 28 Aug 2018 11:23:50 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4203GY2wcWz6tmH for ; Tue, 28 Aug 2018 11:23:49 +0200 (CEST) Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id JQG6EcPdfFMm; Tue, 28 Aug 2018 11:23:47 +0200 (CEST) Received: from nzxt.fritz.box (port-92-195-114-104.dynamic.qsc.de [92.195.114.104]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Tue, 28 Aug 2018 11:23:47 +0200 (CEST) From: =?utf-8?q?J=C3=B6rg_Krause?= To: buildroot@buildroot.org Date: Tue, 28 Aug 2018 11:23:45 +0200 Message-Id: <20180828092345.18443-1-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/shairport-sync: add upstream patch to fix build issue with soxr X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add upstream patch to fix build issue detected by the Buildroot autobuilder: ``` arm-buildroot-linux-uclibcgnueabi/sysroot/usr//lib/libsoxr.a(soxr.c.o): In function `soxr_create': soxr.c:(.text+0xd4c): undefined reference to `av_get_cpu_flags' collect2: error: ld returned 1 exit status ``` A quick look at the soxr source code shows that `soxr_create()` might use `av_get_cpu_flags()` depending on the architecture. For the sake of simplicity link with `-lavutil` if it is found when using soxr. Even better, as soxr provides a pkg-config file, this should be prefered. Upstream issue: https://github.com/mikebrady/shairport-sync/issues/733 Upstream status: 5101ab2d13e2b89ea3c1276df5fb7413634eeccd Fixes: http://autobuild.buildroot.net/results/53d/53d21686780aa2485745b59e812b6280dd39f1c5 http://autobuild.buildroot.net/results/605/60576363adfca404c3a7883d5d46e8a4a9ee8171 http://autobuild.buildroot.net/results/806/806867ab1c6f42ad1b34d44844efc57272d48235 http://autobuild.buildroot.net/results/840/840810601fbb8a7957ea9dae175b959a7f9b7491 .. and more. Signed-off-by: Jörg Krause --- ...ibsoxr-is-built-to-rely-on-libavutil.patch | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 package/shairport-sync/0001-Sometimes-libsoxr-is-built-to-rely-on-libavutil.patch diff --git a/package/shairport-sync/0001-Sometimes-libsoxr-is-built-to-rely-on-libavutil.patch b/package/shairport-sync/0001-Sometimes-libsoxr-is-built-to-rely-on-libavutil.patch new file mode 100644 index 0000000000..32c52add33 --- /dev/null +++ b/package/shairport-sync/0001-Sometimes-libsoxr-is-built-to-rely-on-libavutil.patch @@ -0,0 +1,63 @@ +From 5101ab2d13e2b89ea3c1276df5fb7413634eeccd Mon Sep 17 00:00:00 2001 +From: Mike Brady +Date: Sat, 25 Aug 2018 13:08:37 +0100 +Subject: [PATCH] Sometimes libsoxr is built to rely on libavutil. If libavutil + is detected, link to it when building libsoxr. Add pgk_config support to soxr + selection. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The Buildroot autobuilder detected a build issue [0] when building +shairport-sync statically: + +``` +arm-buildroot-linux-uclibcgnueabi/sysroot/usr//lib/libsoxr.a(soxr.c.o): In function `soxr_create': +soxr.c:(.text+0xd4c): undefined reference to `av_get_cpu_flags' +collect2: error: ld returned 1 exit status +``` + +A quick look at the soxr source code shows that `soxr_create()` might use +`av_get_cpu_flags()` depending on the architecture. + +For the sake of simplicity link with `-lavutil` if it is found when using soxr. + +Even better, as soxr provides a pkg-config file, this should be prefered. + +[0] http://autobuild.buildroot.org/results/53d/53d21686780aa2485745b59e812b6280dd39f1c5 + +Upstream status: 5101ab2d13e2b89ea3c1276df5fb7413634eeccd + +Signed-off-by: Jörg Krause +--- + configure.ac | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 0c917a4..2b6fddb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -176,7 +176,20 @@ AC_ARG_WITH(ssl, [ choose --with-ssl=openssl, --with-ssl=mbedtls or --with-ssl=p + # Look for soxr flag + AC_ARG_WITH(soxr, [ --with-soxr = choose libsoxr for high-quality interpolation], [ + AC_MSG_RESULT(>>Including support for soxr-based interpolation) +- AC_CHECK_LIB([soxr],[soxr_create], , AC_MSG_ERROR(soxr support requested but libsoxr not found!))], ) ++ if test "x${with_pkg_config}" = xyes ; then ++ PKG_CHECK_MODULES( ++ [SOXR], [soxr], ++ [LIBS="${SOXR_LIBS} ${LIBS}"]) ++ else ++ AC_CHECK_LIB([avutil],[av_get_cpu_flags]) ++ if test "x${ac_cv_lib_avutil_av_get_cpu_flags}" = xyes ; then ++ # soxr may link against libavutil, depending on the architecture, but for the sake of simplicity link with it if it is found ++ AC_CHECK_LIB([soxr],[soxr_create], , AC_MSG_ERROR(soxr support requested but libsoxr not found!), [-lavutil]) ++ else ++ AC_CHECK_LIB([soxr],[soxr_create], , AC_MSG_ERROR(soxr support requested but libsoxr not found!)) ++ fi ++ fi ++], ) + + # Look for metadata flag -- set flag for conditional compilation + AC_ARG_WITH(metadata, [ --with-metadata = include support for a metadata feed], [ +-- +2.18.0