From patchwork Thu Dec 10 13:52:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Bisson X-Patchwork-Id: 555143 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 D9615140297 for ; Fri, 11 Dec 2015 00:53:19 +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=RcCHE2z+; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2884733B2C; Thu, 10 Dec 2015 13:53:19 +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 lo6AjPLgyqMM; Thu, 10 Dec 2015 13:53:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 762E333B39; Thu, 10 Dec 2015 13:53:01 +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 467001C0DBE for ; Thu, 10 Dec 2015 13:52:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 435A2924F7 for ; Thu, 10 Dec 2015 13:52:53 +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 SJmxAxAOKsm6 for ; Thu, 10 Dec 2015 13:52:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7AAB5924ED for ; Thu, 10 Dec 2015 13:52:50 +0000 (UTC) Received: by mail-wm0-f43.google.com with SMTP id c201so34119598wme.0 for ; Thu, 10 Dec 2015 05:52:50 -0800 (PST) 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=sFPtnzezFf/5Le45T0jowhiUjXECVZ185/OKroivfjc=; b=RcCHE2z+GTyEBoDB2PuMK07EOyjcwSLanzbSF2BfQPT6gbvfuABQ/WCSAwUDvrjKqz xr619xRBuekf+yfmogNk7VpznQt6Rxr3ISblxb8ULFZFPDBEvFQztdJ/8svwhN2RC/P3 6RXaRi9NrMYZax5mLPu0jFKBM6+/dgaFfm2LBtv9GyQiTE7NDg7of3Za72UtEgon7D7d 7PduAWa/v9Rz3maEkREbUKKRosft3N8XbrkbLyLln6tuGPzxVCKGhugxC7+mQoVUAzLu D9HJ1Hrm8/r3bTykSQR07/OI9fbnIk2TLyQqQmmy8Ni1YNYGGKty+P+H9XkByQA8UasA weUA== 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=sFPtnzezFf/5Le45T0jowhiUjXECVZ185/OKroivfjc=; b=f+D+nKXOjNFhWiFvEvyvLjsZOrZkPZirt1KZTKikXjNCYZ7pnLSsXqj+z53QjNsd2z 03sbOWq6e7cIA1lw5YZhV7QB0LsqUJky0wWPtccOck+pAvNSx+1/hA/bnWdrbnBFrqDQ mOChevPAnF4k6elEnmT5O+f23l9i0Be8XPCbv5ZZReX/1dOg33hX8ny99QWCOtgEFhPW g1p3G2Hqpe0qGgYjvhR6nyy2Kjr2c8RqLo7ndEAREACLCANhodZwJ/l9ibSKQmLvmqHg IdJi4c7+SsXGyMKlfFXjMwvCKHrxM4ABQqqRzjshw7JTT33jNsVcAyN03EQyrsuHcouQ egZg== X-Gm-Message-State: ALoCoQlGuC7tQarLPgacyPbVvuxjI7I1b6eAtjYrwiaIdii3WVAbJaFJBNLWpIjcsyFZen2u5/eSqgpLPL/1aUqwDHj7cXilvw== X-Received: by 10.28.215.211 with SMTP id o202mr39707497wmg.85.1449755568857; Thu, 10 Dec 2015 05:52:48 -0800 (PST) Received: from t450s.lan (89-92-99-128.hfc.dyn.abo.bbox.fr. [89.92.99.128]) by smtp.googlemail.com with ESMTPSA id r74sm981563wmb.2.2015.12.10.05.52.48 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 Dec 2015 05:52:48 -0800 (PST) From: Gary Bisson To: buildroot@busybox.net Date: Thu, 10 Dec 2015 14:52:37 +0100 Message-Id: <1449755560-2911-2-git-send-email-gary.bisson@boundarydevices.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1449755560-2911-1-git-send-email-gary.bisson@boundarydevices.com> References: <1449755560-2911-1-git-send-email-gary.bisson@boundarydevices.com> Cc: thomas.petazzoni@free-electrons.com, jezz@sysmic.org Subject: [Buildroot] [PATCH v2 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 473d662..f8c6aa8 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 + find $(STAGING_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \ + -exec ln -fs {} $(STAGING_DIR)/usr/lib \; +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 + find $(TARGET_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \ + -exec ln -fs {} $(TARGET_DIR)/usr/lib \; +endef +LIBFSLCODEC_POST_INSTALL_TARGET_HOOKS += LIBFSLCODEC_FIXUP_TARGET_PATH + $(eval $(autotools-package))