-
Notifications
You must be signed in to change notification settings - Fork 30
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
[draft] ruby 3.2 support #82
Conversation
Looks like a dependency issue in the makefiles on Macos. Everytime I added a new ruby version I got such dependency issues that appear only when cross compiling and often only with "make -j". |
That brings me back to the idea to move these checks from Nokogiri to RCD. I had the plan to introduce a class kind of |
I'll see if I can repro and diagnose it without the Re: the DLL checks, I agree it would be nice to have something in rake-compiler-dock (or some other, new gem?), but it's not a blocker. Maybe we can commit to working on that together in 2023, I would love to add checks like this to sqlite3-ruby, for example, but haven't gotten there yet. If I get this to go green, and can build a Nokogiri on it that passes the tests, I'll merge this (unless you have objections). Then I'll tackle #71 so I can set up a Nokogiri CI pipeline that will use images generated from RCD head. |
Isolated the issue to building 3.2.0-rc1. Here's the error:
I'm not sure where to start to debug this, so parking it here for bit until I've got more time. |
Note: on a failing build, if I Is this a matter of making a change like this to diff --git a/tasks/bin/cross-ruby.rake b/tasks/bin/cross-ruby.rake
index 8317a2a..6c8a774 100644
--- a/tasks/bin/cross-ruby.rake
+++ b/tasks/bin/cross-ruby.rake
@@ -129,6 +129,7 @@
# make
file "#{build_dir}/ruby.exe" => ["#{build_dir}/Makefile"] do |t|
+ sh "#{MAKE} miniruby", chdir: File.dirname(t.prerequisites.first)
sh MAKE, chdir: File.dirname(t.prerequisites.first)
end
|
It looks like that patch does fix the build; and the need for it seems to come from ruby/ruby@50d81bf @kateinoigakukun When building cross-rubies in this project, Here's a dockerfile that reproduces the issue with the 3.2.0-rc1 tarball: FROM larskanis/rake-compiler-dock-mri-x86_64-darwin:1.2.2
RUN wget https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.0-rc1.tar.gz
RUN tar -zxf ruby-3.2.0-rc1.tar.gz
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update && \
apt-get install -y curl git-core xz-utils build-essential zlib1g-dev libreadline-dev libssl-dev wget unzip sudo gnupg2 dirmngr cmake pkg-config autoconf libyaml-dev
ENV CC x86_64-apple-darwin-clang
RUN bash -c " \
rvm use 3.1.0 && \
cd ruby-3.2.0-rc1 && \
./configure \
--host=x86_64-apple-darwin \
--target=x86_64-apple-darwin \
--build=x86_64-pc-linux-gnu \
--disable-jit-support \
"
RUN bash -c " \
rvm use 3.1.0 && \
cd ruby-3.2.0-rc1 && \
make V=1 \
" but replacing the last command with this succeeds: RUN bash -c " \
rvm use 3.1.0 && \
cd ruby-3.2.0-rc1 && \
make miniruby V=1 && \
make V=1 \
" |
I've opened an issue at https://bugs.ruby-lang.org/issues/19239 |
And I've suggested a fix at ruby/ruby#6944 |
See https://bugs.ruby-lang.org/issues/19239 for the upstream bug report. This patch can be removed if that's fixed in a 3.2.0 final release.
849b347
to
d32cea7
Compare
It's not clear if that fix is going to be accepted upstream, so I'm going to leave the patch in this PR for now and merge it once it goes green again. We can remove it later if it becomes unnecessary. |
This is a naive attempt (based on #81) to add Ruby 3.2.0 support using the recent rc1.
I've built the x86_64-linux image on my dev machine, and used it to build Nokogiri libraries that support 3.2 and pass all the tests.
The changes I made to Nokogiri are:
I'm not sure why
libpthread.so.0
shows up as a shared object dependency, when it hasn't been one since 2.5. @larskanis any ideas on that? It seems OK, the tests pass.