Commit 98b0108
committed
Force build-time gem installs to use current JRuby config
The RubyGems we run at build time runs with JRuby 9.4, which causes
it to use properties from that version for things like gem paths
and extension directories. This is related to the extension
disabling change in jruby#8415 and causes the build-time
extension faking to use the wrong path. For example:
.../gems/shared/extensions/universal-java-25/3.1.0
when it should be
.../gems/shared/extensions/universal-java/3.4.0
The change here uses RubyGems' cross-compiling capability by
forcing a specific rbconfig.rb to be use, and additionally fakes
out the Ruby API version by setting @ruby_api_version on the Gem
module.
This was discovered while attempting to switch fully to the syslog
gem in jruby#9109, since as a bundled gem it will not be
activated unless we successfully fake-out the extension build.
See also this bug related to the resolv gem installing extensions:
* jruby#86491 parent 20cf138 commit 98b0108
3 files changed
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
216 | 220 | | |
217 | 221 | | |
218 | 222 | | |
| |||
251 | 255 | | |
252 | 256 | | |
253 | 257 | | |
| 258 | + | |
254 | 259 | | |
255 | 260 | | |
256 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments