Unable to install ruby 3.1.4 on M1 macOS 14.3.1 on arm64 using ruby-build 20240119
#2349
-
Using rbenv I was able to install ruby version before. I just realized that something is wrong while I was trying to install ruby version System information which brew
=> brew: aliased to arch -arm64 /opt/homebrew/bin/brew which rbenv
=> which rbenv
rbenv () {
local command
command="${1:-}"
if [ "$#" -gt 0 ]
then
shift
fi
case "$command" in
(rehash | shell) eval "$(rbenv "sh-$command" "$@")" ;;
(*) command rbenv "$command" "$@" ;;
esac
} which ruby
=> /Users/valdrinkuchi/.rbenv/shims/ruby rbenv versions
=> system
2.7.2
2.7.4
3.0.3
3.2.2 rbenv install 3.1.4
=> cd /var/folders/my/tjvgd1591sv3q08h635pzfs80000gn/T/ruby-build.20240220085326.40640.cuBsTm
==> Downloading ruby-3.1.4.tar.gz...
-> curl -q -fL -o ruby-3.1.4.tar.gz https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.4.tar.gz
-> tar xzf ruby-3.1.4.tar.gz
cd /var/folders/my/tjvgd1591sv3q08h635pzfs80000gn/T/ruby-build.20240220085326.40640.cuBsTm/ruby-3.1.4
==> Installing ruby-3.1.4...
-> ./configure "--prefix=$HOME/.rbenv/versions/3.1.4" --enable-shared --with-readline-dir=/usr/local/opt/readline --with-libyaml-dir=/usr/local/opt/libyaml --with-gmp-dir=/usr/local/opt/gmp --with-ext=openssl,psych,+ --with-openssl-dir=/opt/homebrew/opt/openssl@3
...
Configuration summary for ruby version 3.1.4
* Installation prefix: /Users/valdrinkuchi/.rbenv/versions/3.1.4
* exec prefix: ${prefix}
* arch: arm64-darwin23
* site arch: ${arch}
* RUBY_BASE_NAME: ruby
* enable shared: yes
* ruby lib prefix: ${libdir}/${RUBY_BASE_NAME}
* site libraries path: ${rubylibprefix}/${sitearch}
* vendor path: ${rubylibprefix}/vendor_ruby
* target OS: darwin23
* compiler: clang
* with pthread: yes
* with coroutine: arm64
* enable shared libs: yes
* dynamic library ext: bundle
* CFLAGS: -fdeclspec ${optflags} ${debugflags} ${warnflags}
* LDFLAGS: -L. -fstack-protector-strong \
-L/usr/local/opt/gmp/lib -L/usr/local/lib
* DLDFLAGS: -L/usr/local/opt/gmp/lib \
-Wl,-undefined,dynamic_lookup
* optflags: -O3 -fno-fast-math
* debugflags: -ggdb3
* warnflags: -Wall -Wextra -Wdeprecated-declarations \
-Wdivision-by-zero \
-Wimplicit-function-declaration -Wimplicit-int \
-Wmisleading-indentation -Wpointer-arith \
-Wshorten-64-to-32 -Wwrite-strings \
-Wold-style-definition -Wmissing-noreturn \
-Wno-cast-function-type \
-Wno-constant-logical-operand -Wno-long-long \
-Wno-missing-field-initializers \
-Wno-overlength-strings -Wno-parentheses-equality \
-Wno-self-assign -Wno-tautological-compare \
-Wno-unused-parameter -Wno-unused-value \
-Wunused-variable -Wextra-tokens -Wundef
* strip command: strip -A -n
* install doc: rdoc
* JIT support: yes
* man page type: doc
* BASERUBY -v: ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) \
[arm64-darwin23]
---
-> make -j 10
BASERUBY = /Users/valdrinkuchi/.rbenv/shims/ruby --disable=gems
CC = clang
LD = clang
LDSHARED = clang -dynamiclib
CFLAGS = -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -std=gnu99 -fno-common -pipe
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -I. -I.ext/include/arm64-darwin23 -I./include -I. -I./enc/unicode/13.0.0
CPPFLAGS = -I/usr/local/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT
DLDFLAGS = -L/usr/local/opt/gmp/lib -Wl,-undefined,dynamic_lookup -install_name /Users/valdrinkuchi/.rbenv/versions/3.1.4/lib/libruby.3.1.dylib -compatibility_version 3.1 -current_version 3.1.4 -fstack-protector-strong -framework CoreFoundation -fstack-protector-strong -framework CoreFoundation
SOLIBS = -lpthread -ldl -lobjc
LANG = en_US.UTF-8
LC_ALL =
LC_CTYPE = UTF-8
MFLAGS = - --jobserver-fds=6,7 -j
Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: arm64-apple-darwin23.3.0
...
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
# define OSSL_DEPRECATED(since) __attribute__((deprecated))
^
ossl_pkey_ec.c:419:9: warning: 'EC_KEY_get0_private_key' is deprecated [-Wdeprecated-declarations]
if (EC_KEY_get0_private_key(ec))
^
/opt/homebrew/opt/openssl@3/include/openssl/ec.h:1067:1: note: 'EC_KEY_get0_private_key' has been explicitly marked deprecated here
OSSL_DEPRECATEDIN_3_0 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:194:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
# define OSSL_DEPRECATED(since) __attribute__((deprecated))
^
ossl_pkey_ec.c:436:5: warning: 'EVP_PKEY_get0_EC_KEY' is deprecated [-Wdeprecated-declarations]
GetEC(self, ec);
^
ossl_pkey_ec.c:24:13: note: expanded from macro 'GetEC'
(key) = EVP_PKEY_get0_EC_KEY(_pkey); \
^
/opt/homebrew/opt/openssl@3/include/openssl/evp.h:1379:1: note: 'EVP_PKEY_get0_EC_KEY' has been explicitly marked deprecated here
OSSL_DEPRECATEDIN_3_0
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:194:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
# define OSSL_DEPRECATED(since) __attribute__((deprecated))
^
ossl_pkey_ec.c:436:5: warning: assigning to 'EC_KEY *' (aka 'struct ec_key_st *') from 'const struct ec_key_st *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
GetEC(self, ec);
^~~~~~~~~~~~~~~
ossl_pkey_ec.c:24:11: note: expanded from macro 'GetEC'
(key) = EVP_PKEY_get0_EC_KEY(_pkey); \
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
ossl_pkey_ec.c:437:9: warning: 'EC_KEY_get0_public_key' is deprecated [-Wdeprecated-declarations]
if (EC_KEY_get0_public_key(ec) == NULL)
^
/opt/homebrew/opt/openssl@3/include/openssl/ec.h:1081:1: note: 'EC_KEY_get0_public_key' has been explicitly marked deprecated here
OSSL_DEPRECATEDIN_3_0 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:194:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
# define OSSL_DEPRECATED(since) __attribute__((deprecated))
^
ossl_pkey_ec.c:439:9: warning: 'EC_KEY_get0_private_key' is deprecated [-Wdeprecated-declarations]
if (EC_KEY_get0_private_key(ec))
^
/opt/homebrew/opt/openssl@3/include/openssl/ec.h:1067:1: note: 'EC_KEY_get0_private_key' has been explicitly marked deprecated here
OSSL_DEPRECATEDIN_3_0 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:194:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
# define OSSL_DEPRECATED(since) __attribute__((deprecated))
^
ossl_pkey_ec.c:577:21: warning: 'PEM_read_bio_ECPKParameters' is deprecated [-Wdeprecated-declarations]
group = PEM_read_bio_ECPKParameters(in, NULL, NULL, NULL);
^
/opt/homebrew/opt/openssl@3/include/openssl/pem.h:465:21: note: 'PEM_read_bio_ECPKParameters' has been explicitly marked deprecated here
DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, ECPKParameters, EC_GROUP)
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:194:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
# define OSSL_DEPRECATED(since) __attribute__((deprecated))
^
ossl_pkey_ec.c:1023:13: warning: 'PEM_write_bio_ECPKParameters' is deprecated [-Wdeprecated-declarations]
i = PEM_write_bio_ECPKParameters(out, group);
^
/opt/homebrew/opt/openssl@3/include/openssl/pem.h:465:21: note: 'PEM_write_bio_ECPKParameters' has been explicitly marked deprecated here
DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, ECPKParameters, EC_GROUP)
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:194:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
# define OSSL_DEPRECATED(since) __attribute__((deprecated))
^
ossl_pkey_ec.c:1081:10: warning: 'ECPKParameters_print' is deprecated [-Wdeprecated-declarations]
if (!ECPKParameters_print(out, group, 0)) {
^
/opt/homebrew/opt/openssl@3/include/openssl/ec.h:945:1: note: 'ECPKParameters_print' has been explicitly marked deprecated here
OSSL_DEPRECATEDIN_3_0 int ECPKParameters_print(BIO *bp, const EC_GROUP *x,
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:194:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
# define OSSL_DEPRECATED(since) __attribute__((deprecated))
^
ossl_pkey_ec.c:1168:14: warning: 'EC_POINT_bn2point' is deprecated [-Wdeprecated-declarations]
point = EC_POINT_bn2point(group, GetBNPtr(arg2), NULL, ossl_bn_ctx);
^
/opt/homebrew/opt/openssl@3/include/openssl/ec.h:793:1: note: 'EC_POINT_bn2point' has been explicitly marked deprecated here
OSSL_DEPRECATEDIN_3_0 EC_POINT *EC_POINT_bn2point(const EC_GROUP *,
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:194:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
# define OSSL_DEPRECATED(since) __attribute__((deprecated))
^
compiling ossl_ssl_session.c
compiling ossl_ts.c
1 warning generated.
44 warnings generated.
compiling ossl_x509.c
compiling ossl_x509attr.c
40 warnings generated.
ossl_ssl.c:294:12: warning: 'EVP_PKEY_get0_DH' is deprecated [-Wdeprecated-declarations]
return EVP_PKEY_get0_DH(pkey);
^
/opt/homebrew/opt/openssl@3/include/openssl/evp.h:1371:1: note: 'EVP_PKEY_get0_DH' has been explicitly marked deprecated here
OSSL_DEPRECATEDIN_3_0 const struct dh_st *EVP_PKEY_get0_DH(const EVP_PKEY *pkey);
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:194:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
# define OSSL_DEPRECATED(since) __attribute__((deprecated))
^
ossl_ssl.c:294:12: warning: returning 'const struct dh_st *' from a function with result type 'DH *' (aka 'struct dh_st *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
return EVP_PKEY_get0_DH(pkey);
^~~~~~~~~~~~~~~~~~~~~~
ossl_ssl.c:769:5: warning: 'SSL_CTX_set_tmp_dh_callback' is deprecated [-Wdeprecated-declarations]
SSL_CTX_set_tmp_dh_callback(ctx, ossl_tmp_dh_callback);
^
/opt/homebrew/opt/openssl@3/include/openssl/ssl.h:2263:1: note: 'SSL_CTX_set_tmp_dh_callback' has been explicitly marked deprecated here
OSSL_DEPRECATEDIN_3_0
^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:194:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
^
compiling ossl_x509cert.c
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
# define OSSL_DEPRECATED(since) __attribute__((deprecated))
^
ossl_ssl.c:1643:12: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
ret = func(ssl);
^
compiling ossl_x509crl.c
compiling ossl_x509ext.c
compiling ossl_x509name.c
compiling ossl_x509req.c
compiling ossl_x509revoked.c
compiling ossl_x509store.c
4 warnings generated.
installing default openssl libraries
linking shared-object openssl.bundle
linking shared-object psych.bundle
ld: warning: ignoring duplicate libraries: '-lruby.3.1'
ld: warning: ignoring duplicate libraries: '-lruby.3.1'
1 warning generated.
linking shared-object ripper.bundle
ld: warning: ignoring duplicate libraries: '-lruby.3.1'
make: *** [build-ext] Error 2
external command failed with status 2 I would appreciate any help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi, thanks for providing detailed output. From what you've shared, I see no visible error message anywhere. Most of the log you've pasted is "warning" and "note" lines, which are non-fatal and can be safely ignored. However, building suddenly fails with a You could Please check your log files again and search for "error" or "fatal" to better isolate the lines that actually report a fatal error. |
Beta Was this translation helpful? Give feedback.
I think the culprit is this line:
Is it possible that you've installed
openssl@3
forx86_64
architecture instead for your computer'sarm64
architecture, perhaps by doingarch -x86_64 /opt/homebrew/bin/brew install openssl@3
?You could try reinstalling
openssl@3
and trying again. Note that you shouldn't be doing anyarch
tricks to do that.