Bug 13766 - Using TCLIBC=musl results in SDKs producing incompatible binaries
Summary: Using TCLIBC=musl results in SDKs producing incompatible binaries
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 3.0.1
Hardware: x86 x86_64
: Medium+ major
Target Milestone: 5.1 M3
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2020-01-31 12:18 UTC by anon2313
Modified: 2024-09-10 16:43 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anon2313 2020-01-31 12:18:56 UTC
When I build a Poky image where local.conf contains 'TCLIBC = "musl"' then the SDKs provided by meta-toolchain and populate_sdk do not work properly.

When you build a simple application with either of these and copy it to the target they fail to run. You get a message like:

genericx86-64:~# ./a.out 
-sh: ./a.out: No such file or directory

The (fairly simple) project I'm upgrading from Jethro to Zeus had 'TCLIBC = "musl"' so I left it the same.

This seems to be related to Bug 13459.
Comment 1 Randy MacLeod 2020-02-06 15:41:03 UTC
We also need an automated test to run in he autobuilder for this.
Comment 2 Leon Woestenberg 2020-08-19 15:17:13 UTC
I had the same issue, the dynamic loader is wrong (glibc vs musl), which can easily be checked with 'file /bin/app'.  I have updated Bug 13459 with further root cause digging.
Comment 3 Randy MacLeod 2020-09-24 09:34:13 UTC
Sakib, I'd like you to check if this is still broken on the master branch.
Comment 4 Randy MacLeod 2021-02-03 19:40:29 UTC
Unfortunately, I don't think that Sakib will get to this until early 3.4. -- Randy
Comment 5 Leon Woestenberg 2021-07-12 19:58:10 UTC
This was fixed in Bug 13459.

Specifically, I analyzed the cause there and came up with a v1 patch. (2020-08-19 15:14:12 UTC)

Khem Raj proposed a v2 patch which was accepted. It has been in one or two Yocto releases already.

(If it's broken in master, than that would be a regression.)
Comment 6 Randy MacLeod 2021-10-27 21:42:56 UTC
Sakib, I think you just need to test that this works on master so I moved it to M1.
Comment 7 Randy MacLeod 2022-03-24 15:59:36 UTC
Sakib to test and document his testing here so we can get this closed in M4.
Comment 8 Randy MacLeod 2024-04-25 01:33:46 UTC
Just needs testing.
Comment 9 Randy MacLeod 2024-09-10 16:43:12 UTC
Apparently fixed.