Skip to content

Commit

Permalink
Drop Init_pg_query from exported symbol map
Browse files Browse the repository at this point in the history
`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
```

Closes #255
  • Loading branch information
stanhu committed Sep 16, 2022
1 parent 6274182 commit 6962a62
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion ext/pg_query/pg_query_ruby.sym
@@ -1,2 +1 @@
_Init_pg_query
Init_pg_query

0 comments on commit 6962a62

Please sign in to comment.