I have a legacy application that uses ruby 2.1.0 and
$ rbenv install 2.1.0
worked fine in BigSur.
However after updating to MacOS 14.4.1 Sonoma from Big Sur 11 I can’t get it to work.
I’ve replaced the old rbenv version with a clean git install with to success
$ rbenv -v
rbenv 1.2.0-87-ge8b7a27
I’ve installed the XCode command tools after upgrading to Sonoma.
I’m using MacPorts, and I’ve reinstalled all my ports as per their instructions.
$ uname -a
Darwin xoco6p.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:11:05 PDT 2024; root:xnu-10063.101.17~1/RELEASE_X86_64 x86_64
$ rbenv install 2.1.0
==> Installing yaml-0.1.6...
-> ./configure "--prefix=$HOME/.rbenv/versions/2.1.0"
-> make -j 12
-> make install
==> Installed yaml-0.1.6 to /Users/jose/.rbenv/versions/2.1.0
==> Installing openssl-1.0.2u...
-> ./config "--prefix=$HOME/.rbenv/versions/2.1.0/openssl" "--openssldir=$HOME/.rbenv/versions/2.1.0/openssl/ssl" zlib-dynamic no-ssl3 shared no-ssl2 no-krb5
-> make -j 12
BUILD FAILED (macOS 14.4.1 on x86_64 using ruby-build 20240416)
You can inspect the build directory at /Users/jose/MyTemp/ruby-build.20240424214638.52529.gppzyT
See the full build log at /Users/jose/MyTemp/ruby-build.20240424214638.52529.log
The log file shows that it failed to configure the openssl make file:
$ less /Users/jose/MyTemp/ruby-build.20240424214638.52529.log
.........
==> Installed yaml-0.1.6 to /Users/jose/.rbenv/versions/2.1.0
cd /Users/jose/MyTemp/ruby-build.20240424214638.52529.gppzyT
-> tar xzf openssl-1.0.2u.tar.gz
cd /Users/jose/MyTemp/ruby-build.20240424214638.52529.gppzyT/openssl-1.0.2u
==> Installing openssl-1.0.2u...
-> ./config "--prefix=$HOME/.rbenv/versions/2.1.0/openssl" "--openssldir=$HOME/.rbenv/versions/2.1.0/openssl/ssl" zlib-dynamic no-ssl3 shared no-ssl2 no-krb5
Operating system: i686-apple-darwinDarwin Kernel Version 23.4.0: Fri Mar 15 00:11:05 PDT 2024; root:xnu-10063.101.17~1/RELEASE_X86_64
WARNING! If you wish to build 64-bit library, then you have to
invoke './Configure darwin64-x86_64-cc' *manually*.
Configuring for darwin-i386-cc
.........
"_time", referenced from:
_CRYPTO_dbg_malloc in libcrypto.a(mem_dbg.o)
_bnrand in libcrypto.a(bn_rand.o)
_RAND_poll in libcrypto.a(rand_unix.o)
_ASN1_TIME_diff in libcrypto.a(a_time.o)
_X509_cmp_time in libcrypto.a(x509_vfy.o)
_X509_time_adj in libcrypto.a(x509_vfy.o)
_X509_gmtime_adj in libcrypto.a(x509_vfy.o)
...
(maybe you meant: _X509_cmp_time, _TS_TST_INFO_set_time , _X509_time_adj , _X509_STORE_CTX_set_time , _err_clear_last_constant_time , _TS_RESP_CTX_set_time_cb , _PKCS7_add0_attrib_signing_time , _X509_VERIFY_PARAM_set_time , _ASN1_UTCTIME_cmp_time_t , _X509_time_adj_ex , _TS_TST_INFO_get_time , _X509_cmp_current_time )
"_vfprintf", referenced from:
_OPENSSL_showfatal in libcrypto.a(cryptlib.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [link_a.darwin] Error 1
make[3]: *** [do_darwin-shared] Error 2
make[2]: *** [libcrypto.1.0.0.dylib] Error 2
make[1]: *** [shared] Error 2
make: *** [build_crypto] Error 1
external command failed with status 2
It appears that it fails to configure for x86_64, and continues with i386.
Can you please help my out on how to install ruby 2.1.0 using rbenv?
Best,
Jose Ambros-Ingerson