-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
MacOS: LLVM 15: linker reports "warning: -undefined error is deprecated" #12450
Comments
The release notes indicate that XCode 15 includes a completely new linker implementation:
so presumably this new warning is further fallout from that new In 'man ld' it is still reporting that 'error' is the default behaviour, so not sure the man page has been updated to reflect the new ld impl or not. |
I would also appreciate a way to suppress this warning...is there a way to manually remove linker_flags? |
By changing the line of code in below to return an empty list, the warning is now suppressed. I won't open a PR because I am not completely sure what the expected behavior is. |
@eli-schwartz, anyone: Any suggestion for how to fix this? I'm getting pinged because people are seeing a lot of these warnings. This is a really annoying move by Apple, but this seems to cause enough noise that we need to deal with it... |
What is the correct way to implement a
The expected behavior is that meson's core b_lundef option permits the user to toggle whether undefined symbols are accepted or rejected by the linker. What precise compiler options this results in, differs from OS to OS, and perhaps even version to version. |
No option specified has the same meaning as |
So just to clarify, you're saying that there's no option such as |
Well, there continues to be |
Emitting -undefined,error was correct,, but starting with Xcode 15 / Sonoma, doing so triggers "ld: warning: -undefined error is deprecated". Given that "-undefined error" is documented to be the linker's default behaviour, this warning seems ill advised. However, it does create a lot of noise. As "-undefined error" is the default behaviour, the least bad way to deal with this seems to be to just not emit anything. Of course that only works as long as nothing else injects -undefined dynamic_lookup, or such. Complain to Apple. Fixes: mesonbuild#12450
Emitting -undefined,error was correct,, but starting with Xcode 15 / Sonoma, doing so triggers "ld: warning: -undefined error is deprecated". Given that "-undefined error" is documented to be the linker's default behaviour, this warning seems ill advised. However, it does create a lot of noise. As "-undefined error" is the default behaviour, the least bad way to deal with this seems to be to just not emit anything. Of course that only works as long as nothing else injects -undefined dynamic_lookup, or such. Complain to Apple. Fixes: mesonbuild#12450
Emitting -undefined,error was correct,, but starting with Xcode 15 / Sonoma, doing so triggers "ld: warning: -undefined error is deprecated". Given that "-undefined error" is documented to be the linker's default behaviour, this warning seems ill advised. However, it does create a lot of noise. As "-undefined error" is the default behaviour, the least bad way to deal with this seems to be to just not emit anything. Of course that only works as long as nothing else injects -undefined dynamic_lookup, or such. Complain to Apple. Fixes: #12450
Emitting -undefined,error was correct,, but starting with Xcode 15 / Sonoma, doing so triggers "ld: warning: -undefined error is deprecated". Given that "-undefined error" is documented to be the linker's default behaviour, this warning seems ill advised. However, it does create a lot of noise. As "-undefined error" is the default behaviour, the least bad way to deal with this seems to be to just not emit anything. Of course that only works as long as nothing else injects -undefined dynamic_lookup, or such. Complain to Apple. Fixes: #12450
Describe the bug
Meson build appends the ld flag "-undefined error". This is reported as deprecated by LLVM 15 on MacOS Sonoma
To Reproduce
meson.build:
main.cpp:
Run meson setup and compile:
Expected behavior
No errors or warnings should be displayed
Observed behavior
meson compile reports the following:
ld: warning: -undefined error is deprecated
system parameters
meson --version
- 1.2.3ninja --version
if it's a Ninja build - 1.11.1The text was updated successfully, but these errors were encountered: