Using `--with-ext=+` only has the indended effect (compiling all extensions that would normally get compiled) on Ruby 2.5+. On older versions, it causes none of the default extensions to get compiled, resulting in a defunct installation.
Normally, Ruby `make` step will print a warning about any missing
extensions, but will not abort the build and instead proceed as normal.
Since Ruby installations without openssl or psych are essentially
broken, ruby-build used to have a `verify_openssl` build step to test if
the newly built Ruby can load these extensions, and print helpful
information and abort the build on errors:
Loading the Ruby openssl extension failed
ERROR: Ruby install aborted due to missing extensions
The `verify_opensl` implementation was necessary to provide a good
experience for ruby-build users, but was hacky and I would prefer to
eliminate it.
It appears that passing `--with-ext=openssl,psych` to the Ruby configure
step marks those extensions as mandatory and fails the `make` process if
they failed to build. This is exactly the behavior we want, so this
enables the configure option for all Ruby builds.
ruby-build now prints the full invocation of (almost) every external
command that it runs. Typically that is something like:
-> ./configure --prefix=/path/to/ruby
-> make -j 2
-> make install
All output of these commands still goes to the log file by default.
This changes the behavior of `--verbose` mode to simply redirect all
command output to the stdout & stderr of the parent process instead of
writing to and then tailing the log file. This allows implementations of
commands like `./configure` or `make` to detect a terminal and output
color.
This was only used in Ruby versions < 1.9.3, which are now EOL.
This also removes a 11-years old workaround for building Ruby 2.0 with clang.
06d7994bcf
Newer MRIs will pick up gcc-4.2 from PATH and use that instead of
`/usr/bin/gcc`. While this worked up till now, it will not work in
Yosemite anymore since Homebrew's apple-gcc42 is generally not
compatible with 10.10.
So when CC has not explicitly been set, set it to `clang` to avoid
searching the PATH for any other gcc versions. This fixes MRI builds on
systems where apple-gcc42 is installed.
The definitions that use `require_gcc` are not compatible with Apple's
clang-powered `gcc` and need gcc-4.2 from Homebrew. However, builds
using gcc-4.2 fail on Yosemite with a warning:
couldn't understand kern.osversion `14.0.0'
Although the warning is non-fatal, the build goes to shit from there. It
seems that setting the magical value `MACOSX_DEPLOYMENT_TARGET=10.9`
makes the build work and doesn't seem to have negative consequences.