Skip to contentSkip to conversation

Poky calls host pzstd with uninative's libstdc++.so.6 instead of the host library

DISCUSSION Tamara Schmitz 2 participants 5 messages Sep 4, 2024

lore
Share & tools
lore
#0 lore raw

Hello,

I'm a newbie to Yocto Linux and I am attempting to build a vendor BSP on an unsupported distribution: Fedora 40.

The OS' libstdc++.so.6 provides CXXABI_1.3.15 vs uninative's which provides up to CXXABI_1.3.14. That would be fine, if the sstate_archive_package would not attempt to attempt to run it in an ENV that forces uninative's library.

Question 1:
Using bitbake -e and reading the logs I was already able to get this far. How can I understand what the ENV, that the script executes in looks like?

Question 2:
Is this a bug in the vendor BSP or is Poky just silly mixing and matching host tools build against the OS toolchain and uninative's libraries as it pleases?

Regards

Tamara Schmitz

#1 lore raw
Quoted 2 lines · Tamara Schmitz via lists.yoctoproject.org

I'm a newbie to Yocto Linux and I am attempting to build a vendor BSP on an unsupported distribution: Fedora 40.

A key piece of information is which version of poky are you trying to build?

Master for example works fine with fedora 40.

Quoted 9 lines

The OS' libstdc++.so.6 provides CXXABI_1.3.15 vs uninative's which provides up to CXXABI_1.3.14. That would be fine, if the sstate_archive_package would not attempt to attempt to run it in an ENV that forces uninative's library.

Question 1:
Using bitbake -e and reading the logs I was already able to get this far. How can I understand what the ENV, that the script executes in looks like?

uninative changes the loader of executables to use the loader from uninative rather than the host system. It does this so that binaries built on a newer distro can work on an older one.

The cost of doing that is that you need to use a uninative that matches or is greater than the host system.

I'd therefore suggest bumping the version of uninative in the metadata you're using. Whilst it isn't a supported version, chances are it will probably work if you do that.

Quoted 4 lines

Question 2:
Is this a bug in the vendor BSP or is Poky just silly mixing and matching host tools build against the OS toolchain and uninative's libraries as it pleases?

The bug is that you're using an unsupported distro without making the modifications needed to support it. You can disable uninative, or you can switch to a newer uninative release, or switch to a version of the system which has fedora40 support.

There will be other issues with fedora 40 as some things won't build correctly due to the newer gcc version on f40 too.

Cheers,

Richard

#2 lore raw
Quoted 3 lines · Richard Purdie

A key piece of information is which version of poky are you trying to build?

The Vendor BSP specifies branch scarthgap commit 02eacd385eca7aa9cf25aaaa61427aa9c126e0bc which is between the yocto-5.0 and the yocto-5.0.1 release tag which is from May. Yeah could use an update.

Quoted 7 lines

uninative changes the loader of executables to use the loader from uninative rather than the host system. It does this so that binaries built on a newer distro can work on an older one.

The cost of doing that is that you need to use a uninative that matches
or is greater than the host system.

Wouldn't it be great if Poky could distinct between host binaries and its own binaries?

Quoted 7 lines

I'd therefore suggest bumping the version of uninative in the metadata
you're using. Whilst it isn't a supported version, chances are it will
probably work if you do that.

Will try that.

Quoted 10 lines

The bug is that you're using an unsupported distro without making the modifications needed to support it. You can disable uninative, or you can switch to a newer uninative release, or switch to a version of the
system which has fedora40 support.

There will be other issues with fedora 40 as some things won't build correctly due to the newer gcc version on f40 too.

Yeah, I am fine with taking a look at those. The warning did warn me after all ;)

Regards

Tamara

#3 lore raw
Quoted 9 lines · Tamara Schmitz
Quoted 3 lines · Richard Purdie

A key piece of information is which version of poky are you trying to
build?

The Vendor BSP specifies branch scarthgap commit 02eacd385eca7aa9cf25aaaa61427aa9c126e0bc which is between the yocto- 5.0 and the yocto-5.0.1 release tag which is from May. Yeah could use an update.

https://git.yoctoproject.org/poky/commit/?h=scarthgap&id=818fe3d7df535256c2736f200fc30d92ae19a7fe

is probably what you need and there are gcc fixes on the branch too which should be helpful to make fedora 40 work

I'd suggest moving down that branch for oe-core for the security updates too.

Quoted 11 lines
Quoted 8 lines

uninative changes the loader of executables to use the loader from uninative rather than the host system. It does this so that binaries
built on a newer distro can work on an older one.

The cost of doing that is that you need to use a uninative that matches
or is greater than the host system.

Wouldn't it be great if Poky could distinct between host binaries and its own binaries?

In the previous email you implied the developers working on the project were "silly" and you're now implying we're missing easy fixes to these problems. If you think you can do this better than what we have, feel free. If that is the case you don't need my help to debug this either.

It might not be as easy as you think.

Cheers,

Richard

#4 lore raw
Quoted 6 lines · Richard Purdie

In the previous email you implied the developers working on the project
were "silly" and you're now implying we're missing easy fixes to these
problems.

I was referring to the Poky software explicitly, never any person nor entity. The quote is:

Quoted 1 line

or is Poky just silly mixing and matching host tools build against

the > OS toolchain and uninative's libraries

Quoted 5 lines

If you think you can do this better than what we have, feel free. If that is the case you don't need my help to debug this either.

It might not be as easy as you think.

Apologies it really was not meant that way.

I am coming into this with fresh eyes and I am sure that there reasons, why some things are the way they are. In my statement I assumed that the host OS pzstd binary was called.

I added the env and which commands to sstate_archive_package to get a listing of the environment. And at first I had assumed that it was directly referencing the distro's $PATH. That turned out not to be the case. Rather the pzstd binary is in the recipe-sysroot-native which may have been obvious to someone else.

I have also gained some more understanding after reading these docs:
https://docs.yoctoproject.org/overview-manual/concepts.html#application-development-sdk

Thank you for your help so far.

Cheers

Tamara