From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mail.openembedded.org (Postfix) with ESMTP id A90476FF86 for ; Mon, 15 Feb 2016 14:57:46 +0000 (UTC) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 15 Feb 2016 06:57:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,450,1449561600"; d="scan'208,217";a="915353210" Received: from marquiz.fi.intel.com ([10.237.72.155]) by fmsmga002.fm.intel.com with ESMTP; 15 Feb 2016 06:57:46 -0800 Message-ID: <1455548264.3889.8.camel@linux.intel.com> From: Markus Lehtonen To: Christopher Larson , openembedded-core@lists.openembedded.org Date: Mon, 15 Feb 2016 16:57:44 +0200 In-Reply-To: References: <1455303960-7173-1-git-send-email-markus.lehtonen@linux.intel.com> X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Subject: Re: [PATCH] nss: define RPATH variable X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2016 14:57:46 -0000 Content-Type: multipart/alternative; boundary="=-WbAdAM+KCpOy9wk6CP5M" --=-WbAdAM+KCpOy9wk6CP5M Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Sat, 2016-02-13 at 05:12 +0000, Christopher Larson wrote: > On Fri, Feb 12, 2016 at 12:06 PM Markus Lehtonen < > markus.lehtonen@linux.intel.com> wrote: > > Otherwise the nss libs do not get any RPATH/RUNPATH. Consequently, > > the > > .so dependencies of nss libs are always searched from the base lib > > directories of the host (i.e. /lib/ and /usr/lib). This causes > > problems > > with nss-native where the .so's should be searched from the base > > lib > > directories of the sysroot instead of the host file system. > > > > This particular problem has probably been unnoticed as nss-native > > is > > seldom used and/or most users are likely to have nss libraries > > installed > > on their host system. In this case everything most likely work as > > expected. > > > > [YOCTO #9041] > > > > Signed-off-by: Markus Lehtonen > > --- > > meta/recipes-support/nss/nss_3.21.bb | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/meta/recipes-support/nss/nss_3.21.bb b/meta/recipes > > -support/nss/nss_3.21.bb > > index 552fd6c..8b9fb71 100644 > > --- a/meta/recipes-support/nss/nss_3.21.bb > > +++ b/meta/recipes-support/nss/nss_3.21.bb > > @@ -91,12 +91,16 @@ do_compile() { > > > > export NSS_DISABLE_GTESTS=1 > > > > + # Need to set RPATH so that chrpath will do its job correctly > > + RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath > > -link,${STAGING_BASE_LIBDIR_NATIVE} -Wl, > > -rpath,${STAGING_LIBDIR_NATIVE} -Wl, > > -rpath,${STAGING_BASE_LIBDIR_NATIVE}" > Why are you adding native paths to rpath in a target recipe? If this > change is native-only, this should use the class-native override., > no? Very good point. There's no point setting RPATH for target environment (even if it shouldn't break anything). I was too tired when writing the final version of the patch, I guess ;) I'll send a new version, soon. Thanks, Markus --=-WbAdAM+KCpOy9wk6CP5M Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit
On Sat, 2016-02-13 at 05:12 +0000, Christopher Larson wrote:
On Fri, Feb 12, 2016 at 12:06 PM Markus Lehtonen <markus.lehtonen@linux.intel.com> wrote:
Otherwise the nss libs do not get any RPATH/RUNPATH. Consequently, the
.so dependencies of nss libs are always searched from the base lib
directories of the host (i.e. /lib/ and /usr/lib). This causes problems
with nss-native where the .so's should be searched from the base lib
directories of the sysroot instead of the host file system.

This particular problem has probably been unnoticed as nss-native is
seldom used and/or most users are likely to have nss libraries installed
on their host system. In this case everything most likely work as
expected.

[YOCTO #9041]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
---
 meta/recipes-support/nss/nss_3.21.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-support/nss/nss_3.21.bb b/meta/recipes-support/nss/nss_3.21.bb
index 552fd6c..8b9fb71 100644
--- a/meta/recipes-support/nss/nss_3.21.bb
+++ b/meta/recipes-support/nss/nss_3.21.bb
@@ -91,12 +91,16 @@ do_compile() {

     export NSS_DISABLE_GTESTS=1

+    # Need to set RPATH so that chrpath will do its job correctly
+    RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}"

Why are you adding native paths to rpath in a target recipe? If this change is native-only, this should use the class-native override., no?

Very good point. There's no point setting RPATH for target environment (even if it shouldn't break anything). I was too tired when writing the final version of the patch, I guess ;) I'll send a new version, soon.

Thanks,
  Markus
--=-WbAdAM+KCpOy9wk6CP5M--