On Wed, 2023-03-08 at 08:52 +0200, Ovidiu Panait wrote:
> On 3/7/23 22:45, Richard Purdie wrote:
> > CAUTION: This email comes from a non Wind River email account!
> > Do not click links or open attachments unless you recognize the sender and 
> > know the content is safe.
> > 
> > On Tue, 2023-03-07 at 21:04 +0200, Ovidiu Panait wrote:
> > > 
> > > The manifest files still show lib32-recipe-sysroot instead of
> > > recipe-sysroot (the manifest file seems to have already been cached by
> > > lib32-gcc-cross-arm):
> > > $ head -2
> > > tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-arm/12.2.0-r0/recipe-sysroot-native/installeddeps/lib32-linux-libc-headers
> > > lib32-recipe-sysroot/usr/include/asm/byteorder-32.h
> > > lib32-recipe-sysroot/usr/include/asm/sigcontext-32.h
> > > 
> > > MLPREFIX is set to lib32- for gcc-cross-canadian-arm, so the existing
> > > manifest file with lib32-recipe-sysroot paths is used:
> > > $ bitbake -e gcc-cross-canadian-arm | grep ^MLPREFIX
> > > MLPREFIX="lib32-"
> > > 
> > > Adding an exception for cross-canadian to the the mlprefix code added
> > > earlier seems to make it work:
> > > 
> > > diff --git a/meta/classes-global/staging.bbclass
> > > b/meta/classes-global/staging.bbclass
> > > index e6d0d1d55c..a9142ce780 100644
> > > --- a/meta/classes-global/staging.bbclass
> > > +++ b/meta/classes-global/staging.bbclass
> > > @@ -276,6 +276,10 @@ python extend_recipe_sysroot() {
> > >        stagingdir = d.getVar("STAGING_DIR")
> > >        sharedmanifests = d.getVar("COMPONENTS_DIR") + "/manifests"
> > >        mlprefix = d.getVar("MLPREFIX")
> > > +    if "-cross-canadian" in pn:
> > > +        mlprefix = "nativesdk-"
> > >        if mlprefix:
> > >            sharedmanifests = sharedmanifests + "/" + mlprefix
> > >        recipesysroot = d.getVar("RECIPE_SYSROOT")
> > Was this in a clean build? The change will need a clean TMPDIR to
> > properly take effect. I didn't force everyone to rebuild since the
> > issue is reported so rarely and has been present for a long time.
> Yes, this is still reproducible in a clean build, with a fresh poky 
> clone. Same steps as before:
> 
> git clone https://github.com/yoctoproject/poky.git;  cd poky/; . 
> oe-init-build-env
> 
> 
> add to local.conf:
> require conf/multilib.conf
> MACHINE = "qemuarm64"
> MULTILIBS = "multilib:lib32"
> DEFAULTTUNE:virtclass-multilib-lib32 = "armv7athf-neon"
> 
> bitbake gcc-cross-canadian-arm
> 
> update local.conf to force a rebuild:
> GCCPIE = "--disable-default-pie"
> 
> bitbake gcc-cross-canadian-arm
> 

Sorry, it looks like I messed something up in testing. The approach is
the right one but as you mention, it isn't quite working.

I've sent another patch which does work with the steps above. We can't
just use nativesdk since the file lists of the different canadian
targets may be different and would cause a different kind of failure. I
therefore tweaked the prefix accordingly and made the fix multilib
specific at the call site that triggers the issue.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#178163): 
https://lists.openembedded.org/g/openembedded-core/message/178163
Mute This Topic: https://lists.openembedded.org/mt/97268632/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to