This PR adds GNU make to the apt-get install set of all Dockerfiles.
Motivation:
As discussed in #81, several gems (ddtrace, bootsnap, stackprof, gvltools) autodetect in their extconf.rb if they're running on JRuby, and avoid attempting to compile their native extension in that case.
Unfortunately, the "avoid attempting to compile" is implemented by writing a dummy almost-empty Makefile, which rubygems still tries to run. This breaks if GNU make is not installed.
GNU make is quite small, so this seems a nice improvement in user experience for users of the JRuby docker images.
How to test the change?:
Before:
$ gem install bootsnap
Fetching bootsnap-1.14.0.gem
Fetching msgpack-1.6.0-java.gem
Successfully installed msgpack-1.6.0-java
Building native extensions. This could take a while...
ERROR: Error installing bootsnap:
ERROR: Failed to build gem native extension.
current directory: /usr/local/bundle/gems/bootsnap-1.14.0/ext/bootsnap
/opt/jruby/bin/jruby -I /opt/jruby/lib/ruby/stdlib -r ./siteconf20221121-34-we57cb.rb extconf.rb
current directory: /usr/local/bundle/gems/bootsnap-1.14.0/ext/bootsnap
make DESTDIR\= clean
sh: 1: exec: make: not found
current directory: /usr/local/bundle/gems/bootsnap-1.14.0/ext/bootsnap
make DESTDIR\=
sh: 1: exec: make: not found
make failed, exit code 127
Gem files will remain installed in /usr/local/bundle/gems/bootsnap-1.14.0 for inspection.
Results logged to /usr/local/bundle/extensions/universal-java-17/2.6.0/bootsnap-1.14.0/gem_make.out
After:
$ gem install bootsnap
Fetching msgpack-1.6.0-java.gem
Fetching bootsnap-1.14.0.gem
Successfully installed msgpack-1.6.0-java
Building native extensions. This could take a while...
Successfully installed bootsnap-1.14.0
2 gems installed
What does this PR do?:
This PR adds GNU make to the
apt-get install
set of allDockerfile
s.Motivation:
As discussed in #81, several gems (
ddtrace
,bootsnap
,stackprof
,gvltools
) autodetect in theirextconf.rb
if they're running on JRuby, and avoid attempting to compile their native extension in that case.Unfortunately, the "avoid attempting to compile" is implemented by writing a dummy almost-empty
Makefile
, which rubygems still tries to run. This breaks if GNU make is not installed.GNU make is quite small, so this seems a nice improvement in user experience for users of the JRuby docker images.
How to test the change?:
Before:
After:
Fixes #81