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

Error when building native extensions - Ubuntu 22.04 #998

Open
studeba opened this issue Oct 25, 2023 · 3 comments
Open

Error when building native extensions - Ubuntu 22.04 #998

studeba opened this issue Oct 25, 2023 · 3 comments

Comments

@studeba
Copy link

studeba commented Oct 25, 2023

What went wrong?

**Received a build error when running gem install backup -v 4.4.1 --verbose **

user@domain:/home/app# gem install backup -v 4.4.1 --verbose
HEAD https://api.rubygems.org/api/v1/dependencies
404 Not Found
GET https://api.rubygems.org/prerelease_specs.4.8.gz
304 Not Modified
GET https://api.rubygems.org/specs.4.8.gz
304 Not Modified
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/.document
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/.gitignore
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/Gemfile
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/LICENSE.txt
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/README.md
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/Rakefile
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/ext/unf_ext/extconf.rb
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/ext/unf_ext/unf.cc
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/ext/unf_ext/unf/normalizer.hh
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/ext/unf_ext/unf/table.hh
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/ext/unf_ext/unf/trie/char_stream.hh
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/ext/unf_ext/unf/trie/node.hh
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/ext/unf_ext/unf/trie/searcher.hh
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/ext/unf_ext/unf/util.hh
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/lib/unf_ext.rb
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/lib/unf_ext/version.rb
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/test/helper.rb
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/test/normalization-test.txt
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/test/test_unf_ext.rb
/root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/unf_ext.gemspec
Building native extensions. This could take a while...
current directory: /root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/ext/unf_ext
/root/.rbenv/versions/2.3.8/bin/ruby -r ./siteconf20231025-192972-3ckc46.rb extconf.rb
checking for main() in -lstdc++... yes
checking for ruby/encoding.h... yes
creating Makefile
current directory: /root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/ext/unf_ext
make "DESTDIR=" clean
current directory: /root/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.6/ext/unf_ext
make "DESTDIR="
compiling unf.cc
cc1plus: warning: command-line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++
In file included from /root/.rbenv/versions/2.3.8/include/ruby-2.3.0/ruby/ruby.h:1988,
from /root/.rbenv/versions/2.3.8/include/ruby-2.3.0/ruby.h:33,
from unf.cc:3:
/root/.rbenv/versions/2.3.8/include/ruby-2.3.0/ruby/intern.h:47:33: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
47 | void rb_mem_clear(register VALUE*, register long);
| ^
/root/.rbenv/versions/2.3.8/include/ruby-2.3.0/ruby/intern.h:47:45: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
47 | void rb_mem_clear(register VALUE*, register long);
| ^~~~
Killed
user@domain:/home/app# linking shared-object unf_ext.so

What steps did you follow?

  1. user@domain /home/app# gem install backup -v 4.4.1 --verbose

How is your copy of backup configured?

N/A

Tell us about the computer that runs the backup gem

Change the information below to match the details of your computer

  • Operating system: Ubuntu Server 22.04
  • Ruby version: 2.3.8
@tomash
Copy link
Contributor

tomash commented Oct 26, 2023

Ruby version: 2.3.8

The latest version of Ruby with which current upstream version of the gem (which is more-or-less 5.0-beta) is installing and running without any issues is 2.4.10, and this only after a small fix in my feature branch: #999
Backup versions 4.x support Ruby 2.3 at most, maybe you can run them with Ruby 2.4.
I suggest you install an older Ruby with ASDF and/or run backup inside Docker.

And yes, those are oooold Ruby versions now 😢

@tomash
Copy link
Contributor

tomash commented Oct 26, 2023

You can run backup with ruby up to 3.1.4 on the feature branch: #1000
3.2 support and beyond will need a new version of ovirt-engine-sdk-ruby gem: #996

@elthariel
Copy link
Contributor

The Killed entry at the end of the log seems to indicate that the build failed for another external and unrelated reasons.

It seems to me there are only warnings

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

3 participants