ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:109905] [Ruby master Bug#19005] Ruby interpreter compiled XCode 14 cannot build some native gems on macOS
@ 2022-09-15 23:07 stanhu (Stan Hu)
  2022-09-16  0:15 ` [ruby-core:109906] " stanhu (Stan Hu)
                   ` (26 more replies)
  0 siblings, 27 replies; 28+ messages in thread
From: stanhu (Stan Hu) @ 2022-09-15 23:07 UTC (permalink / raw)
  To: ruby-core

Issue #19005 has been reported by stanhu (Stan Hu).

----------------------------------------
Bug #19005: Ruby interpreter compiled XCode 14 cannot build some native gems on macOS
https://bugs.ruby-lang.org/issues/19005

* Author: stanhu (Stan Hu)
* Status: Open
* Priority: Normal
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2023-08-23  4:49 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-15 23:07 [ruby-core:109905] [Ruby master Bug#19005] Ruby interpreter compiled XCode 14 cannot build some native gems on macOS stanhu (Stan Hu)
2022-09-16  0:15 ` [ruby-core:109906] " stanhu (Stan Hu)
2022-09-16  1:18 ` [ruby-core:109907] " stanhu (Stan Hu)
2022-09-16  1:39 ` [ruby-core:109908] " stanhu (Stan Hu)
2022-09-16  3:05 ` [ruby-core:109909] " nobu (Nobuyoshi Nakada)
2022-09-16  4:14 ` [ruby-core:109910] " stanhu (Stan Hu)
2022-09-16  4:15 ` [ruby-core:109911] " stanhu (Stan Hu)
2022-09-16  5:19 ` [ruby-core:109912] " stanhu (Stan Hu)
2022-09-16  5:59 ` [ruby-core:109913] " hsbt (Hiroshi SHIBATA)
2022-09-16  6:06 ` [ruby-core:109914] " hsbt (Hiroshi SHIBATA)
2022-09-16 13:19 ` [ruby-core:109919] " stanhu (Stan Hu)
2022-09-17  4:30 ` [ruby-core:109931] " stanhu (Stan Hu)
2022-09-26  9:02 ` [ruby-core:110083] " hsbt (Hiroshi SHIBATA)
2022-10-01  9:12 ` [ruby-core:110159] " nagachika (Tomoyuki Chikanaga)
2022-10-12  9:16 ` [ruby-core:110271] " hsbt (Hiroshi SHIBATA)
2022-11-03 17:46 ` [ruby-core:110590] " Eregon (Benoit Daloze)
2022-11-03 21:43 ` [ruby-core:110598] " kou (Kouhei Sutou)
2022-11-03 21:47 ` [ruby-core:110599] " kou (Kouhei Sutou)
2022-11-03 22:03 ` [ruby-core:110600] " stanhu (Stan Hu)
2022-11-04  3:17 ` [ruby-core:110601] " kou (Kouhei Sutou)
2022-12-24 16:47 ` [ruby-core:111419] " naruse (Yui NARUSE) via ruby-core
2023-01-07  8:19 ` [ruby-core:111713] " stanhu (Stan Hu) via ruby-core
2023-01-07  8:40 ` [ruby-core:111714] " stanhu (Stan Hu) via ruby-core
2023-01-07 18:28 ` [ruby-core:111729] " stanhu (Stan Hu) via ruby-core
2023-01-07 18:55 ` [ruby-core:111730] " stanhu (Stan Hu) via ruby-core
2023-01-08  7:50 ` [ruby-core:111732] " nobu (Nobuyoshi Nakada) via ruby-core
2023-01-10  9:20 ` [ruby-core:111769] " stanhu (Stan Hu) via ruby-core
2023-08-23  4:49 ` [ruby-core:114460] " stanhu (Stan Hu) via ruby-core

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).