-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Ignore missing symbols when compiling a shared library. #3085
Comments
Or it can be better to ignore some specific symbols. |
You mean when linking against a shared library, not producing one, right? |
Much more safe way to resolve it for specific symbols:
|
I'd second this report. For example, it's impossible to build postgres extensions on macOS without passing either The build fails and then one has to manually link the
A more complex extension could have dozens of symbols like that. One has to manually complete the linking step:
Sadly, that fails in postgres for debug builds:
Wondering if there's any workaround as of 0.7.1? (Note there there's no library to link against--the missing symbols are in the postgres executable itself). |
You need to include the zig compiler rt. Pass |
Thanks. The question for workarounds was more general about the whole business of dynamic linking on mac. That last remark is a data point about the complexity of the thing--one would expect that just linking with |
This doesn't currently work on macho, see my report here. It fails with:
I created a proposal to fix this problem, see: Proposal: fix shared library linking on macOS. |
This has already been implemented on master branch, you may now pass |
Clang receives the option -undefined,dynamic_lookup to ignore missing symbols when compiling a library.
Is there a a similar option in Zig? Then I can have better scalability to compile a shared library.
The text was updated successfully, but these errors were encountered: