Project

General

Profile

Actions

Bug #20706

closed

Can't build Ruby on macOS Sonoma and Sequoia due to: ignoring duplicate libraries, archive member '/' not a mach-o file in libruby.3.3-static.a

Added by wkoszek (Adam Koszek) 5 months ago. Updated 5 months ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
[ruby-core:118983]

Description

Hi,

I had the same problems with macOS Sonoma and (after an upgrade) Sequoia -- something about my macOS makes it impossible to build Ruby.
Upon an upgrade to Sequoia, I did Xcode upgrade, and then CommandLine tools download.
Then I did "sudo xcode-select --reset"
I'm trying ruby-3.3.4 and ruby-3.2.5 -- both have the same result from below.

Steps:

wget https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.4.tar.gz
tar xzf ruby-3.3.4.tar.gz
cd ruby-3.3.4
script
./configure
make -j

Last lines:

linking shared-object -test-/scan_args.bundle
linking shared-object -test-/string.bundle
linking shared-object objspace.bundle
linking shared-object digest/bubblebabble.bundle
linking shared-object stringio.bundle
linking transcoder big5.bundle
linking shared-object json/ext/generator.bundle
making ends
make[1]: Nothing to be done for `encs'.
linking shared-object nkf.bundle
linking shared-object ripper.bundle
file2lastrev.rb: does not seem to be under a vcs: .
revision.h unchanged
config.status: creating ruby-runner.h
ln -sf ../../rbconfig.rb .ext/arm64-darwin24/rbconfig.rb
linking ruby
ld: warning: ignoring duplicate libraries: '-ldl', '-lobjc', '-lpthread'
ld: archive member '/' not a mach-o file in '/Users/wk/tmp/rubyc/ruby-3.3.4/libruby.3.3-static.a'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [ruby] Error 1
make[1]: *** [ruby] Error 2
make: *** [build-ext] Error 2
[07:35:03][wk@wkoszek_mba:~/tmp/rubyc/ruby-3.3.4]$ exit
exit

Script done, output file is typescript

file /Users/wk/tmp/rubyc/ruby-3.3.4/libruby.3.3-static.a
/Users/wk/tmp/rubyc/ruby-3.3.4/libruby.3.3-static.a: current ar archive

I'm attaching the transcript.

This ticket has this warning too:
https://bugs.ruby-lang.org/issues/20283

But looks like it's a warning. For me it's somehow an error.


Files

typescript (54.7 KB) typescript Result of running "script" before ./configure wkoszek (Adam Koszek), 08/29/2024 02:40 PM
typescript_after_alan_ask_ditched_rvm.txt (54.4 KB) typescript_after_alan_ask_ditched_rvm.txt wkoszek (Adam Koszek), 08/29/2024 10:28 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0