* [ruby-core:118983] [Ruby master Bug#20706] 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
@ 2024-08-29 14:43 wkoszek (Adam Koszek) via ruby-core
2024-08-29 21:21 ` [ruby-core:118985] " alanwu (Alan Wu) via ruby-core
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: wkoszek (Adam Koszek) via ruby-core @ 2024-08-29 14:43 UTC (permalink / raw)
To: ruby-core; +Cc: wkoszek (Adam Koszek)
Issue #20706 has been reported by wkoszek (Adam Koszek).
----------------------------------------
Bug #20706: 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
https://bugs.ruby-lang.org/issues/20706
* Author: wkoszek (Adam Koszek)
* Status: Open
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
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)
--
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/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ruby-core:118985] [Ruby master Bug#20706] 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
2024-08-29 14:43 [ruby-core:118983] [Ruby master Bug#20706] 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 wkoszek (Adam Koszek) via ruby-core
@ 2024-08-29 21:21 ` alanwu (Alan Wu) via ruby-core
2024-08-29 22:28 ` [ruby-core:118986] " wkoszek (Adam Koszek) via ruby-core
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: alanwu (Alan Wu) via ruby-core @ 2024-08-29 21:21 UTC (permalink / raw)
To: ruby-core; +Cc: alanwu (Alan Wu)
Issue #20706 has been updated by alanwu (Alan Wu).
```
checking for ruby... ^[[33;1m/Users/wk/.rvm/rubies/ruby-3.3.0/bin/ruby^[[m
/Users/wk/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/time.rb:4:in `require': ^[[1mcannot load such file -- date (^[[1;4mLoadError^[[m^[[1m)^[[m
from /Users/wk/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/time.rb:4:in `<top (required)>'
from /Users/wk/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/open-uri.rb:4:in `require'
from /Users/wk/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/open-uri.rb:4:in `<top (required)>'
from tool/downloader.rb:5:in `require'
from tool/downloader.rb:5:in `<main>'
```
Looks like the ruby you're using to build ruby is broken and `require 'date'` is failing. Try fixing that?
----------------------------------------
Bug #20706: 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
https://bugs.ruby-lang.org/issues/20706#change-109558
* Author: wkoszek (Adam Koszek)
* Status: Open
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
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)
--
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/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ruby-core:118986] [Ruby master Bug#20706] 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
2024-08-29 14:43 [ruby-core:118983] [Ruby master Bug#20706] 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 wkoszek (Adam Koszek) via ruby-core
2024-08-29 21:21 ` [ruby-core:118985] " alanwu (Alan Wu) via ruby-core
@ 2024-08-29 22:28 ` wkoszek (Adam Koszek) via ruby-core
2024-08-30 1:42 ` [ruby-core:118988] " nobu (Nobuyoshi Nakada) via ruby-core
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: wkoszek (Adam Koszek) via ruby-core @ 2024-08-29 22:28 UTC (permalink / raw)
To: ruby-core; +Cc: wkoszek (Adam Koszek)
Issue #20706 has been updated by wkoszek (Adam Koszek).
File typescript_after_alan_ask_ditched_rvm.txt added
Ok. I removed the rvm, and started with a Ruby that doesn't throw this warning.
The problem remains the same -- attached log
----------------------------------------
Bug #20706: 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
https://bugs.ruby-lang.org/issues/20706#change-109560
* Author: wkoszek (Adam Koszek)
* Status: Open
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
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_after_alan_ask_ditched_rvm.txt (54.4 KB)
--
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/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ruby-core:118988] [Ruby master Bug#20706] 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
2024-08-29 14:43 [ruby-core:118983] [Ruby master Bug#20706] 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 wkoszek (Adam Koszek) via ruby-core
2024-08-29 21:21 ` [ruby-core:118985] " alanwu (Alan Wu) via ruby-core
2024-08-29 22:28 ` [ruby-core:118986] " wkoszek (Adam Koszek) via ruby-core
@ 2024-08-30 1:42 ` nobu (Nobuyoshi Nakada) via ruby-core
2024-08-30 4:54 ` [ruby-core:118989] " wkoszek (Adam Koszek) via ruby-core
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2024-08-30 1:42 UTC (permalink / raw)
To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)
Issue #20706 has been updated by nobu (Nobuyoshi Nakada).
> warning: this method call resolves to `<&Box<[T]> as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<Box<[T]> as IntoIterator>::into_iter` in Rust 2024
Maybe `rustc` is old?
----------------------------------------
Bug #20706: 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
https://bugs.ruby-lang.org/issues/20706#change-109562
* Author: wkoszek (Adam Koszek)
* Status: Open
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
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_after_alan_ask_ditched_rvm.txt (54.4 KB)
--
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/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ruby-core:118989] [Ruby master Bug#20706] 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
2024-08-29 14:43 [ruby-core:118983] [Ruby master Bug#20706] 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 wkoszek (Adam Koszek) via ruby-core
` (2 preceding siblings ...)
2024-08-30 1:42 ` [ruby-core:118988] " nobu (Nobuyoshi Nakada) via ruby-core
@ 2024-08-30 4:54 ` wkoszek (Adam Koszek) via ruby-core
2024-08-30 6:03 ` [ruby-core:118990] " wkoszek (Adam Koszek) via ruby-core
2024-08-30 6:16 ` [ruby-core:118991] " hsbt (Hiroshi SHIBATA) via ruby-core
5 siblings, 0 replies; 7+ messages in thread
From: wkoszek (Adam Koszek) via ruby-core @ 2024-08-30 4:54 UTC (permalink / raw)
To: ruby-core; +Cc: wkoszek (Adam Koszek)
Issue #20706 has been updated by wkoszek (Adam Koszek).
It looks pretty recent to me:
$ rustc --version
rustc 1.80.1 (3f5fd8dd4 2024-08-06) (Homebrew)
I think there are some warnings that I get even on a PC with Ubuntu 24.04. So I don't worry about those. But the linker error is basically preventing me from using Ruby / RVM.
Trying to ditch Xcode.app now -- will reinstall to see if it helps.
----------------------------------------
Bug #20706: 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
https://bugs.ruby-lang.org/issues/20706#change-109563
* Author: wkoszek (Adam Koszek)
* Status: Open
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
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_after_alan_ask_ditched_rvm.txt (54.4 KB)
--
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/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ruby-core:118990] [Ruby master Bug#20706] 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
2024-08-29 14:43 [ruby-core:118983] [Ruby master Bug#20706] 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 wkoszek (Adam Koszek) via ruby-core
` (3 preceding siblings ...)
2024-08-30 4:54 ` [ruby-core:118989] " wkoszek (Adam Koszek) via ruby-core
@ 2024-08-30 6:03 ` wkoszek (Adam Koszek) via ruby-core
2024-08-30 6:16 ` [ruby-core:118991] " hsbt (Hiroshi SHIBATA) via ruby-core
5 siblings, 0 replies; 7+ messages in thread
From: wkoszek (Adam Koszek) via ruby-core @ 2024-08-30 6:03 UTC (permalink / raw)
To: ruby-core; +Cc: wkoszek (Adam Koszek)
Issue #20706 has been updated by wkoszek (Adam Koszek).
Ok, so I did:
```
sudo rm -rf /Applications/Xcode.app # this was Xcode.app 15.4
brew update
brew upgrade
```
On Sequoia I had to get Xcode_16_beta_6.xip b/c Xcode from App Store doesn't work.
Unpacked, and renamed from `Xcode-beta.app` to `/Applications/Xcode.app`
Downloaded all SDKS:
```
$ xcode-select --install
xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates
[22:34:05][wk@wkoszek_mba:~/tmp/rubyc/ruby-3.3.4]$
```
Result:
```
$ cc --version
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: arm64-apple-darwin24.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
```
I added -v to the LDFLAGS in Makefile. Looks like the offending command is:
```
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch arm64 -platform_version macos 15.0.0 15.0 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -O3 -mllvm -enable-linkonceodr-outlining -o ruby -L. -L/usr/local/lib -pie -framework CoreFoundation main.o dmyext.o dmyenc.o -lruby.3.3-static -framework CoreFoundation -ldl -lobjc -lpthread -ldl -lobjc -lpthread -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/lib/darwin/libclang_rt.osx.a
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
```
Did some reading. Homebrew's "ar" is picked instead of the Xcode's one:
```
$ which ar
/opt/homebrew/bin/ar
```
Looks like ... the workaround for me is to:
```
brew uninstall binutils
```
Is this normal? [I can build Ruby now]
----------------------------------------
Bug #20706: 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
https://bugs.ruby-lang.org/issues/20706#change-109564
* Author: wkoszek (Adam Koszek)
* Status: Open
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
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_after_alan_ask_ditched_rvm.txt (54.4 KB)
--
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/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ruby-core:118991] [Ruby master Bug#20706] 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
2024-08-29 14:43 [ruby-core:118983] [Ruby master Bug#20706] 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 wkoszek (Adam Koszek) via ruby-core
` (4 preceding siblings ...)
2024-08-30 6:03 ` [ruby-core:118990] " wkoszek (Adam Koszek) via ruby-core
@ 2024-08-30 6:16 ` hsbt (Hiroshi SHIBATA) via ruby-core
5 siblings, 0 replies; 7+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2024-08-30 6:16 UTC (permalink / raw)
To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)
Issue #20706 has been updated by hsbt (Hiroshi SHIBATA).
Status changed from Open to Closed
>Is this normal? [I can build Ruby now]
Yes, don't use build toolchain provided by homebrew.
----------------------------------------
Bug #20706: 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
https://bugs.ruby-lang.org/issues/20706#change-109565
* Author: wkoszek (Adam Koszek)
* Status: Closed
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
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_after_alan_ask_ditched_rvm.txt (54.4 KB)
--
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/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-08-30 6:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-29 14:43 [ruby-core:118983] [Ruby master Bug#20706] 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 wkoszek (Adam Koszek) via ruby-core
2024-08-29 21:21 ` [ruby-core:118985] " alanwu (Alan Wu) via ruby-core
2024-08-29 22:28 ` [ruby-core:118986] " wkoszek (Adam Koszek) via ruby-core
2024-08-30 1:42 ` [ruby-core:118988] " nobu (Nobuyoshi Nakada) via ruby-core
2024-08-30 4:54 ` [ruby-core:118989] " wkoszek (Adam Koszek) via ruby-core
2024-08-30 6:03 ` [ruby-core:118990] " wkoszek (Adam Koszek) via ruby-core
2024-08-30 6:16 ` [ruby-core:118991] " hsbt (Hiroshi SHIBATA) 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 NNTP newsgroup(s).