m0wfo / cups

Ruby bridge to CUPS API
http://cups.rubyforge.org/
59 stars 58 forks source link

Failed installing gem on Ubuntu 20.04 #27

Closed sasa-friedrich-bitlab closed 3 years ago

sasa-friedrich-bitlab commented 4 years ago

Hi!

I'm having trouble to install this gem on my new Ubuntu 20.04

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/user/web/print_app/shared/vendor/bundle/ruby/2.3.0/bundler/gems/cups-86c36de1a8b2/ext
/home/user/.rvm/rubies/ruby-2.3.4/bin/ruby -I /home/user/.rvm/rubies/ruby-2.3.4/lib/ruby/site_ruby/2.3.0 -r ./siteconf20200630-91924-1j2fmuc.rb extconf.rb
checking for main() in -lcups... yes
checking for cups-config... yes
cups version:
2.3.1
creating Makefile

current directory: /home/user/web/print_app/shared/vendor/bundle/ruby/2.3.0/bundler/gems/cups-86c36de1a8b2/ext
make "DESTDIR=" clean

current directory: /home/user/web/print_app/shared/vendor/bundle/ruby/2.3.0/bundler/gems/cups-86c36de1a8b2/ext
make "DESTDIR="
compiling cups.c
In file included from ./ruby_cups.h:8,
                 from cups.c:1:
/home/user/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/backward/st.h:2:2: warning: #warning use "ruby/st.h" instead of bare "st.h" [-Wcpp]
    2 | #warning use "ruby/st.h" instead of bare "st.h"
      |  ^~~~~~~
In file included from /home/user/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/ruby.h:1988,
                 from /home/user/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby.h:33,
                 from ./ruby_cups.h:7,
                 from cups.c:1:
cups.c: In function ‘cups_get_device_uri’:
cups.c:470:31: error: dereferencing pointer to incomplete type ‘ipp_attribute_t’ {aka ‘struct _ipp_attribute_s’}
  470 |        return rb_str_new2(attr->values[0].string.text);
      |                               ^~
/home/user/.rvm/rubies/ruby-2.3.4/include/ruby-2.3.0/ruby/intern.h:806:27: note: in definition of macro ‘rb_str_new_cstr’
  806 |     (__builtin_constant_p(str)) ?  \
      |                           ^~~
cups.c:470:15: note: in expansion of macro ‘rb_str_new2’
  470 |        return rb_str_new2(attr->values[0].string.text);
      |               ^~~~~~~~~~~
make: *** [Makefile:239: cups.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/user/web/print_app/releases/20200630095552/vendor/bundle/ruby/2.3.0/bundler/gems/cups-86c36de1a8b2 for inspection.
Results logged to /home/user/web/print_app/releases/20200630095552/vendor/bundle/ruby/2.3.0/bundler/gems/extensions/x86_64-linux/2.3.0/cups-86c36de1a8b2/gem_make.out

An error occurred while installing cups (0.1.10), and Bundler cannot continue.

Any clue?

Thank you for help!

firien commented 4 years ago

any reason you haven't submitted a PR for your fix_include_ipp_private_structures branch?

sasa-friedrich-bitlab commented 3 years ago

any reason you haven't submitted a PR for your fix_include_ipp_private_structures branch?

Sorry, forgot to do that. I haven't checked GitHub to response to your message too :-( I just used my branch in Gemfile for my project.

...PR created.

sigfrid commented 3 years ago

Hi there, When can we expect version 0.1.11 to be released?

Thanks.