However, since the following warning message is displayed, so I add a check for the validity of the option via the try_link method to avoid future build failures.
...
linking shared-object numo/linalg/lapack.bundle
ld: warning: -undefined dynamic_lookup may not work with chained fixups
...
Please consider this pull request for macOS users. Thank you.
Installation of Numo::Linalg fails with Xcode14 and Ruby 3.1 as follows:
The cause is the same as the bug fixed in Ruby3.1.3.
https://www.ruby-lang.org/ja/news/2022/11/24/ruby-3-1-3-released/ https://bugs.ruby-lang.org/issues/18912
To fix this bug, add the
-undefined dynamic_lookup
option when building with macOS and Ruby 3.1.https://github.com/ruby/ruby/pull/6440/commits/881e9c83df17f55f56c4cc2de1b7b3c31599fea4
However, since the following warning message is displayed, so I add a check for the validity of the option via the try_link method to avoid future build failures.
Please consider this pull request for macOS users. Thank you.