Open RossComputerGuy opened 1 year ago
Can you please enhance the steps to reproduce? It's not enough information for me to reproduce.
I wasn't able to recreate this as well. Something must've changed between when I reported this issue and it popped up. I'd say it's safe to close it but it can be reopened if someone else experiences it as well.
Zig Version
0.11.0-dev.1910+6d7fb8f19
Steps to Reproduce and Observed Behavior
Use
linkLibC()
on an executable and in many cases, it'll link with a libc.so linker script instead of an actual shared library. It seems Zig does not do any sort of checks to prevent this when using the builder. In my case, I am using Nix and on the Zig Discord I've discovered that others may have this issue as well. I discovered this when my executable refused to execute and I ranldd
and found this:I ran
file
on the file it mentions and it says it's a text file. I checked the contents and it contains this:Expected Behavior
Zig's build system should check if the libc is a linker script, if it is then it should parse it and figure out what to do with it. It should also check for other libc's by soversion in the same directory.