-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set RUBY_CC_VERSION using RakeCompilerDock.set_ruby_cc_version #167
base: main
Are you sure you want to change the base?
Conversation
This avoids the need to hard-code specific patch-level versions. See https://github.com/rake-compiler/rake-compiler-dock/releases/tag/v1.9.1.
Precompilation seems to be failing in the vast majority of cases with the following error:
Have you seen this error elsewhere (given the only change here is the rake-compiler-dock version)? cc @flavorjones |
This code is failing: https://github.com/ruby/psych/blob/56051344d1c399d860f07bbab4720e7086254d8f/lib/psych/visitors/to_ruby.rb#L383-L388
|
No! I've upgraded nokogiri, sqlite3-ruby, and ruby-c-extensions-explained with no problem. And the rake-compiler-dock suite (which has its own test gem) is green.
I bet this is coming from the reset in rake-compiler's "fake.rb" rbconfig. Without spending more time I can't be sure what combination of things is causing this issue, especially since I haven't changed how we build the 2.7.8 cross ruby. Maybe it's because the default Ruby in the container is now 3.4.1? Maybe you can try to run |
@mudge Also, and I know you don't want to hear it, but this is the kind of problem that tends to come up when building against older versions of Ruby. AKA the "too much effort" problem.1 Don't get me wrong, ideally this should work, and if I had an infinite amount of time I would absolutely continue to make old rubies work perfectly even as we make changes to accommodate new rubies. But I don't have that kind of time, and in my opinion it's not worth anyone's effort to precompile EOL rubies in native gems. See rake-compiler/rake-compiler-dock#77 Footnotes |
Using |
I agree with this. It also makes the precompiled gems a lot bigger. |
I don't think this is related to the rake-compiler-dock changes. The most recent ruby:alpine images have had a few of the Edit: here's the commit that removed those packages: docker-library/ruby@7f078b1 |
There appears to be some inconsistency:
|
c21e7e1
to
4d191b2
Compare
Recent images appear to have removed libstdc++ from some Ruby versions. Add it to ensure the re2 shared library can be loaded.
4d191b2
to
ec2fd57
Compare
I added a small feature to make it easier to choose the ruby being used, and would appreciate any thoughts on it: rake-compiler/rake-compiler-dock#151 |
@flavorjones That looks like it worked here. But it seems that fake I don't fully understand tjschuck/rake-compiler-dev-box#5, but I wonder if this workaround is still needed. I should hope most gem authors don't ever need to know about rake-compiler/rake-compiler-dock#151. 😄 |
@stanhu To be clear, the comment referencing the rake-compiler-dev-box issue is referring to the 'resolv' require from rake-compiler/rake-compiler@c83393c2, not the fake_rb method. IIUC, fake_rb is fundamental to how rake-compiler works, but I also don't fully understand rake-compiler. Maybe this is an opportunity to open an issue on rake-compiler to talk about this use case and the errors we saw in the build? |
This avoids the need to hard-code specific patch-level versions.
See https://github.com/rake-compiler/rake-compiler-dock/releases/tag/v1.9.1.