Explicitly define used NIF symbols #792
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We ran into an issue with the new Xcode version 14 command line tools, version 2395.
The linker gave a warning about
dynamic_lookup
not working with chained fixups, a thing that is now enabled by default on the command line tools looks like.It looks like we can't use
dynamic_lookup
. Instead define a list ourselves of all the symbols we use in thec_src/appsignal_extension.c
file. That way we tell the linker to ignore the undefined symbols, and have them be looked up at runtime when the Elixir NIF library is loaded. Every time we call another NIF function defined inerl_nif.h
we need to update this list.ld documentation changes between Xcode versions that broke
Xcode Version 13.4.1 (13F100), from macOS 12.5:
New Xcode Version 14.0 (14A309), from macOS 12.6:
Closes #790
Co-authored-by: Jeff Kreeftmeijer jeffkreeftmeijer@gmail.com