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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悶 Bug version.rb cannot find ruby_libversion #9941

Open
uberhacker opened this issue Jun 10, 2024 · 6 comments 路 Fixed by #9983 路 May be fixed by #9707
Open

馃悶 Bug version.rb cannot find ruby_libversion #9941

uberhacker opened this issue Jun 10, 2024 · 6 comments 路 Fixed by #9983 路 May be fixed by #9707
Assignees

Comments

@uberhacker
Copy link
Collaborator

uberhacker commented Jun 10, 2024

$ ./version.rb 
<internal:/usr/local/lib64/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require': cannot load such file -- ruby_libversion (LoadError)
Did you mean?  rubygems/version
	from <internal:/usr/local/lib64/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
	from ./version.rb:12:in `<main>'

Related?

$ gem install ruby-libversion
Building native extensions. This could take a while...
ERROR:  Error installing ruby-libversion:
	ERROR: Failed to build gem native extension.

    current directory: /usr/local/lib64/ruby/gems/3.3.0/gems/ruby-libversion-1.0.0/ext/libversion
/usr/local/bin/ruby extconf.rb
checking for pkg-config for libversion... not found
creating Makefile

current directory: /usr/local/lib64/ruby/gems/3.3.0/gems/ruby-libversion-1.0.0/ext/libversion
make DESTDIR\= sitearchdir\=./.gem.20240610-858-dp0xke sitelibdir\=./.gem.20240610-858-dp0xke clean

current directory: /usr/local/lib64/ruby/gems/3.3.0/gems/ruby-libversion-1.0.0/ext/libversion
make DESTDIR\= sitearchdir\=./.gem.20240610-858-dp0xke sitelibdir\=./.gem.20240610-858-dp0xke
compiling libversion.c
libversion.c:2:10: fatal error: libversion/version.h: No such file or directory
    2 | #include "libversion/version.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:248: libversion.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/lib64/ruby/gems/3.3.0/gems/ruby-libversion-1.0.0 for inspection.
Results logged to /usr/local/lib64/ruby/gems/3.3.0/extensions/x86_64-linux-gnu/3.3.0/ruby-libversion-1.0.0/gem_make.out
@satmandu
Copy link
Member

Where is libversion/version.h ?

@Zopolis4
Copy link
Collaborator

Oh, it needs https://github.com/repology/libversion. Forgot to package that.

@Zopolis4
Copy link
Collaborator

Zopolis4 commented Jun 12, 2024

(In the middle of fixing my build workflow, will get around to it asap)

@uberhacker
Copy link
Collaborator Author

This is still an issue with the latest crew updates.

$ crew check -V mesa
<internal:/usr/local/lib64/ruby/site_ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require': cannot load such file -- ruby_libversion (LoadError)
Did you mean?  rubygems/version
	from <internal:/usr/local/lib64/ruby/site_ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
	from ../tools/version.rb:12:in `<main>'

@uberhacker uberhacker reopened this Jun 19, 2024
@uberhacker
Copy link
Collaborator Author

FWIW, the ruby gem works.

$ gem install ruby-libversion
Fetching ruby-libversion-1.0.0.gem
Building native extensions. This could take a while...
Successfully installed ruby-libversion-1.0.0
1 gem installed
$ crew check -V mesa
Package                            Status              Current             Upstream
-------                            ------              -------             --------
mesa                               outdated            24.1.1-llvm18       24.1.1

@uberhacker uberhacker reopened this Jun 19, 2024
@Zopolis4 Zopolis4 linked a pull request Jun 19, 2024 that will close this issue
@Zopolis4
Copy link
Collaborator

Zopolis4 commented Jun 24, 2024

I'm not sure what the issue is here-- version.rb depends on ruby-libversion, which depends on libversion.

Chromebrew provides libversion, and rubygems provides ruby-libversion.

crew install libversion && sudo gem install ruby-libversion will install the dependencies.

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