Project

General

Profile

Actions

Bug #18607

closed

Ruby 2.7.5 fails to configure on macOS Monterey on mac with M1 Pro

Added by actuallydoughughes (Doug Hughes) about 2 years ago. Updated about 2 years ago.

Status:
Feedback
Assignee:
-
Target version:
-
[ruby-core:107767]

Description

I have a new Mac with an M1 Pro CPU running Monterey. I'm trying to build ruby 2.7.5 from source and running into an issue when running the configure script, as outlined below. Please note that I am able to build 2.6.9 and 3.0.3, so this seems like an outlier. The same problem also occurs when trying to configure before building 2.7.4.

When running ./configure it runs through assorted checks, but fails at "checking size of long long" with this error:

...
checking size of long long... configure: error: in `/Users/doughughes/Downloads/ruby-2.7.5':
configure: error: cannot compute sizeof (long long)
See `config.log' for more details

I am trying to compile using the same configure command that ruby-install (https://github.com/postmodern/ruby-install) would. The command I'm trying is:

./configure --with-opt-dir="$(brew --prefix openssl@1.1):$(brew --prefix readline):$(brew --prefix libyaml):$(brew --prefix gdbm)"

The values for the brew prefixes are:

  • brew --prefix openssl@1.1 = /opt/homebrew/opt/openssl@1.1 (this version of openSSL reports it is "OpenSSL 1.1.1m 14 Dec 2021"
  • brew --prefix readline = /opt/homebrew/opt/readline
  • brew --prefix libyaml = /opt/homebrew/opt/libyaml
  • brew --prefix gdbm = /opt/homebrew/opt/gdbm

I've tried using openSSL 3 from homebrew at /opt/homebrew/opt/openssl@3. (./configure --with-opt-dir="$(brew --prefix openssl@3):$(brew --prefix readline):$(brew --prefix libyaml):$(brew --prefix gdbm)") This results in the same error as above.

I've tried using the system version of openSSL, OpenSSL 1.1.1l 24 Aug 2021, from /run/current-system/sw/bin/openssl. (./configure --with-opt-dir="/run/current-system/sw/bin/openssl:$(brew --prefix readline):$(brew --prefix libyaml):$(brew --prefix gdbm)") This fails just before the previous two options with this output:

...
checking for an ANSI C-conforming const... no
checking whether char is unsigned... yes
checking for inline... no
checking for working volatile... no
checking for typeof syntax and keyword spelling... no
checking for C/C++ restrict keyword... no
configure: error: ANSI C-conforming const and volatile are mandatory

The research I've done seems to suggest that this is an openSSL issue, but I haven't been able to prove that one way or another. Any help would be appreciated, if possible.


Files

config.log (208 KB) config.log This is the config.log for configuring with openssl@1.1 actuallydoughughes (Doug Hughes), 03/03/2022 06:23 PM

Updated by hsbt (Hiroshi SHIBATA) about 2 years ago

  • Status changed from Open to Feedback

Can you file this to ruby-install repo at first?

Actions #2

Updated by actuallydoughughes (Doug Hughes) about 2 years ago

hsbt (Hiroshi SHIBATA) wrote in #note-1:

Can you file this to ruby-install repo at first?

I will definitely do so. I was initially going to do that but, in following their bug report instructions, they had me run the Ruby configure script manually and, since I was able to reproduce that problem outside of ruby-install, their instructions said to report it here.

FYI, I ran ./configure by itself, with no arguments, for Ruby 2.7.5 downloaded from https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.5.tar.xz and received the same result:

checking size of long long... configure: error: in `/Users/doughughes/Downloads/ruby-2.7.5':
configure: error: cannot compute sizeof (long long)
See `config.log' for more details
Actions

Also available in: Atom PDF

Like0
Like0Like0