Skip to contentSkip to conversation

allarch: do not set baselib

PATCH In review Joe Slater 4 participants 7 messages Jan 2, 2018 – Jan 4, 2018

lore
Share & tools
lore

Joe Slater

author
#0 lore raw

PATCH 1/1 allarch: do not set baselib

postinstall scripts may run target binaries and need to know where shared libraries are.

---
 meta/classes/allarch.bbclass | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
meta/classes/allarch.bbclass +2 -3
index 51ba509..3749328 100644
@@ -11,9 +11,8 @@ python () {
         # No need for virtual/libc or a cross compiler
         d.setVar("INHIBIT_DEFAULT_DEPS","1")
 
-        # Set these to a common set of values, we shouldn't be using them other that for WORKDIR directory
-        # naming anyway
-        d.setVar("baselib", "lib")
+        # Set these to a common set of values, we shouldn't be using them other than for WORKDIR directory
+        # naming anyway.  Do not set baselib because postinstall may need to know where shared libraries are.
         d.setVar("TARGET_ARCH", "allarch")
         d.setVar("TARGET_OS", "linux")
         d.setVar("TARGET_CC_ARCH", "none")
Signature · 1 line
2.7.4
#1 lore raw
Quoted 16 lines · Joe Slater

postinstall scripts may run target binaries and need to know where shared libraries are.

---
 meta/classes/allarch.bbclass | 5 ++---

 1 file changed, 2 insertions(+), 3 deletions(-)
meta/classes/allarch.bbclass +0 -0
index 51ba509..3749328 100644
@@ -11,9 +11,8 @@ python () {
          # No need for virtual/libc or a cross compiler
          d.setVar("INHIBIT_DEFAULT_DEPS","1")

Quoted 8 lines

-        # Set these to a common set of values, we shouldn't be using them other that for WORKDIR directory -        # naming anyway
-        d.setVar("baselib", "lib")
+        # Set these to a common set of values, we shouldn't be using them other than for WORKDIR directory +        # naming anyway.  Do not set baselib because postinstall may need to know where shared libraries are. d.setVar("TARGET_ARCH", "allarch")
         d.setVar("TARGET_OS", "linux")
         d.setVar("TARGET_CC_ARCH", "none")

Sorry, but I don't think this can work :/.

Do the sstate sig selftests pass with this change?

I appreciate this will make some things "work" but it will mean that allarch packages rebuild for each architecture or multilib and that isn't right either.

So we need a better solution here. Why do we need libdir paths to run binaries anyway? Is this a libexec issue? Perhaps the things in question shouldn't be allarch?

Cheers,

Richard

#2 lore raw
Quoted 11 lines · Richard Purdie

Sorry, but I don't think this can work :/.

Do the sstate sig selftests pass with this change?

I appreciate this will make some things "work" but it will mean that allarch packages rebuild for each architecture or multilib and that isn't right either.

So we need a better solution here. Why do we need libdir paths to run binaries anyway? Is this a libexec issue? Perhaps the things in question shouldn't be allarch?

I think Ross has spent some time developing a fix for this same issue, perhaps he can chime in?

Alex

#3 lore raw

Currently, we do have to provide qemuwrapper with LD_LIBRARY_PATH. We could hard-code all possible paths into that and not use ${libdir} and ${base_libdir}. (I tried it and it works.) We could also create a couple of new variables, like original_base_libdir, that don't get clobbered by allarch. Maybe qemuwrapper should be smart enough to compute LD_LIBRARY_PATH...

Joe

-----Original Message-----
From: Alexander Kanavin [mailto:[email protected]]
Sent: Wednesday, January 03, 2018 12:43 AM
To: Richard Purdie; Slater, Joseph; [email protected]; BURTON, ROSS
Subject: Re: [OE-core] [oe-core][PATCH 1/1] allarch: do not set baselib

Quoted 11 lines · Richard Purdie

Sorry, but I don't think this can work :/.

Do the sstate sig selftests pass with this change?

I appreciate this will make some things "work" but it will mean that allarch packages rebuild for each architecture or multilib and that isn't right either.

So we need a better solution here. Why do we need libdir paths to run binaries anyway? Is this a libexec issue? Perhaps the things in question shouldn't be allarch?

I think Ross has spent some time developing a fix for this same issue, perhaps he can chime in?

Alex

#4 lore raw
Quoted 6 lines · Joseph

Currently, we do have to provide qemuwrapper with LD_LIBRARY_PATH.  We could hard-code all possible paths into that and not use ${libdir} and ${base_libdir}.  (I tried it and it works.)  We could also create a couple of new variables, like original_base_libdir, that don't get clobbered by allarch.   Maybe qemuwrapper should be smart enough to compute LD_LIBRARY_PATH...

I suspect somehow we therefore need to decouple qemuwrapper from the target packages and just ensure that a separate script is available in PATH when the rootfs is generated?

The rootfs should know which multilibs are enabled and be able to generate the wrapper correctly?

Cheers,

Richard

#5 lore raw

We should change fontcache.bbclass to not pass libdir, etc, to the update_font_cache script, since the environment will be set when the script executes.

That would solve the original problem, but it leaves the general problem of matching LD_LIBRARY_PATH for postinstall intercepts to the multilib for which the target binaries they run were compiled. Or, of generating a LD_LIBRARY_PATH containing all possible paths for the rootfs being constructed.

Joe
________________________________________
From: Richard Purdie [[email protected]]
Sent: Wednesday, January 03, 2018 1:58 PM
To: Slater, Joseph; Alexander Kanavin; [email protected]; BURTON, ROSS
Subject: Re: [OE-core] [oe-core][PATCH 1/1] allarch: do not set baselib

Quoted 6 lines · Joseph

Currently, we do have to provide qemuwrapper with LD_LIBRARY_PATH. We could hard-code all possible paths into that and not use ${libdir} and ${base_libdir}. (I tried it and it works.) We could also create a couple of new variables, like
original_base_libdir, that don't get clobbered by allarch. Maybe
qemuwrapper should be smart enough to compute LD_LIBRARY_PATH...

I suspect somehow we therefore need to decouple qemuwrapper from the target packages and just ensure that a separate script is available in PATH when the rootfs is generated?

The rootfs should know which multilibs are enabled and be able to generate the wrapper correctly?

Cheers,

Richard

#6 lore raw
In reply to Alexander Kanavin
Quoted 11 lines · Alexander Kanavin
Quoted 10 lines · Richard Purdie

Sorry, but I don't think this can work :/.

Do the sstate sig selftests pass with this change?

I appreciate this will make some things "work" but it will mean that
allarch packages rebuild for each architecture or multilib and that isn't right either.

Quoted 7 lines
Quoted 4 lines

So we need a better solution here. Why do we need libdir paths to run
binaries anyway? Is this a libexec issue? Perhaps the things in question shouldn't be allarch?

I think Ross has spent some time developing a fix for this same issue, perhaps he can chime in?

I think he did, I think I also pointed him at the sstate signature tests and that caused some problems. Ross may be able to elaborate more...

Cheers,

Richard