Edit 2: Tried installing with asdf
instead and getting the same/similar build error, so that's reassuring I guess:
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
compiling wait.c
linking shared-object etc.bundle
closure.c:300:14: error: call to undeclared function 'ffi_prep_closure'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
result = ffi_prep_closure(pcl, cif, callback, (void *)(data->self));
^
1 error generated.
make[2]: *** [closure.o] Error 1
make[1]: *** [ext/fiddle/all] Error 2
make[1]: *** Waiting for unfinished jobs....
compiling date_strptime.c
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
linking shared-object io/nonblock.bundle
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
linking shared-object io/wait.bundle
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
linking shared-object io/console.bundle
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
1 warning generated.
linking shared-object bigdecimal.bundle
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
linking shared-object date_core.bundle
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
make: *** [build-ext] Error 2
Edit 1: Here's the output towards the end of the error file:
https://pastebin.com/HXZva8w9
Background: Flutter development environment, trying to install cocoapods, but that's** failing, asking me to install updated ruby version.
Trying to install ruby: Tried various methods with rbenv
, brew
and rvm
- all eventually failing with my last attempt being this:
Davids-MacBook-Pro-4:~ daveshirman$ rbenv install 3.2.2
To follow progress, use 'tail -f /var/folders/bg/hx4gy68d1sn9w8yyxc5r9g800000gn/T/ruby-build.20231030135906.17084.log' or pass --verbose
Downloading openssl-3.1.4.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/840af5366ab9b522bde525826be3ef0fb0af81c6a9ebd84caa600fea1731eee3
Installing openssl-3.1.4...
Installed openssl-3.1.4 to /Users/daveshirman/.rbenv/versions/3.2.2
Downloading ruby-3.2.2.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.2.tar.gz
Installing ruby-3.2.2...
ruby-build: using readline from homebrew
ruby-build: using libyaml from homebrew
ruby-build: using gmp from homebrew
BUILD FAILED (macOS 14.1 using ruby-build 20231025)
Inspect or clean up the working tree at /var/folders/bg/hx4gy68d1sn9w8yyxc5r9g800000gn/T/ruby-build.20231030135906.17084.dykRrZ
Results logged to /var/folders/bg/hx4gy68d1sn9w8yyxc5r9g800000gn/T/ruby-build.20231030135906.17084.log
Last 10 log lines:
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
linking shared-object -test-/string.bundle
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
1 warning generated.
linking shared-object bigdecimal.bundle
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
linking shared-object date_core.bundle
ld: warning: ignoring duplicate libraries: '-lruby.3.2'
make: *** [build-ext] Error 2
Can someone please give me a set of steps that work?
Thanks!
Terminal
in Rosetta moderbenv install <version>
eval "$(rbenv init - bash)"
to ~/.bash_profile
Then everything functioned as normal.