backup/backup

Ruby 3.2.2 not working

Opened this issue · 3 comments

What went wrong?

not compiling

What steps did you follow?

craeate a dockerfile with ruby-3.2.2-buster as baseimage

 > [ 5/29] RUN gem install backup -f -v '~> 5.0.0.beta.3':
39.80 Building native extensions. This could take a while...
49.22 Successfully installed unf_ext-0.0.8.2
49.22 Successfully installed unf-0.1.3
49.22 Successfully installed simple_oauth-0.3.1
49.22 Successfully installed naught-1.1.0
49.22 Successfully installed multipart-post-2.3.0
49.22 Successfully installed thread_safe-0.3.6
49.22 Successfully installed memoizable-0.4.2
49.22 Building native extensions. This could take a while...
61.97 Successfully installed http_parser.rb-0.6.0
61.97 Successfully installed http-form_data-2.3.0
61.97 Successfully installed domain_name-0.5.20190701
61.97 Successfully installed http-cookie-1.0.5
61.97 Successfully installed public_suffix-5.0.3
61.97 Successfully installed addressable-2.8.5
61.97 Successfully installed http-3.3.0
61.97 Successfully installed equalizer-0.0.11
61.97 Successfully installed buftok-0.2.0
61.97 Successfully installed twitter-6.2.0
61.97 Successfully installed thor-0.20.3
61.97 Successfully installed netrc-0.11.0
61.97 Successfully installed mime-types-data-3.2023.0808
61.97 Successfully installed mime-types-3.5.1
61.97 Successfully installed http-accept-1.7.0
61.97 Successfully installed rest-client-2.1.0
61.97 Successfully installed qiniu-6.9.1
61.97 If upgrading to pagerduty 2.0.0 please note the API changes:
61.97 https://github.com/envato/pagerduty#upgrading-to-version-200
61.97 Successfully installed pagerduty-2.0.0
61.97 Successfully installed open4-1.3.0
61.97 Successfully installed nokogiri-1.15.4-x86_64-linux
61.97 Successfully installed net-ssh-5.2.0
61.97 Successfully installed net-sftp-2.1.2
61.97 Successfully installed net-scp-2.0.0
61.97 Successfully installed mini_mime-1.1.5
61.97 Successfully installed mail-2.8.1
61.97 Successfully installed multi_xml-0.6.0
61.97 When you HTTParty, you must party hard!
61.97 Successfully installed httparty-0.21.0
61.97 Successfully installed hipchat-1.0.1
61.97 Successfully installed ipaddress-0.8.3
61.97 Successfully installed formatador-0.3.0
61.97 Successfully installed excon-0.102.0
61.97 Successfully installed builder-3.2.4
61.97 Successfully installed fog-core-1.45.0
61.97 Successfully installed fog-xml-0.1.4
61.97 Successfully installed webrick-1.8.1
61.97 Successfully installed xmlrpc-0.3.3
61.97 Successfully installed fog-xenserver-1.0.0
61.97 Successfully installed optimist-3.1.0
61.97 Successfully installed rbvmomi2-3.6.1
61.97 Successfully installed fog-vsphere-3.6.2
61.97 Successfully installed fog-voxel-0.1.0
61.97 Successfully installed CFPropertyList-2.3.6
61.97 Successfully installed fission-0.5.0
61.97 Successfully installed fog-vmfusion-0.1.0
61.97 Successfully installed fog-terremark-0.1.0
61.97 Successfully installed multi_json-1.15.0
61.97 Successfully installed fog-json-1.2.0
61.97 Successfully installed fog-storm_on_demand-0.1.1
61.97 Successfully installed fog-softlayer-1.1.4
61.97 Successfully installed fog-serverlove-0.1.2
61.97 Successfully installed fog-sakuracloud-1.7.5
61.97 Successfully installed fog-riakcs-0.1.0
61.97 Successfully installed fog-radosgw-0.0.5
61.97 Successfully installed fog-rackspace-0.1.6
61.97 Successfully installed fog-profitbricks-4.1.1
61.97 Successfully installed fog-powerdns-0.2.0
61.97 Building native extensions. This could take a while...
68.36 ERROR:  Error installing backup:
68.36   ERROR: Failed to build gem native extension.
68.36
68.36     current directory: /usr/local/bundle/gems/ovirt-engine-sdk-4.4.1/ext/ovirtsdk4c
68.36 /usr/local/bin/ruby extconf.rb
68.36 checking for xml2-config... yes
68.36 checking for curl-config... yes
68.36 creating Makefile
68.36
68.36 current directory: /usr/local/bundle/gems/ovirt-engine-sdk-4.4.1/ext/ovirtsdk4c
68.36 make DESTDIR\= sitearchdir\=./.gem.20230911-8-kaqp6x sitelibdir\=./.gem.20230911-8-kaqp6x clean
68.36
68.36 current directory: /usr/local/bundle/gems/ovirt-engine-sdk-4.4.1/ext/ovirtsdk4c
68.36 make DESTDIR\= sitearchdir\=./.gem.20230911-8-kaqp6x sitelibdir\=./.gem.20230911-8-kaqp6x
68.36 compiling ov_error.c
68.36 compiling ov_http_client.c
68.36 ov_http_client.c: In function ‘ov_http_client_log_info’:
68.36 ov_http_client.c:147:13: warning: function ‘ov_http_client_log_info’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
68.36              message = rb_vsprintf(format, args);
68.36              ^~~~~~~
68.36 ov_http_client.c: In function ‘ov_http_client_log_warn’:
68.36 ov_http_client.c:163:13: warning: function ‘ov_http_client_log_warn’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
68.36              message = rb_vsprintf(format, args);
68.36              ^~~~~~~
68.36 ov_http_client.c: At top level:
68.36 ov_http_client.c:216:29: warning: excess elements in array initializer
68.36          .reserved = { NULL, NULL }
68.36                              ^~~~
68.36 ov_http_client.c:216:29: note: (near initialization for ‘ov_http_client_type.function.reserved’)
68.36 ov_http_client.c: In function ‘ov_http_client_header_task’:
68.36 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]
68.36          while (pointer - buffer < length && isspace(*pointer)) {
68.36                                  ^
68.36 ov_http_client.c: In function ‘ov_http_client_prepare_handle’:
68.36 ov_http_client.c:1001:47: warning: passing argument 2 of ‘rb_hash_foreach’ from incompatible pointer type [-Wincompatible-pointer-types]
68.36          rb_hash_foreach(request_ptr->headers, ov_http_client_add_header, (VALUE) headers);
68.36                                                ^~~~~~~~~~~~~~~~~~~~~~~~~
68.36 In file included from /usr/local/include/ruby-3.2.0/ruby/internal/scan_args.h:37,
68.36                  from /usr/local/include/ruby-3.2.0/ruby/ruby.h:47,
68.36                  from /usr/local/include/ruby-3.2.0/ruby.h:38,
68.36                  from ov_http_client.c:17:
68.36 /usr/local/include/ruby-3.2.0/ruby/internal/intern/hash.h:83:40: note: expected ‘int (*)(VALUE,  VALUE,  VALUE)’ {aka ‘int (*)(long unsigned int,  long unsigned int,  long unsigned int)’} but argument is of type ‘int (*)(VALUE,  VALUE,  struct curl_slist **)’ {aka ‘int (*)(long unsigned int,  long unsigned int,  struct curl_slist **)’}
68.36  void rb_hash_foreach(VALUE hash, int (*func)(VALUE key, VALUE val, VALUE arg), VALUE arg);
68.36                                   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68.36 ov_http_client.c: In function ‘ov_http_client_send’:
68.36 ov_http_client.c:1092:34: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
68.36      if (RHASH_SIZE(ptr->pending) < ptr->limit) {
68.36                                   ^
68.36 ov_http_client.c: In function ‘ov_http_client_wait’:
68.36 ov_http_client.c:1118:71: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
68.36          while (RARRAY_LEN(ptr->queue) > 0 && RHASH_SIZE(ptr->pending) < ptr->limit) {
68.36                                                                        ^
68.36 ov_http_client.c: At top level:
68.36 cc1: warning: unrecognized command line option ‘-Wno-self-assign’
68.36 cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
68.36 cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
68.36 compiling ov_http_request.c
68.36 ov_http_request.c:75:29: warning: excess elements in array initializer
68.36          .reserved = { NULL, NULL }
68.36                              ^~~~
68.36 ov_http_request.c:75:29: note: (near initialization for ‘ov_http_request_type.function.reserved’)
68.36 ov_http_request.c: In function ‘ov_http_request_define’:
68.36 ov_http_request.c:347:77: error: ‘rb_cData’ undeclared (first use in this function); did you mean ‘rb_catch’?
68.36      ov_http_request_class = rb_define_class_under(ov_module, "HttpRequest", rb_cData);
68.36                                                                              ^~~~~~~~
68.36                                                                              rb_catch
68.36 ov_http_request.c:347:77: note: each undeclared identifier is reported only once for each function it appears in
68.36 ov_http_request.c: At top level:
68.36 cc1: warning: unrecognized command line option ‘-Wno-self-assign’
68.36 cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
68.36 cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
68.36 make: *** [Makefile:248: ov_http_request.o] Error 1
68.36
68.36 make failed, exit code 2
68.36
68.36 Gem files will remain installed in /usr/local/bundle/gems/ovirt-engine-sdk-4.4.1 for inspection.
68.36 Results logged to /usr/local/bundle/extensions/x86_64-linux/3.2.0/ovirt-engine-sdk-4.4.1/gem_make.out
------
Dockerfile.base_with_gemset:26
--------------------
  24 |     RUN apt-get update -qq && apt-get install -y vim htop lsb-release ghostscript postgresql-client-12 nfs-common ffmpeg ffmpegthumbnailer libv8-dev && rm -rf /var/lib/apt/lists/*
  25 |
  26 | >>> RUN gem install backup -f -v '~> 5.0.0.beta.3'
  27 |
  28 |     RUN mkdir /mycompany
--------------------
ERROR: failed to solve: process "/bin/sh -c gem install backup -f -v '~> 5.0.0.beta.3'" did not complete successfully: exit code: 1

Fixed it with compiling it like this:

gem install backup -f -v '~> 5.0.0.beta.3' -- --with-cflags=-Drb_cData=rb_cObject

See also oVirt/ovirt-engine-sdk-ruby#4

Follow

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.