From patchwork Tue Nov 24 21:22:46 2015 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: 548282 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 958A914010F for ; Wed, 25 Nov 2015 08:23:15 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=embedded.rocks header.i=@embedded.rocks header.b=qYVSDrFE; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id D142486A78; Tue, 24 Nov 2015 21:23:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jEavZ-E7R4Hk; Tue, 24 Nov 2015 21:23:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 84406868FE; Tue, 24 Nov 2015 21:23:12 +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 F0FA81C04C2 for ; Tue, 24 Nov 2015 21:23:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id EDD5C8738F for ; Tue, 24 Nov 2015 21:23:10 +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 WkLBF6+oKO2j for ; Tue, 24 Nov 2015 21:23:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by hemlock.osuosl.org (Postfix) with ESMTPS id 2D08C8734F for ; Tue, 24 Nov 2015 21:23:09 +0000 (UTC) Received: from dovecot03.posteo.de (dovecot03.posteo.de [172.16.0.13]) by mout01.posteo.de (Postfix) with ESMTPS id 35B93208F7 for ; Tue, 24 Nov 2015 22:23:06 +0100 (CET) Received: from mail.posteo.de (localhost [127.0.0.1]) by dovecot03.posteo.de (Postfix) with ESMTPSA id 3p4yxj4rVFz5vMw for ; Tue, 24 Nov 2015 22:23:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.embedded.rocks (Postfix) with ESMTP id 02E17EE0C57; Tue, 24 Nov 2015 22:23:04 +0100 (CET) Authentication-Results: mail.embedded.rocks (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=embedded.rocks DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embedded.rocks; h=content-transfer-encoding:content-type:content-type :mime-version:x-mailer:message-id:date:date:subject:subject:from :from:received:received; s=default; t=1448400170; x=1449004971; bh=5fJLK/J6FZHhfiTgu8GgYcOg6EktkwUHh85JxrLqses=; b=qYVSDrFEdHQy fdFlF1C9xcoBa7paJU44Jl5oMmLdh7kGc3hb8gEPCvIO02KDLdqA7pAR5ENQZpee fElhGz7dESKIWyWEihdA2frkcQs4zlPHDDtDoflFRvNBvd7/gnBSotaWlJeasVVN Pvj/HCcqk7MKyxZ4I2lK6qeKfiFxlWUJ9g8H6BGaOuIuuokaNO9q+aH7sBoG6kq2 HgKuS151jieCO/fLd3bX3if5TAj8wyNgD4JgL3X4NI0woieHtbvxA8TAHut8IwNZ Yt0HLlwbrZCI0UJstyT+4MXm22rIzLh2DCOJwl4v5f9cZhlRibwoH7pEiAy0yxTw 5U/+1LKzow== X-Virus-Scanned: Debian amavisd-new at mail.embedded.rocks 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 PK5rm2zlWIIK; Tue, 24 Nov 2015 22:22:50 +0100 (CET) Received: from nzxt.fritz.box (x4d0ce1cb.dyn.telefonica.de [77.12.225.203]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Tue, 24 Nov 2015 22:22:50 +0100 (CET) From: =?UTF-8?q?J=C3=B6rg=20Krause?= To: buildroot@buildroot.org Date: Tue, 24 Nov 2015 22:22:46 +0100 Message-Id: <1448400166-4487-1-git-send-email-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/audiofile: add patch to fix static linking issue X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 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" Static linking userspace programs such as MPD against libaudiofile fails if FLAC is available, because libaudiofile is linked against FLAC, but this isn't expressed in the pkg-config file: [..] arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libaudiofile.a(FLAC.o): In function `FLACDecoder::reset2()': FLAC.cpp:(.text+0x58): undefined reference to `FLAC__stream_decoder_seek_absolute' /home/buildroot/build/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libaudiofile.a(FLAC.o): In function `FLACEncoder::sync2()': FLAC.cpp:(.text+0x88): undefined reference to `FLAC__stream_encoder_finish' /home/buildroot/build/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libaudiofile.a(FLAC.o): In function `FLACDecoder::~FLACDecoder()': FLAC.cpp:(.text+0xc4): undefined reference to `FLAC__stream_decoder_delete' /home/buildroot/build/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libaudiofile.a(FLAC.o): In function `FLACEncoder::~FLACEncoder()': FLAC.cpp:(.text+0x164): undefined reference to `FLAC__stream_encoder_delete' /home/buildroot/build/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libaudiofile.a(FLAC.o): In function `FLACDecoder::runPull()': [..] The Libs.private field is specifically designed for such usage: From pkg-config documentation: Libs.private: This line should list any private libraries in use. Private libraries are libraries which are not exposed through your library, but are needed in the case of static linking. Therefore, this patch adds a reference to FLAC as well as to lcov in the Libs.private field of the pkg-config file. Patch status: Pending https://github.com/mpruett/audiofile/pull/26 Fixes: http://autobuild.buildroot.net/results/e95/e959e703a8db81032da27bece295c121e53d830d/ http://autobuild.buildroot.net/results/10b/10bd00209f098e8782016355cb2f46d1d3e7d3a3/ Signed-off-by: Jörg Krause --- .../0001-Fix-pkg-config-for-static-linking.patch | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 package/audiofile/0001-Fix-pkg-config-for-static-linking.patch diff --git a/package/audiofile/0001-Fix-pkg-config-for-static-linking.patch b/package/audiofile/0001-Fix-pkg-config-for-static-linking.patch new file mode 100644 index 0000000..54757ab --- /dev/null +++ b/package/audiofile/0001-Fix-pkg-config-for-static-linking.patch @@ -0,0 +1,56 @@ +From 2abf7d2e5c533bf4d7407c2c8057a329cd49a3cd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Tue, 24 Nov 2015 21:57:27 +0100 +Subject: [PATCH 1/1] Fix pkg-config for static linking +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Static linking userspace programs such as MPD against libaudiofile fails if +FLAC is available, because libaudiofile is linked against FLAC, but this isn't +expressed in the pkg-config file: + +[..] +arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libaudiofile.a(FLAC.o): In function `FLACDecoder::reset2()': +FLAC.cpp:(.text+0x58): undefined reference to `FLAC__stream_decoder_seek_absolute' +/home/buildroot/build/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libaudiofile.a(FLAC.o): In function `FLACEncoder::sync2()': +FLAC.cpp:(.text+0x88): undefined reference to `FLAC__stream_encoder_finish' +/home/buildroot/build/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libaudiofile.a(FLAC.o): In function `FLACDecoder::~FLACDecoder()': +FLAC.cpp:(.text+0xc4): undefined reference to `FLAC__stream_decoder_delete' +/home/buildroot/build/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libaudiofile.a(FLAC.o): In function `FLACEncoder::~FLACEncoder()': +FLAC.cpp:(.text+0x164): undefined reference to `FLAC__stream_encoder_delete' +/home/buildroot/build/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libaudiofile.a(FLAC.o): In function `FLACDecoder::runPull()': +[..] + +The Libs.private field is specifically designed for such usage: + +From pkg-config documentation: + + Libs.private: + + This line should list any private libraries in use. Private + libraries are libraries which are not exposed through your + library, but are needed in the case of static linking. + +Therefore, this patch adds a reference to FLAC as well as to lcov in the +Libs.private field of the pkg-config file. + +Signed-off-by: Jörg Krause +--- + audiofile.pc.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/audiofile.pc.in b/audiofile.pc.in +index ad5956a..d6055ef 100644 +--- a/audiofile.pc.in ++++ b/audiofile.pc.in +@@ -8,5 +8,5 @@ Description: audiofile + Requires: + Version: @VERSION@ + Libs: -L${libdir} -laudiofile +-Libs.private: -lm ++Libs.private: @FLAC_LIBS@ @COVERAGE_LIBS@ -lm + Cflags: -I${includedir} +-- +2.6.2 +