Skip to content
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

Fix x86-linux Dockerfile #502

Merged
merged 1 commit into from
Jan 29, 2025
Merged

Fix x86-linux Dockerfile #502

merged 1 commit into from
Jan 29, 2025

Conversation

stanhu
Copy link
Contributor

@stanhu stanhu commented Jan 28, 2025

ghcr.io/rake-compiler/rake-compiler-dock-image:1.9.1-mri-x86-linux is now based on an Ubuntu 20.04 image, so we can avoid the CentOS-changes and do what we do with the x86_64-linux Dockerfile.

@stanhu stanhu force-pushed the sh-fix-x86-linux branch 4 times, most recently from dda23e9 to 907cef1 Compare January 28, 2025 23:52
ghcr.io/rake-compiler/rake-compiler-dock-image:1.9.1-mri-x86-linux is
now based on an Ubuntu 20.04 image, so we can avoid the CentOS-changes
and do what we do with the x86_64-linux Dockerfile.
@stanhu
Copy link
Contributor Author

stanhu commented Jan 29, 2025

oxi-test builds now, but I see:

cp rb-sys/crates/rb-sys/Cargo.toml tmp/x86-linux/stage/rb-sys/crates/rb-sys/Cargo.toml
mkdir -p tmp/x86-linux/stage/rb-sys/examples/rust_reverse/ext/rust_reverse
cp rb-sys/examples/rust_reverse/ext/rust_reverse/Cargo.toml tmp/x86-linux/stage/rb-sys/examples/rust_reverse/ext/rust_reverse/Cargo.toml
mkdir -p tmp/x86-linux/stage/rb-sys/fuzz
cp rb-sys/fuzz/Cargo.lock tmp/x86-linux/stage/rb-sys/fuzz/Cargo.lock
cp rb-sys/fuzz/Cargo.toml tmp/x86-linux/stage/rb-sys/fuzz/Cargo.toml
cp tmp/x86-linux/oxi-test/3.4.1/oxi_test.so tmp/x86-linux/stage/lib/oxi/test/oxi_test.so
Removing unneeded dependencies from native gemspec
Removing source files from native gemspec
mkdir -p pkg
mkdir -p pkg/oxi-test-0.1.0-x86-linux
mkdir -p pkg
rm -f pkg/oxi-test-0.1.0-x86-linux/LICENSE.txt
ln tmp/x86-linux/stage/LICENSE.txt pkg/oxi-test-0.1.0-x86-linux/LICENSE.txt
rm -f pkg/oxi-test-0.1.0-x86-linux/README.md
ln tmp/x86-linux/stage/README.md pkg/oxi-test-0.1.0-x86-linux/README.md
mkdir -p pkg/oxi-test-0.1.0-x86-linux/lib/oxi
rm -f pkg/oxi-test-0.1.0-x86-linux/lib/oxi/test.rb
ln tmp/x86-linux/stage/lib/oxi/test.rb pkg/oxi-test-0.1.0-x86-linux/lib/oxi/test.rb
mkdir -p pkg/oxi-test-0.1.0-x86-linux/lib/oxi/test
rm -f pkg/oxi-test-0.1.0-x86-linux/lib/oxi/test/oxi_test.so
ln tmp/x86-linux/stage/lib/oxi/test/oxi_test.so pkg/oxi-test-0.1.0-x86-linux/lib/oxi/test/oxi_test.so
rm -f pkg/oxi-test-0.1.0-x86-linux/lib/oxi/test/version.rb
ln tmp/x86-linux/stage/lib/oxi/test/version.rb pkg/oxi-test-0.1.0-x86-linux/lib/oxi/test/version.rb
cd tmp/x86_64-linux/oxi-test/3.4.1
/usr/local/rbenv/versions/3.4.1/bin/ruby -I. ../../../../ext/extconf.rb
/usr/local/rbenv/versions/3.4.1/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require': cannot load such file -- /usr/local/rake-compiler/ruby/x86_64-linux-gnu/ruby-3.4.1/lib/ruby/3.4.0/x86_64-linux-gnu/rbconfig.rb (LoadError)
	from /usr/local/rbenv/versions/3.4.1/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
	from /home/stanhu/github/rb-sys/oxi-test/tmp/x86_64-linux/oxi-test/3.4.1/fake.rb:30:in '<top (required)>'
	from /usr/local/rbenv/versions/3.4.1/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
	from /usr/local/rbenv/versions/3.4.1/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
	from /home/stanhu/github/rb-sys/oxi-test/tmp/x86_64-linux/oxi-test/3.4.1/mkmf.rb:6:in '<top (required)>'
	from /usr/local/rbenv/versions/3.4.1/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
	from /usr/local/rbenv/versions/3.4.1/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
	from ../../../../ext/extconf.rb:3:in '<main>'

Note Ruby seems to be using x86_64, but i686-linux-gnu is acutally installed:

root@6511ee85e30e:/# ls /usr/local/rake-compiler/ruby/i686-linux-gnu/
ruby-2.4.10  ruby-2.5.9  ruby-2.6.10  ruby-2.7.8  ruby-3.0.7  ruby-3.1.6  ruby-3.2.6  ruby-3.3.7  ruby-3.4.1

Copy link
Collaborator

@ianks ianks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me, let’s see what CI says

@ianks ianks merged commit 6f60a77 into oxidize-rb:main Jan 29, 2025
56 checks passed
@ianks
Copy link
Collaborator

ianks commented Jan 29, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants