Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

musl is not always dynamically linked #83

Open
alexrp opened this issue Aug 4, 2023 · 3 comments
Open

musl is not always dynamically linked #83

alexrp opened this issue Aug 4, 2023 · 3 comments
Assignees
Labels
area: sdk Issues related to the MSBuild SDK. state: blocked Issues that are blocked on some other issue or work.
Milestone

Comments

@alexrp
Copy link
Member

alexrp commented Aug 4, 2023

See:

.NET RIDs like linux-musl-x64 (and friends) are meant for systems with a dynamic musl libc, such as Alpine. Linking musl statically is not what we want and is likely to blow up in 'fun' ways. As a result, our support for musl-based RIDs for C/C++ code is effectively unusable right now (but should work fine for Zig code).

I think this is strictly an upstream Zig bug; we pass all the right flags on our end.

@alexrp alexrp added type: bug state: blocked Issues that are blocked on some other issue or work. area: sdk Issues related to the MSBuild SDK. labels Aug 4, 2023
@alexrp alexrp added this to the v4.1 milestone Aug 4, 2023
@alexrp alexrp self-assigned this Aug 4, 2023
@alexrp alexrp modified the milestones: v4.1, v5.0 Dec 15, 2023
alexrp added a commit to vezel-dev/celerity that referenced this issue Dec 30, 2023
@alexrp alexrp modified the milestones: v5.0, Future Jan 1, 2024
@alexrp
Copy link
Member Author

alexrp commented Jan 5, 2024

Need to try the workaround mentioned here: ziglang/zig#11909 (comment)

@alexrp
Copy link
Member Author

alexrp commented Apr 28, 2024

Need to try the workaround mentioned here: ziglang/zig#11909 (comment)

This appears to work. We can do this as a temporary workaround.

Also, as I noted in ziglang/zig#11909 (comment), this bug does not actually affect shared libraries.

@alexrp alexrp added state: confirmed Bugs that have been confirmed and are reproducible. and removed state: blocked Issues that are blocked on some other issue or work. labels Apr 28, 2024
@alexrp alexrp modified the milestones: Future, v5.0 Apr 28, 2024
alexrp added a commit to vezel-dev/celerity that referenced this issue Apr 28, 2024
@alexrp
Copy link
Member Author

alexrp commented Jul 11, 2024

This appears to work. We can do this as a temporary workaround.

This won't actually work in our case after all, as it requires the dynamic linker to be present at the given path (e.g. /usr/lib/ld-musl-x86_64.so.1) at build time, which is fundamentally incompatible with cross-compilation.

@alexrp alexrp modified the milestones: v5.0, Future Jul 11, 2024
@alexrp alexrp added state: blocked Issues that are blocked on some other issue or work. and removed state: confirmed Bugs that have been confirmed and are reproducible. labels Jul 11, 2024
@alexrp alexrp removed the type: bug label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: sdk Issues related to the MSBuild SDK. state: blocked Issues that are blocked on some other issue or work.
Development

No branches or pull requests

1 participant