-
Notifications
You must be signed in to change notification settings - Fork 86
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
Drop Init_pg_query
from exported symbol map
#256
Conversation
dc219ef
to
6962a62
Compare
@lfittl macOS 12.6 fixes a zero-day vulnerability, and it appears that XCode 14 tends to be upgraded with that. I think this fix might be needed soon as more people start to use a Ruby interpreter compiled under XCode 14. |
@stanhu Hmm, I think this may require some more thinking, because the symbol name without the Since we already have a special case for |
6962a62
to
48bad9f
Compare
Init_pg_query
from exported symbol mapInit_pg_query
from exported symbol map for macOS builds
48bad9f
to
ca0b260
Compare
`Init_pg_query` isn't actually exported, but `_Init_pg_query` is: ``` % nm pg_query_ruby.o | grep Init 0000000000000000 T _Init_pg_query 0000000000003b40 b _Init_pg_query.rb_intern_id_cache ``` A Ruby compiler compiled with XCode 14 without the flag `-undefined,dynamic_lookup` will see this error: ``` linking shared-object pg_query/pg_query.bundle Undefined symbols for architecture arm64: "Init_pg_query", referenced from: -exported_symbol[s_list] command line option (maybe you meant: _Init_pg_query) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [pg_query.bundle] Error 1 ``` In pganalyze#222, FreeBSD needed `Init_pg_query`, so we uses a specific symbol map file for FreeBSD. Closes pganalyze#255
ca0b260
to
efda1d5
Compare
@lfittl Ah, thanks. I should have looked at the history to see that. I added a FreeBSD symbol file. |
Init_pg_query
from exported symbol map for macOS buildsInit_pg_query
from exported symbol map
Init_pg_query
isn't actually exported, but_Init_pg_query
is:A Ruby compiler compiled with XCode 14 without the flag
-undefined,dynamic_lookup
will see this error:In #222, FreeBSD needed
Init_pg_query
, so we uses a specific symbol map file for FreeBSD.Closes #255