From patchwork Wed Mar 16 14:28:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Bisson X-Patchwork-Id: 598424 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 3qQDPD2lzGz9t5T for ; Thu, 17 Mar 2016 01:28:32 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=boundarydevices-com.20150623.gappssmtp.com header.i=@boundarydevices-com.20150623.gappssmtp.com header.b=Y+4o3VGc; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 711F03335A; Wed, 16 Mar 2016 14:28:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QeqrHgIxn4mJ; Wed, 16 Mar 2016 14:28:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 323FA255BB; Wed, 16 Mar 2016 14:28:29 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C21C91C1209 for ; Wed, 16 Mar 2016 14:28:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BD97991E46 for ; Wed, 16 Mar 2016 14:28:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x1Ptlp7rgn+m for ; Wed, 16 Mar 2016 14:28:27 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by whitealder.osuosl.org (Postfix) with ESMTPS id CADB08AA25 for ; Wed, 16 Mar 2016 14:28:26 +0000 (UTC) Received: by mail-wm0-f47.google.com with SMTP id p65so192672993wmp.1 for ; Wed, 16 Mar 2016 07:28:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ACwVyHNuicdFaruX1EhkQbPS6dXYuKV0ZIY/Z+I/NaM=; b=Y+4o3VGcslPrGoqCe0jZbMqV22tQM0tsByt6hkyLbaCWfWfgw16Mns1zWVQYd6vin+ CM/KlMCb5vp898EsL+x5DBQsyKn1312SysK5QdUMlI79OOlfQZs6n5g7GQyyjIvF3t3u 5zaMZvCGu/1L5eMXICzLwA0wNwGS8WnB26985AKAGqccknL+sOF8Bb1RdHljvuDfOoV6 Z1lBchLYHphE+9lPwD1sJ1IQsxE2woWZRzkRCqZ9qRo2ok9Eol8hhEQkrQv8wzgSHpLU 2+C2TJlyiZwISCci+AHP87ldKUunES18vFBiRGNNVdOSFkF878c/wZM3boIgTc2Mw4XD +kww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ACwVyHNuicdFaruX1EhkQbPS6dXYuKV0ZIY/Z+I/NaM=; b=K7jRViesp9YGMTk51ODMmfkOcvLRzSbmc5fMsfNX2RRuxBDrZGqNSx1JczJYmdp7WQ xQi2EkWNq6FI1qsGW3jwr2wc33QXbsNL2tR85xQEYT4r5W1ceYcckdWXOPg27cKyhnLA s3WtaDPhQG8NoWr6zuK8RWShsPk/lWHuS1fMf69Wc8l3tgZF2Que9wHYoeHEHSHJvAOt 4oglzv7mAk4zqvZ8qzumBfQry4JbYLCDkQXgPJsKqvXHW12kxcGuKYQjaNAccADM6lYr EgbWTattFWSbNCx2wIW3Xaj9Ayzeaxre5HVC6NsIh47SmAmkhU1vskTd7NQ7xXnh0NI1 2eiw== X-Gm-Message-State: AD7BkJL+m0OsPzDzgqCA1RKT+AuurUTZ/030vgBE5oSf8hyoa4dxoi60Ft4wFNjeRSh8iw== X-Received: by 10.194.222.234 with SMTP id qp10mr4142051wjc.138.1458138505526; Wed, 16 Mar 2016 07:28:25 -0700 (PDT) Received: from t450s.lan (89-92-156-188.hfc.dyn.abo.bbox.fr. [89.92.156.188]) by smtp.googlemail.com with ESMTPSA id n66sm3763729wmg.20.2016.03.16.07.28.24 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2016 07:28:24 -0700 (PDT) From: Gary Bisson To: buildroot@busybox.net Date: Wed, 16 Mar 2016 15:28:10 +0100 Message-Id: <1458138493-12172-2-git-send-email-gary.bisson@boundarydevices.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1458138493-12172-1-git-send-email-gary.bisson@boundarydevices.com> References: <1458138493-12172-1-git-send-email-gary.bisson@boundarydevices.com> Cc: yann.morin.1998@free.fr, jezz@sysmic.org Subject: [Buildroot] [PATCH v3 1/4] libfslcodec: add install hooks to fix libraries path 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" By default, all the libraries are installed under /usr/lib/imx-mm which causes problems at runtime. The hooks are inspired from the mechanism used in the Yocto recipe: https://github.com/Freescale/meta-fsl-arm/blob/fido/recipes-multimedia/libfslcodec/libfslcodec.inc Signed-off-by: Gary Bisson --- Here are the dependencies the pipelines above are testing: $ for i in `find target/usr/lib/gstreamer*/*`; do readelf -d $i | grep NEEDED | grep lib_ && echo "($i)"; done 0x00000001 (NEEDED) Shared library: [lib_nb_amr_dec_arm9_elinux.so.2] 0x00000001 (NEEDED) Shared library: [lib_wb_amr_dec_arm9_elinux.so.2] (target/usr/lib/gstreamer-0.10/libmfw_gst_amrdec.so) 0x00000001 (NEEDED) Shared library: [lib_peq_arm11_elinux.so.1.fhw] (target/usr/lib/gstreamer-0.10/libmfw_gst_audio_pp.so) 0x00000001 (NEEDED) Shared library: [lib_mp3_enc_arm12_elinux.so.2] (target/usr/lib/gstreamer-0.10/libmfw_gst_mp3enc.so) 0x00000001 (NEEDED) Shared library: [lib_mp3_enc_arm12_elinux.so.2] (target/usr/lib/gstreamer-1.0/libgstimxaudio.so) Note that I added a staging install hook as well because otherwise the gst1-imx plugin doesn't find lib_mp3_enc_arm12_elinux.so at build time. Not to copy the same library twice I decided to go with a symlink. Let me know if that's acceptable. Regards, Gary --- package/libfslcodec/libfslcodec.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk index e151c66..89d058c 100644 --- a/package/libfslcodec/libfslcodec.mk +++ b/package/libfslcodec/libfslcodec.mk @@ -20,4 +20,19 @@ endef # FIXME The Makefile installs both the arm9 and arm11 versions of the # libraries, but we only need one of them. +# Use symlinks in staging dir so every application can link against the libs +# whether they look at imx-mm or not (gst-fsl-plugins vs. gst1-imx). +define LIBFSLCODEC_FIXUP_STAGING_PATH + cd $(STAGING_DIR)/usr/lib; \ + find imx-mm -mindepth 2 -maxdepth 2 -not -type d -exec ln -fs {} . \; +endef +LIBFSLCODEC_POST_INSTALL_STAGING_HOOKS += LIBFSLCODEC_FIXUP_STAGING_PATH + +# Use symlinks in install dir as well to match staging setup. +define LIBFSLCODEC_FIXUP_TARGET_PATH + cd $(TARGET_DIR)/usr/lib; \ + find imx-mm -mindepth 2 -maxdepth 2 -not -type d -exec ln -fs {} . \; +endef +LIBFSLCODEC_POST_INSTALL_TARGET_HOOKS += LIBFSLCODEC_FIXUP_TARGET_PATH + $(eval $(autotools-package))