ovirt-engine-sdk
ovirt-engine-sdk copied to clipboard
Error installing the gem on Ubuntu latest
I have been trying to setup CI on Github using "Actions" and unable to get through installing the gem ovirt-engine-sdk -v '4.2.4'
. I have got the necessary packages installed already.
here's the yml file looks like
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the develop branch
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "tests"
tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13.5
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ''
POSTGRES_DB: postgres
RAILS_ENV: test
ports:
- 5432:5432
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Code
uses: actions/checkout@v1
- name: Install Supporting Packages
run: sudo apt-get -y install build-essential libcurl4-openssl-dev pkg-config
- name: Setup Ruby
uses: ruby/setup-ruby@v1
# This action provides a way to automatically run bundle install and cache the result
with:
bundler-cache: true
# Setup test database
- name: Setup Database
run: bundle exec rails db:create db:schema:load
- name: Run Tests
run: bundle exec rspec
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ''
POSTGRES_DB: postgres
RAILS_ENV: test
this is the error I get
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/home/runner/work/my-project/my-project/vendor/bundle/ruby/2.5.0/gems/ovirt-engine-sdk-4.2.4/ext/ovirtsdk4c
/opt/hostedtoolcache/Ruby/2.5.0/x64/bin/ruby -r
./siteconf20211201-2430-hwi0sx.rb extconf.rb
checking for xml2-config... yes
checking for curl-config... yes
creating Makefile
current directory:
/home/runner/work/my-project/my-project/vendor/bundle/ruby/2.5.0/gems/ovirt-engine-sdk-4.2.4/ext/ovirtsdk4c
make "DESTDIR=" clean
current directory:
/home/runner/work/my-project/my-project/vendor/bundle/ruby/2.5.0/gems/ovirt-engine-sdk-4.2.4/ext/ovirtsdk4c
make "DESTDIR="
compiling ov_error.c
compiling ov_http_client.c
ov_http_client.c: In function ‘ov_http_client_header_task’:
ov_http_client.c:392:33: warning: comparison of integer expressions of different
signedness: ‘long int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
392 | while (pointer - buffer < length && isspace(*pointer)) {
| ^
ov_http_client.c: In function ‘ov_http_client_send’:
ov_http_client.c:1092:34: warning: comparison of integer expressions of
different signedness: ‘long unsigned int’ and ‘int’ [-Wsign-compare]
1092 | if (RHASH_SIZE(ptr->pending) < ptr->limit) {
| ^
ov_http_client.c: In function ‘ov_http_client_wait’:
ov_http_client.c:1118:71: warning: comparison of integer expressions of
different signedness: ‘long unsigned int’ and ‘int’ [-Wsign-compare]
1118 | while (RARRAY_LEN(ptr->queue) > 0 && RHASH_SIZE(ptr->pending) <
ptr->limit) {
| ^
ov_http_client.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
compiling ov_http_request.c
compiling ov_http_response.c
compiling ov_http_transfer.c
compiling ov_module.c
compiling ov_string.c
compiling ov_xml_reader.c
compiling ov_xml_writer.c
ov_xml_writer.c: In function ‘ov_xml_writer_string’:
ov_xml_writer.c:184:12: warning: initialization of ‘long unsigned int’ from
‘void *’ makes integer from pointer without a cast [-Wint-conversion]
184 | return rb_funcall(ptr->io, STRING_ID, 0, NULL);
| ^~~~~~~~~~
ov_xml_writer.c:184:12: note: (near initialization for ‘rb_funcall_args[0]’)
In file included from
/opt/hostedtoolcache/Ruby/2.5.0/x64/include/ruby-2.5.0/ruby.h:33,
from ov_xml_writer.c:17:
/opt/hostedtoolcache/Ruby/2.5.0/x64/include/ruby-2.5.0/ruby/ruby.h:1775:3:
error: call to ‘rb_varargs_bad_length’ declared with attribute error: argument
length doesn't match
1775 | rb_varargs_bad_length(argc, vargc)), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/hostedtoolcache/Ruby/2.5.0/x64/include/ruby-2.5.0/ruby/ruby.h:2470:6: note:
in expansion of macro ‘rb_varargs_argc_check’
2470 | rb_varargs_argc_check(rb_funcall_argc, rb_funcall_nargs), \
| ^~~~~~~~~~~~~~~~~~~~~
ov_xml_writer.c:184:12: note: in expansion of macro ‘rb_funcall’
184 | return rb_funcall(ptr->io, STRING_ID, 0, NULL);
| ^~~~~~~~~~
ov_xml_writer.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
make: *** [Makefile:242: ov_xml_writer.o] Error 1
make failed, exit code 2
An error occurred while installing ovirt-engine-sdk (4.2.4), and Bundler cannot
continue.
Make sure that `gem install ovirt-engine-sdk -v '4.2.4' --source
'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
fog was resolved to 2.0.0, which depends on
fog-ovirt was resolved to 1.0.3, which depends on
ovirt-engine-sdk