[#111712] [Ruby master Feature#19322] Support spawning "private" child processes — "kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core" <ruby-core@...>
SXNzdWUgIzE5MzIyIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGtqdHNhbmFrdHNpZGlzIChLSiBUc2Fu
14 messages
2023/01/07
[ruby-core:111714] [Ruby master Bug#19005] Ruby interpreter compiled XCode 14 cannot build some native gems on macOS
From:
"stanhu (Stan Hu) via ruby-core" <ruby-core@...>
Date:
2023-01-07 08:40:18 UTC
List:
ruby-core #111714
Issue #19005 has been updated by stanhu (Stan Hu).
Status changed from Discussion to Closed
Ok, I see this was reported in https://bugs.ruby-lang.org/issues/19082.
----------------------------------------
Bug #19005: Ruby interpreter compiled XCode 14 cannot build some native gems on macOS
https://bugs.ruby-lang.org/issues/19005#change-101112
* Author: stanhu (Stan Hu)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 2.7.6p219 (2022-04-12 revision 44c8bfa984) [arm64-darwin21]
* Backport: 2.7: DONE, 3.0: DONE, 3.1: DONE
----------------------------------------
This seems related to https://bugs.ruby-lang.org/issues/18912 and https://bugs.ruby-lang.org/issues/18981 .
Steps to reproduce:
1. Upgrade to XCode 14.
2. Compile a new Ruby interpreter. I used the version provided in https://github.com/ruby/ruby/pull/6297 with `./configure --prefix=/tmp/ruby --with-openssl-dir=$(brew --prefix openssl@1.1) --with-readline-dir=$(brew --prefix readline) --enable-shared`.
3. Confirm that `-Wl,-undefined,dynamic_lookup` is no longer available:
```
irb(main):001:0> RbConfig::CONFIG['DLDFLAGS']
=> "-Wl,-multiply_defined,suppress"
```
4. Ran `gem install pg_query` (`gem install ffi-yajl` will also fail).
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)
```
I can workaround the problem by doing:
```
gem install pg_query -- --with-ldflags="-Wl,-undefined,dynamic_lookup"
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/