Closed ivoanjo closed 1 year ago
It would be logical to include appropriate tools to build e.g. libsass. Is make
enough? I would assume we'd also need gcc and autotools or similar.
For gems that employ the empty Makefile strategy for platforms that are not supported, having make
would be enough.
For gems going deeper into ffi, having a few more build tools would be useful, although the tradeoff in terms of added size on the docker images may not work out. I somewhat worry it may drive people to create new, "slimmer" images, that then start the cycle again of not having make
🤣
Ahh now I see, so you are suggesting we add make just for those gems that fake out the makefile to fall back on a prebuilt JRuby extension. That seems like a reasonable and small enough change. PR?
Sure! I'll whip up a PR -- might take a few days since I'm going to be traveling next week but I shall deliver!
@headius opened the PR in #82 :)
Hello there! As always, thanks for JRuby and for having nice docker images that can be used easily :)
I work at @Datadog on the
ddtrace
gem. We support JRuby in most functionality provided by the gem, but we have an optional native extension that is MRI/CRuby-specific.The way we make the extension "optional" is by having an
extconf.rb
that generates an effectively-emptyMakefile
. (Reference: https://github.com/DataDog/dd-trace-rb/blob/master/ext/ddtrace_profiling_native_extension/extconf.rb#L35).I've seen this approach being used by other gems as well.
mkmf
actually includes adummy_makefile
method, and a few other gems use it:Unfortunately, this approach breaks if GNU make is not installed because Rubygems will still try to call "make" and blow up since it's not available, even though the
Makefile
was an empty one just to make Rubygems happy.TL;DR: Would it be reasonable to include
make
by default in the docker images so that rubygems doesn't break when installing these no-op extensions?For context, this is what get with the current docker images:
For ddtrace:
For bootsnap: