From: "stanhu (Stan Hu) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "stanhu (Stan Hu)" <noreply@ruby-lang.org>
Subject: [ruby-core:114460] [Ruby master Bug#19005] Ruby interpreter compiled XCode 14 cannot build some native gems on macOS
Date: Wed, 23 Aug 2023 04:49:32 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-104223.20230823044931.13608@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-19005.20220915230724.13608@ruby-lang.org
Issue #19005 has been updated by stanhu (Stan Hu).
We can close this now that XCode 14.3, which ships with clang 14.0.3, now fixes this issue: https://github.com/python/cpython/issues/97524#issuecomment-1458855301
----------------------------------------
Bug #19005: Ruby interpreter compiled XCode 14 cannot build some native gems on macOS
https://bugs.ruby-lang.org/issues/19005#change-104223
* Author: stanhu (Stan Hu)
* Status: Open
* 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/
prev parent reply other threads:[~2023-08-23 4:49 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` stanhu (Stan Hu) via ruby-core [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-104223.20230823044931.13608@ruby-lang.org \
--to=ruby-core@ruby-lang.org \
--cc=noreply@ruby-lang.org \
--cc=ruby-core@ml.ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).