* [PATCH] nss: define RPATH variable
@ 2016-02-12 19:06 Markus Lehtonen
2016-02-13 5:12 ` Christopher Larson
0 siblings, 1 reply; 3+ messages in thread
From: Markus Lehtonen @ 2016-02-12 19:06 UTC (permalink / raw)
To: openembedded-core
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}"
+
# We can modify CC in the environment, but if we set it via an
# argument to make, nsinstall, a host program, will also build with it!
#
export CC="${CC} -g"
make -C ./nss CCC="${CXX} -g" \
- OS_TEST=${OS_TEST}
+ OS_TEST=${OS_TEST} \
+ RPATH="${RPATH}"
}
--
2.6.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nss: define RPATH variable
2016-02-12 19:06 [PATCH] nss: define RPATH variable Markus Lehtonen
@ 2016-02-13 5:12 ` Christopher Larson
2016-02-15 14:57 ` Markus Lehtonen
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Larson @ 2016-02-13 5:12 UTC (permalink / raw)
To: Markus Lehtonen, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1592 bytes --]
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?
[-- Attachment #2: Type: text/html, Size: 2333 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nss: define RPATH variable
2016-02-13 5:12 ` Christopher Larson
@ 2016-02-15 14:57 ` Markus Lehtonen
0 siblings, 0 replies; 3+ messages in thread
From: Markus Lehtonen @ 2016-02-15 14:57 UTC (permalink / raw)
To: Christopher Larson, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1992 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 2721 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-15 14:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-12 19:06 [PATCH] nss: define RPATH variable Markus Lehtonen
2016-02-13 5:12 ` Christopher Larson
2016-02-15 14:57 ` Markus Lehtonen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox