Skip to content

Instantly share code, notes, and snippets.

@BirkhoffLee
Created September 12, 2022 02:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BirkhoffLee/fe7a3259893d7952b46e2af8b3f83ff2 to your computer and use it in GitHub Desktop.
Save BirkhoffLee/fe7a3259893d7952b46e2af8b3f83ff2 to your computer and use it in GitHub Desktop.
Install ruby 3.1.2 on M1 with rbenv with homebrew openssl and a mitigation of libtool deprecation
CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)" RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)" rbenv install --patch 3.1.2 --verbose < patch1.patch
diff --git a/configure.ac b/configure.ac
index 2dcebdde9f..b11809c6d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -191,6 +191,13 @@ AS_CASE(["${build_os}"],
],
[aix*], [
AC_PATH_TOOL([NM], [nm], [/usr/ccs/bin/nm], [/usr/ccs/bin:$PATH])
+],
+[darwin*], [
+ AS_IF([libtool 2>&1 | grep no_warning_for_no_symbols > /dev/null], [
+ ac_cv_prog_ac_ct_RANLIB=:
+ ac_cv_prog_ac_ct_AR='libtool -static'
+ rb_cv_arflags='-no_warning_for_no_symbols -o'
+ ])
])
AS_CASE(["${target_os}"],
[cygwin*|mingw*], [
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment