Bug #19478
closedRuby 3.2.1 fails to build on macOS El Capitan (10.11.6)
Description
I tried building ruby 3.2.1 from source on macOS 10.11.6. Though I'd built all the way up through ruby 3.1.2 just fine, 3.2.1 chokes with the following:
compiling process.c
process.c:8364:5: error: unknown type name 'clockid_t'; did you mean
'clock_id_t'?
clockid_t c;
^~~~~~~~~
clock_id_t
/usr/include/mach/clock_types.h:53:13: note: 'clock_id_t' declared here
typedef int clock_id_t; /* clock identification type */
^
process.c:8590:5: error: unknown type name 'clockid_t'; did you mean
'clock_id_t'?
clockid_t c;
^~~~~~~~~
clock_id_t
/usr/include/mach/clock_types.h:53:13: note: 'clock_id_t' declared here
typedef int clock_id_t; /* clock identification type */
^
2 errors generated.
make: *** [process.o] Error 1
make: *** Waiting for unfinished jobs....
Updated by hsbt (Hiroshi SHIBATA) over 1 year ago
- Status changed from Open to Rejected
Unfortunately, macOS 10.11(EL Capitan) is already EOL.
Updated by nobu (Nobuyoshi Nakada) over 1 year ago
EL Capitan didn’t have clock_gettime()
?
Updated by chdiza (Charles Diza) over 1 year ago
I don't see the relevance of a macOS version being EOL. They only last three years. Surely ruby aims to support machines older than three years!
Anyway, issues like this one have popped up elsewhere for El Capitan because of an apparent bug in Xcode 8. Some shenanigans involving not finding headers. Check out how this happened with MacVim: https://github.com/macvim-dev/macvim/issues/1342. (At the very end of that thread there's a link to a fix; maybe that will provide some inspiration.)
Updated by austin (Austin Ziegler) over 1 year ago
A Mac OS X version being EOL is likely to be relevant, because El Capitan was released 8 years ago, so it’s been EOL for ~5 years.
For working with older versions of Mac OS, I would suggest using MacPorts, although their ruby32
build is also failing on El Capitan. They have the infrastructure and expertise (as well as people who use such old versions of Mac OS X), however, to be able to potentially produce a patch which you could then potentially use to provide a solution to this issue.