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
meson 0.52.1 breaking shared linking with D #6359
Comments
Apparently this only happens with ldc, gonna start bisecting... |
I think this is due to 49d20a5. |
So |
Actually nevermind, it's due to 0efab59 |
I was able to compile your project with #6359 applied, can you confirm? |
Ah sure, I'll give it a go, thanks. Also, can I maybe help with tests for the D lang? |
The project does compile (it also compiled before that change), the problem is the linkage. If I run a binary compiled with ldc2 with (or without this change) on meson >0.51.2 the binary blows up with:
The shared library shouldn't be
Here's a verbose log of the compilation
|
You're right, that still isn't fixed. |
Some compilers that act as linker drivers (dmd and ldc) need to split arguments that GCC combines with , (ie, -Wl,-foo,bar -> -L=-foo -L=bar). As such we need to detect that the previous argument contained -soname, and not wrap that in a --start-group/--end-group Fixes mesonbuild#6359 ../../../tmplckitmb1.o
Okay, I think I have a fix. I've updated the PR. it turns out some things changed and resulted in the soname argument not getting applied correctly. |
Some compilers that act as linker drivers (dmd and ldc) need to split arguments that GCC combines with , (ie, -Wl,-foo,bar -> -L=-foo -L=bar). As such we need to detect that the previous argument contained -soname, and not wrap that in a --start-group/--end-group This modifies the shared library test to demonstrate the problem, with a test case. Fixes mesonbuild#6359
alright great, I'll test in a bit. |
Seems like that fixed it, thank you! :) |
Some compilers that act as linker drivers (dmd and ldc) need to split arguments that GCC combines with , (ie, -Wl,-foo,bar -> -L=-foo -L=bar). As such we need to detect that the previous argument contained -soname, and not wrap that in a --start-group/--end-group This modifies the shared library test to demonstrate the problem, with a test case. Fixes mesonbuild#6359
…eson versions Meson >=0.52 and <0.54 contain a bug that causes bad linkage with ldc and dmd. See mesonbuild/meson#6359 for more info. fixes #24
Some compilers that act as linker drivers (dmd and ldc) need to split arguments that GCC combines with , (ie, -Wl,-foo,bar -> -L=-foo -L=bar). As such we need to detect that the previous argument contained -soname, and not wrap that in a --start-group/--end-group This modifies the shared library test to demonstrate the problem, with a test case. Fixes mesonbuild#6359
…ersions Meson >=0.52 and <0.54 contain a bug that causes bad linkage with ldc and dmd. See mesonbuild/meson#6359 for more info. fixes #24
…ersions Meson >=0.52 and <0.54 contain a bug that causes bad linkage with ldc and dmd. See mesonbuild/meson#6359 for more info. fixes #24
Describe the bug
Since meson 0.52.1 building my project does succeed, but running the resulting binary doesn't work. See the following ldd output:
With meson 0.51.2 this works:
To Reproduce
Build https://github.com/Cogitri/corecollector
system parameters
Native build on Alpine Linux Edge with meson 0.52.1. Tested with latest scm (being 585ccfc) too.
The text was updated successfully, but these errors were encountered: