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 rugged dependency #2050

Merged
merged 1 commit into from
Mar 21, 2020
Merged

Fix rugged dependency #2050

merged 1 commit into from
Mar 21, 2020

Conversation

treydock
Copy link
Contributor

Pre-Request Checklist

  • Passes rubocop code analysis (try rubocop --auto-correct)
  • Tests added or adapted (try rake test)
  • Changes are reflected in the documentation
  • User-visible changes appended to CHANGELOG.md

Description

The rugged gem now has 0.99.0 that requires a much newer cmake than is available on RHEL7:

[root@centos-7 /]# scl enable rh-ruby23 -- gem install --no-document oxidized
Building native extensions.  This could take a while...
ERROR:  Error installing oxidized:
	ERROR: Failed to build gem native extension.

    current directory: /opt/rh/rh-ruby23/root/usr/local/share/gems/gems/rugged-0.99.0/ext/rugged
/opt/rh/rh-ruby23/root/usr/bin/ruby -r ./siteconf20200312-1719-1x0mvem.rb extconf.rb
checking for gmake... yes
checking for cmake... yes
checking for pkg-config... yes
-- The C compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
CMake Error at CMakeLists.txt:15 (CMAKE_MINIMUM_REQUIRED):
  CMake 3.5.1 or higher is required.  You are running version 2.8.12.2


-- Configuring incomplete, errors occurred!
See also "/opt/rh/rh-ruby23/root/usr/local/share/gems/gems/rugged-0.99.0/vendor/libgit2/build/CMakeFiles/CMakeOutput.log".
 -- /usr/bin/gmake
*** 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=/opt/rh/rh-ruby23/root/usr/bin/$(RUBY_BASE_NAME)
	--with-sha1dc
	--without-sha1dc
	--use-system-libraries
extconf.rb:23:in `sys': ERROR: '/usr/bin/gmake' failed (RuntimeError)
	from extconf.rb:107:in `block (2 levels) in <main>'
	from extconf.rb:103:in `chdir'
	from extconf.rb:103:in `block in <main>'
	from extconf.rb:100:in `chdir'
	from extconf.rb:100:in `<main>'

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

  /opt/rh/rh-ruby23/root/usr/local/lib64/gems/ruby/rugged-0.99.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /opt/rh/rh-ruby23/root/usr/local/share/gems/gems/rugged-0.99.0 for inspection.
Results logged to /opt/rh/rh-ruby23/root/usr/local/lib64/gems/ruby/rugged-0.99.0/gem_make.out

@wk
Copy link
Contributor

wk commented Mar 15, 2020

There is no explicit backwards compatibility goal at this stage (seeing that RHEL8 is out), but since the intention was to match 0.28 and no features of newer versions are currently in use - this seems mostly harmless. Could you add a line to CHANGELOG.md mentioning this change (and reasoning) as part of this PR?

On a side note, since the required ruby comes from SCL already, is there a compelling reason not to also pull a newer CMake from SCL as well during install instead of locking down to an older version of rugged?

@treydock
Copy link
Contributor Author

I updated CHANGELOG.

I only observed the newer cmake via SCL for RHEL7 via llvm-toolset-7-cmake package which is really odd way to go about getting newer cmake. Looks like cmake3 is available from EPEL, just not sure how to make a rubygem use a cmake3 binary instead of cmake. I use puppet for automation of oxidized (https://github.com/treydock/puppet-module-oxidized) and figured easier to fix rugged dependency than mess with other ways to get newer cmake.

@wk wk merged commit 17cdbc8 into ytti:master Mar 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants