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

Building ruby container in GitLab is failing #510

Closed
phracek opened this issue Dec 5, 2023 · 1 comment
Closed

Building ruby container in GitLab is failing #510

phracek opened this issue Dec 5, 2023 · 1 comment

Comments

@phracek
Copy link
Member

phracek commented Dec 5, 2023

Container platform

Podman/Docker

Version

No response

OS version of the container image

RHEL 8, RHEL 9

Bugzilla, Jira

No response

Description

During the building container in GitLab CI we get this error:

Installing activemodel 6.1.7.6
Fetching activerecord 6.1.7.6
Installing activerecord 6.1.7.6
Fetching sinatra-activerecord 2.0.22
Installing sinatra-activerecord 2.0.22
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/opt/app-root/src/bundle/ruby/3.0.0/gems/mysql2-0.5.3/ext/mysql2
/usr/bin/ruby -I /usr/share/rubygems -r ./siteconf20231205-6-q77tbr.rb
extconf.rb
checking for rb_absint_size()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib64
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/usr/bin/$(RUBY_BASE_NAME)
/usr/share/ruby/mkmf.rb:471:in `try_do': The compiler failed to generate an
executable file. (RuntimeError)
You have to install development tools first.
	from /usr/share/ruby/mkmf.rb:564:in `try_link0'
	from /usr/share/ruby/mkmf.rb:582:in `try_link'
	from /usr/share/ruby/mkmf.rb:794:in `try_func'
	from /usr/share/ruby/mkmf.rb:1083:in `block in have_func'
	from /usr/share/ruby/mkmf.rb:971:in `block in checking_for'
	from /usr/share/ruby/mkmf.rb:361:in `block (2 levels) in postpone'
	from /usr/share/ruby/mkmf.rb:331:in `open'
	from /usr/share/ruby/mkmf.rb:361:in `block in postpone'
	from /usr/share/ruby/mkmf.rb:331:in `open'
	from /usr/share/ruby/mkmf.rb:357:in `postpone'
	from /usr/share/ruby/mkmf.rb:970:in `checking_for'
	from /usr/share/ruby/mkmf.rb:1082:in `have_func'
	from extconf.rb:25:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can
be found here:

/opt/app-root/src/bundle/ruby/3.0.0/extensions/x86_64-linux/3.0.0/mysql2-0.5.3/mkmf.log

extconf failed, exit code 1

The log is here: http://artifacts.osci.redhat.com/testing-farm/81f1cc41-2f10-44dd-bd4e-2dabd6adb039/

Reproducer

No response

@phracek
Copy link
Member Author

phracek commented Jul 15, 2024

This is working properly in GitLab like here: https://gitlab.com/redhat/rhel/containers/ruby-33/-/merge_requests/8. Closing this issue.

@phracek phracek closed this as completed Jul 15, 2024
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

No branches or pull requests

1 participant