Open ankane opened 1 year ago
Thanks for the report. Seems like it is compiling for 3.2.0 and 3.1.3 in the action which is wrong. Not sure if this is an issue with RCD or not though.
Shelling into the container with rb-sys-dock
:
$ rb-sys-dock --platform aarch64-linux
I noticed that it's only building the 3.2 extension, which is expected:
aarch64-linux ➜ oxi-test $ export RUBY_CC_VERSION=3.2.0
aarch64-linux ➜ oxi-test $ rake native:aarch64-linux
aarch64-linux ➜ oxi-test $ ls tmp/aarch64-linux/ext/
3.2.0
However, running rake native:aarch64-linux gem
the bug appears. It seems like it's trying compile the 3.1 version for some reason. Not sure why yet....
** Invoke gem (first_time)
** Invoke pkg/oxi-test-0.1.0-aarch64-linux.gem (first_time)
** Invoke pkg (first_time, not_needed)
** Invoke pkg/oxi-test-0.1.0-aarch64-linux (first_time)
rake aborted!
Don't know how to build task 'tmp/aarch64-linux/stage/lib/oxi/test/3.1'
This does seem to be a rake-compiler bug, but I'm not entirely sure. I wonder if this can be recreated with a default C extension....
Thanks, will see if I can reproduce with C. Guessing it may have to do with this logic.
👋 Sorry for lurking, but I think this is a problem with RCD.
I can't remember what the original problem I faced was, exactly, but I observed an issue where building a gem on one version of Ruby would not build on multiple platforms. I wrote a hack to workaround the exact line(s) mentioned: https://github.com/gjtorikian/commonmarker/blob/b0f5c0335746d12526bbe7794419602bfbf8d6c5/rakelib/extension.rake#L5-L31
(At this point, Commonmarker supports multiple 3.x verisons, so the hack was removed.)
Hi, I'm running into an odd issue when only one Ruby version is specified where the extension compiles twice. I'm able to reproduce with
oxi-test
.Workflow - https://github.com/ankane/oxi-test/commit/9f48d1a0cff90f0a8664e59965c7441b8f0c26a3
CI output - https://github.com/ankane/oxi-test/actions/runs/3920839152/jobs/6702689640
With Tokenizers Ruby, this is also causes a crash in the generated gem, which doesn't happen when 2+ versions are specified.
This probably isn't an issue for most production workflows (which will likely specify multiple versions), but it:
Edit: Sorry, meant to post in
cross-gem-action
if you want to transfer this there.