Git Product home page Git Product logo

cups's People

Contributors

betogrun avatar bigtunacan avatar butzopower avatar darius-janusauskas avatar davidbernard avatar ecin avatar m0wfo avatar michalorman avatar nathanstitt avatar sasa-friedrich-bitlab avatar tadejm avatar thorsson avatar zzip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cups's Issues

segmentation fault for transient print on forked process

On my Rails application cups works perfectly fine but when I set up resque to create workers, for printing, cups gem crashes with a segmentation fault. Here is the output: http://pastie.org/2387372

All other workers are fine and the printing code works fine all the way up to the point that I call Cups::PrintJob::Transient.new and it immediately segfaults. Any help with this would be highly appreciated.

Failed installing gem on Ubuntu 20.04

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!

Gem not compiling on Ubuntu 13.10 with CUPS 1.7rc1

Installing a gem I'm receiving following output:

$ gem install cups
ERROR:  Error installing cups:
    ERROR: Failed to build gem native extension.

    /home/morman/.rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
checking for main() in -lcups... yes
checking for cups-config... yes
cups version:
1.7rc1
creating Makefile

make
compiling cups.c
In file included from ./ruby_cups.h:9:0,
                 from cups.c:1:
/home/morman/.rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/backward/st.h:2:2: warning: #warning use "ruby/st.h" instead of bare "st.h" [-Wcpp]
 #warning use "ruby/st.h" instead of bare "st.h"
  ^
In file included from /home/morman/.rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/ruby.h:1383:0,
                 from /home/morman/.rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby.h:32,
                 from ./ruby_cups.h:8,
                 from cups.c:1:
cups.c: In function ‘cups_get_device_uri’:
cups.c:469:31: error: dereferencing pointer to incomplete type
        return rb_str_new2(attr->values[0].string.text);
                               ^
/home/morman/.rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:738:27: note: in definition of macro ‘rb_str_new_cstr’
     (__builtin_constant_p(str)) ?  \
                           ^
cups.c:469:15: note: in expansion of macro ‘rb_str_new2’
        return rb_str_new2(attr->values[0].string.text);
               ^
cups.c:469:31: error: dereferencing pointer to incomplete type
        return rb_str_new2(attr->values[0].string.text);
                               ^
/home/morman/.rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:739:14: note: in definition of macro ‘rb_str_new_cstr’
  rb_str_new((str), (long)strlen(str)) : \
              ^
cups.c:469:15: note: in expansion of macro ‘rb_str_new2’
        return rb_str_new2(attr->values[0].string.text);
               ^
cups.c:469:31: error: dereferencing pointer to incomplete type
        return rb_str_new2(attr->values[0].string.text);
                               ^
/home/morman/.rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:739:33: note: in definition of macro ‘rb_str_new_cstr’
  rb_str_new((str), (long)strlen(str)) : \
                                 ^
cups.c:469:15: note: in expansion of macro ‘rb_str_new2’
        return rb_str_new2(attr->values[0].string.text);
               ^
cups.c:469:31: error: dereferencing pointer to incomplete type
        return rb_str_new2(attr->values[0].string.text);
                               ^
/home/morman/.rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:740:18: note: in definition of macro ‘rb_str_new_cstr’
  rb_str_new_cstr(str);   \
                  ^
cups.c:469:15: note: in expansion of macro ‘rb_str_new2’
        return rb_str_new2(attr->values[0].string.text);
               ^
make: *** [cups.o] Error 1


Gem files will remain installed in /home/morman/.gem/ruby/1.9.3/gems/cups-0.1.7 for inspection.
Results logged to /home/morman/.gem/ruby/1.9.3/gems/cups-0.1.7/ext/gem_make.out

Any ideas? Gem is not compatible with CUPS 1.7? Or is it a ruby version 1.9.3-p448 issue?

cups gem 0.1.7 segfault

oot@casis-malacky-term:/var/lib/ruby-gems/casis/gems/1.9.1# gem install cups
Fetching: cups-0.1.7.gem (100%)
Building native extensions. This could take a while...
Successfully installed cups-0.1.7
1 gem installed
Installing ri documentation for cups-0.1.7...
Installing RDoc documentation for cups-0.1.7...
root@casis-malacky-term:/var/lib/ruby-gems/casis/gems/1.9.1# irb
irb(main):001:0> require 'cups'
=> true
irb(main):002:0> job = Cups::PrintJob.new('/etc/hosts').print
(irb):2: [BUG] Segmentation fault
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]

-- Control frame information -----------------------------------------------
c:0024 p:---- s:0086 b:0086 l:000085 d:000085 CFUNC :print
c:0023 p:0025 s:0083 b:0083 l:001bac d:001340 EVAL (irb):2
c:0022 p:---- s:0080 b:0080 l:000079 d:000079 FINISH
c:0021 p:---- s:0078 b:0078 l:000077 d:000077 CFUNC :eval
c:0020 p:0028 s:0071 b:0071 l:000070 d:000070 METHOD /usr/lib/ruby/1.9.1/irb/workspace.rb:80
c:0019 p:0033 s:0064 b:0063 l:000062 d:000062 METHOD /usr/lib/ruby/1.9.1/irb/context.rb:254
c:0018 p:0031 s:0058 b:0058 l:0025e4 d:000057 BLOCK /usr/lib/ruby/1.9.1/irb.rb:159
c:0017 p:0042 s:0050 b:0050 l:000049 d:000049 METHOD /usr/lib/ruby/1.9.1/irb.rb:273
c:0016 p:0011 s:0045 b:0045 l:0025e4 d:000044 BLOCK /usr/lib/ruby/1.9.1/irb.rb:156
c:0015 p:0144 s:0041 b:0041 l:000024 d:000040 BLOCK /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:243
c:0014 p:---- s:0038 b:0038 l:000037 d:000037 FINISH
c:0013 p:---- s:0036 b:0036 l:000035 d:000035 CFUNC :loop
c:0012 p:0009 s:0033 b:0033 l:000024 d:000032 BLOCK /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:229
c:0011 p:---- s:0031 b:0031 l:000030 d:000030 FINISH
c:0010 p:---- s:0029 b:0029 l:000028 d:000028 CFUNC :catch
c:0009 p:0023 s:0025 b:0025 l:000024 d:000024 METHOD /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:228
c:0008 p:0046 s:0022 b:0022 l:0025e4 d:0025e4 METHOD /usr/lib/ruby/1.9.1/irb.rb:155
c:0007 p:0011 s:0019 b:0019 l:000014 d:000018 BLOCK /usr/lib/ruby/1.9.1/irb.rb:70
c:0006 p:---- s:0017 b:0017 l:000016 d:000016 FINISH
c:0005 p:---- s:0015 b:0015 l:000014 d:000014 CFUNC :catch
c:0004 p:0183 s:0011 b:0011 l:000014 d:000014 METHOD /usr/lib/ruby/1.9.1/irb.rb:69
c:0003 p:0039 s:0006 b:0006 l:00096c d:000f2c EVAL /usr/bin/irb:12
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:00096c d:00096c TOP

-- Ruby level backtrace information ----------------------------------------
/usr/bin/irb:12:in <main>' /usr/lib/ruby/1.9.1/irb.rb:69:instart'
/usr/lib/ruby/1.9.1/irb.rb:69:in catch' /usr/lib/ruby/1.9.1/irb.rb:70:inblock in start'
/usr/lib/ruby/1.9.1/irb.rb:155:in eval_input' /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:228:ineach_top_level_statement'
/usr/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in catch' /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:229:inblock in each_top_level_statement'
/usr/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in loop' /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:243:inblock (2 levels) in each_top_level_statement'
/usr/lib/ruby/1.9.1/irb.rb:156:in block in eval_input' /usr/lib/ruby/1.9.1/irb.rb:273:insignal_status'
/usr/lib/ruby/1.9.1/irb.rb:159:in block (2 levels) in eval_input' /usr/lib/ruby/1.9.1/irb/context.rb:254:inevaluate'
/usr/lib/ruby/1.9.1/irb/workspace.rb:80:in evaluate' /usr/lib/ruby/1.9.1/irb/workspace.rb:80:ineval'
(irb):2:in irb_binding' (irb):2:inprint'

-- C level backtrace information -------------------------------------------
/usr/lib/libruby-1.9.1.so.1.9(+0x15e5ed) [0xc065ed]
/usr/lib/libruby-1.9.1.so.1.9(+0x4e111) [0xaf6111]
/usr/lib/libruby-1.9.1.so.1.9(rb_bug+0x44) [0xaf68f4]
/usr/lib/libruby-1.9.1.so.1.9(+0xf7afc) [0xb9fafc]
[0x7b440c]
/var/lib/gems/1.9.1/gems/cups-0.1.7/lib/cups.so(+0x15b8) [0x2bf5b8]
/usr/lib/libruby-1.9.1.so.1.9(+0x1492fd) [0xbf12fd]
/usr/lib/libruby-1.9.1.so.1.9(+0x156b5d) [0xbfeb5d]
/usr/lib/libruby-1.9.1.so.1.9(+0x14cb9e) [0xbf4b9e]
/usr/lib/libruby-1.9.1.so.1.9(+0x15329b) [0xbfb29b]
/usr/lib/libruby-1.9.1.so.1.9(+0x153724) [0xbfb724]
/usr/lib/libruby-1.9.1.so.1.9(+0x153c32) [0xbfbc32]
/usr/lib/libruby-1.9.1.so.1.9(+0x149315) [0xbf1315]
/usr/lib/libruby-1.9.1.so.1.9(+0x156b5d) [0xbfeb5d]
/usr/lib/libruby-1.9.1.so.1.9(+0x14cb9e) [0xbf4b9e]
/usr/lib/libruby-1.9.1.so.1.9(+0x15329b) [0xbfb29b]
/usr/lib/libruby-1.9.1.so.1.9(+0x1581b9) [0xc001b9]
/usr/lib/libruby-1.9.1.so.1.9(rb_rescue2+0x181) [0xafa7e1]
/usr/lib/libruby-1.9.1.so.1.9(+0x149542) [0xbf1542]
/usr/lib/libruby-1.9.1.so.1.9(+0x1492fd) [0xbf12fd]
/usr/lib/libruby-1.9.1.so.1.9(+0x156b5d) [0xbfeb5d]
/usr/lib/libruby-1.9.1.so.1.9(+0x14cb9e) [0xbf4b9e]
/usr/lib/libruby-1.9.1.so.1.9(+0x15329b) [0xbfb29b]
/usr/lib/libruby-1.9.1.so.1.9(+0x158874) [0xc00874]
/usr/lib/libruby-1.9.1.so.1.9(rb_catch_obj+0xcf) [0xbf2e0f]
/usr/lib/libruby-1.9.1.so.1.9(+0x14aed7) [0xbf2ed7]
/usr/lib/libruby-1.9.1.so.1.9(+0x149315) [0xbf1315]
/usr/lib/libruby-1.9.1.so.1.9(+0x156b5d) [0xbfeb5d]
/usr/lib/libruby-1.9.1.so.1.9(+0x14cb9e) [0xbf4b9e]
/usr/lib/libruby-1.9.1.so.1.9(+0x15329b) [0xbfb29b]
/usr/lib/libruby-1.9.1.so.1.9(+0x158874) [0xc00874]
/usr/lib/libruby-1.9.1.so.1.9(rb_catch_obj+0xcf) [0xbf2e0f]
/usr/lib/libruby-1.9.1.so.1.9(+0x14aed7) [0xbf2ed7]
/usr/lib/libruby-1.9.1.so.1.9(+0x149315) [0xbf1315]
/usr/lib/libruby-1.9.1.so.1.9(+0x156b5d) [0xbfeb5d]
/usr/lib/libruby-1.9.1.so.1.9(+0x14cb9e) [0xbf4b9e]
/usr/lib/libruby-1.9.1.so.1.9(+0x15329b) [0xbfb29b]
/usr/lib/libruby-1.9.1.so.1.9(rb_iseq_eval_main+0xb5) [0xc02b25]
/usr/lib/libruby-1.9.1.so.1.9(+0x51784) [0xaf9784]
/usr/lib/libruby-1.9.1.so.1.9(ruby_exec_node+0x24) [0xafa2f4]
/usr/lib/libruby-1.9.1.so.1.9(ruby_run_node+0x36) [0xafbdd6]
irb() [0x8048638]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x1294d3]
irb() [0x8048661]

-- Other runtime information -----------------------------------------------

  • Loaded script: irb

  • Loaded features:

    0 enumerator.so
    1 /usr/lib/ruby/1.9.1/i686-linux/enc/encdb.so
    2 /usr/lib/ruby/1.9.1/i686-linux/enc/trans/transdb.so
    3 /usr/lib/ruby/1.9.1/rubygems/defaults.rb
    4 /usr/lib/ruby/1.9.1/i686-linux/rbconfig.rb
    5 /usr/lib/ruby/1.9.1/rubygems/deprecate.rb
    6 /usr/lib/ruby/1.9.1/rubygems/exceptions.rb
    7 /usr/lib/ruby/1.9.1/rubygems/custom_require.rb
    8 /usr/lib/ruby/1.9.1/rubygems.rb
    9 /usr/lib/ruby/1.9.1/e2mmap.rb
    10 /usr/lib/ruby/1.9.1/irb/init.rb
    11 /usr/lib/ruby/1.9.1/irb/workspace.rb
    12 /usr/lib/ruby/1.9.1/irb/inspector.rb
    13 /usr/lib/ruby/1.9.1/irb/context.rb
    14 /usr/lib/ruby/1.9.1/irb/extend-command.rb
    15 /usr/lib/ruby/1.9.1/irb/output-method.rb
    16 /usr/lib/ruby/1.9.1/irb/notifier.rb
    17 /usr/lib/ruby/1.9.1/irb/slex.rb
    18 /usr/lib/ruby/1.9.1/irb/ruby-token.rb
    19 /usr/lib/ruby/1.9.1/irb/ruby-lex.rb
    20 /usr/lib/ruby/1.9.1/irb/src_encoding.rb
    21 /usr/lib/ruby/1.9.1/irb/magic-file.rb
    22 /usr/lib/ruby/1.9.1/i686-linux/readline.so
    23 /usr/lib/ruby/1.9.1/irb/input-method.rb
    24 /usr/lib/ruby/1.9.1/irb/locale.rb
    25 /usr/lib/ruby/1.9.1/irb.rb
    26 /usr/lib/ruby/1.9.1/rubygems/version.rb
    27 /usr/lib/ruby/1.9.1/rubygems/requirement.rb
    28 /usr/lib/ruby/1.9.1/rubygems/platform.rb
    29 /usr/lib/ruby/1.9.1/rubygems/specification.rb
    30 /usr/lib/ruby/1.9.1/rubygems/path_support.rb
    31 /usr/lib/ruby/1.9.1/rubygems/dependency.rb
    32 /var/lib/gems/1.9.1/gems/cups-0.1.7/lib/cups.so

  • Process memory map:

00110000-002b3000 r-xp 00000000 08:02 542029 /lib/i386-linux-gnu/libc-2.15.so
002b3000-002b5000 r--p 001a3000 08:02 542029 /lib/i386-linux-gnu/libc-2.15.so
002b5000-002b6000 rw-p 001a5000 08:02 542029 /lib/i386-linux-gnu/libc-2.15.so
002b6000-002b9000 rw-p 00000000 00:00 0
002b9000-002bc000 r-xp 00000000 08:02 542047 /lib/i386-linux-gnu/libdl-2.15.so
002bc000-002bd000 r--p 00002000 08:02 542047 /lib/i386-linux-gnu/libdl-2.15.so
002bd000-002be000 rw-p 00003000 08:02 542047 /lib/i386-linux-gnu/libdl-2.15.so
002be000-002c1000 r-xp 00000000 08:02 699101 /var/lib/gems/1.9.1/gems/cups-0.1.7/lib/cups.so
002c1000-002c2000 r--p 00002000 08:02 699101 /var/lib/gems/1.9.1/gems/cups-0.1.7/lib/cups.so
002c2000-002c3000 rw-p 00003000 08:02 699101 /var/lib/gems/1.9.1/gems/cups-0.1.7/lib/cups.so
002c3000-002cf000 r-xp 00000000 08:02 153290 /usr/lib/i386-linux-gnu/libavahi-common.so.3.5.3
002cf000-002d0000 r--p 0000b000 08:02 153290 /usr/lib/i386-linux-gnu/libavahi-common.so.3.5.3
002d0000-002d1000 rw-p 0000c000 08:02 153290 /usr/lib/i386-linux-gnu/libavahi-common.so.3.5.3
002d1000-002d4000 r-xp 00000000 08:02 541740 /lib/i386-linux-gnu/libcom_err.so.2.1
002d4000-002d5000 r--p 00002000 08:02 541740 /lib/i386-linux-gnu/libcom_err.so.2.1
002d5000-002d6000 rw-p 00003000 08:02 541740 /lib/i386-linux-gnu/libcom_err.so.2.1
002d6000-002d8000 r-xp 00000000 08:02 541760 /lib/i386-linux-gnu/libkeyutils.so.1.4
002d8000-002d9000 r--p 00002000 08:02 541760 /lib/i386-linux-gnu/libkeyutils.so.1.4
002d9000-002da000 rw-p 00003000 08:02 541760 /lib/i386-linux-gnu/libkeyutils.so.1.4
002da000-002dd000 r-xp 00000000 08:02 541756 /lib/i386-linux-gnu/libgpg-error.so.0.8.0
002dd000-002de000 r--p 00002000 08:02 541756 /lib/i386-linux-gnu/libgpg-error.so.0.8.0
002de000-002df000 rw-p 00003000 08:02 541756 /lib/i386-linux-gnu/libgpg-error.so.0.8.0
002e0000-00300000 r-xp 00000000 08:02 542043 /lib/i386-linux-gnu/ld-2.15.so
00300000-00301000 r--p 0001f000 08:02 542043 /lib/i386-linux-gnu/ld-2.15.so
00301000-00302000 rw-p 00020000 08:02 542043 /lib/i386-linux-gnu/ld-2.15.so
00302000-0032c000 r-xp 00000000 08:02 542042 /lib/i386-linux-gnu/libm-2.15.so
0032c000-0032d000 r--p 00029000 08:02 542042 /lib/i386-linux-gnu/libm-2.15.so
0032d000-0032e000 rw-p 0002a000 08:02 542042 /lib/i386-linux-gnu/libm-2.15.so
0032e000-0037d000 r-xp 00000000 08:02 153548 /usr/lib/i386-linux-gnu/libcups.so.2
0037d000-00380000 r--p 0004e000 08:02 153548 /usr/lib/i386-linux-gnu/libcups.so.2
00380000-00381000 rw-p 00051000 08:02 153548 /usr/lib/i386-linux-gnu/libcups.so.2
00381000-003bc000 r-xp 00000000 08:02 151998 /usr/lib/i386-linux-gnu/libgssapi_krb5.so.2.2
003bc000-003bd000 ---p 0003b000 08:02 151998 /usr/lib/i386-linux-gnu/libgssapi_krb5.so.2.2
003bd000-003be000 r--p 0003b000 08:02 151998 /usr/lib/i386-linux-gnu/libgssapi_krb5.so.2.2
003be000-003bf000 rw-p 0003c000 08:02 151998 /usr/lib/i386-linux-gnu/libgssapi_krb5.so.2.2
003bf000-003cf000 r-xp 00000000 08:02 153292 /usr/lib/i386-linux-gnu/libavahi-client.so.3.2.9
003cf000-003d0000 r--p 0000f000 08:02 153292 /usr/lib/i386-linux-gnu/libavahi-client.so.3.2.9
003d0000-003d1000 rw-p 00010000 08:02 153292 /usr/lib/i386-linux-gnu/libavahi-client.so.3.2.9
003d1000-003e5000 r-xp 00000000 08:02 541956 /lib/i386-linux-gnu/libz.so.1.2.3.4
003e5000-003e6000 r--p 00013000 08:02 541956 /lib/i386-linux-gnu/libz.so.1.2.3.4
003e6000-003e7000 rw-p 00014000 08:02 541956 /lib/i386-linux-gnu/libz.so.1.2.3.4
003e7000-003f8000 r-xp 00000000 08:02 396296 /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so
003f8000-003f9000 r--p 00010000 08:02 396296 /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so
003f9000-003fa000 rw-p 00011000 08:02 396296 /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so
00402000-00407000 r-xp 00000000 08:02 274395 /usr/lib/ruby/1.9.1/i686-linux/readline.so
00407000-00408000 r--p 00004000 08:02 274395 /usr/lib/ruby/1.9.1/i686-linux/readline.so
00408000-00409000 rw-p 00005000 08:02 274395 /usr/lib/ruby/1.9.1/i686-linux/readline.so
00409000-004c8000 r-xp 00000000 08:02 151988 /usr/lib/i386-linux-gnu/libgnutls.so.26.21.8
004c8000-004cc000 r--p 000bf000 08:02 151988 /usr/lib/i386-linux-gnu/libgnutls.so.26.21.8
004cc000-004cd000 rw-p 000c3000 08:02 151988 /usr/lib/i386-linux-gnu/libgnutls.so.26.21.8
004cd000-004f3000 r-xp 00000000 08:02 151993 /usr/lib/i386-linux-gnu/libk5crypto.so.3.1
004f3000-004f4000 r--p 00025000 08:02 151993 /usr/lib/i386-linux-gnu/libk5crypto.so.3.1
004f4000-004f5000 rw-p 00026000 08:02 151993 /usr/lib/i386-linux-gnu/libk5crypto.so.3.1
004f5000-00577000 r-xp 00000000 08:02 542923 /lib/i386-linux-gnu/libgcrypt.so.11.7.0
00577000-00578000 r--p 00081000 08:02 542923 /lib/i386-linux-gnu/libgcrypt.so.11.7.0
00578000-0057a000 rw-p 00082000 08:02 542923 /lib/i386-linux-gnu/libgcrypt.so.11.7.0
00596000-005b2000 r-xp 00000000 08:02 541797 /lib/i386-linux-gnu/libtinfo.so.5.9
005b2000-005b4000 r--p 0001b000 08:02 541797 /lib/i386-linux-gnu/libtinfo.so.5.9
005b4000-005b5000 rw-p 0001d000 08:02 541797 /lib/i386-linux-gnu/libtinfo.so.5.9
005da000-0060f000 r-xp 00000000 08:02 541973 /lib/i386-linux-gnu/libreadline.so.6.2
0060f000-00610000 r--p 00035000 08:02 541973 /lib/i386-linux-gnu/libreadline.so.6.2
00610000-00613000 rw-p 00036000 08:02 541973 /lib/i386-linux-gnu/libreadline.so.6.2
00613000-00614000 rw-p 00000000 00:00 0
00645000-0068c000 r-xp 00000000 08:02 541735 /lib/i386-linux-gnu/libdbus-1.so.3.5.8
0068c000-0068d000 r--p 00047000 08:02 541735 /lib/i386-linux-gnu/libdbus-1.so.3.5.8
0068d000-0068e000 rw-p 00048000 08:02 541735 /lib/i386-linux-gnu/libdbus-1.so.3.5.8
006d0000-006d2000 r-xp 00000000 08:02 274427 /usr/lib/ruby/1.9.1/i686-linux/enc/encdb.so
006d2000-006d3000 r--p 00001000 08:02 274427 /usr/lib/ruby/1.9.1/i686-linux/enc/encdb.so
006d3000-006d4000 rw-p 00002000 08:02 274427 /usr/lib/ruby/1.9.1/i686-linux/enc/encdb.so
006d4000-0079c000 r-xp 00000000 08:02 151996 /usr/lib/i386-linux-gnu/libkrb5.so.3.3
0079c000-007a2000 r--p 000c7000 08:02 151996 /usr/lib/i386-linux-gnu/libkrb5.so.3.3
007a2000-007a3000 rw-p 000cd000 08:02 151996 /usr/lib/i386-linux-gnu/libkrb5.so.3.3
007b4000-007b5000 r-xp 00000000 00:00 0 [vdso]
008f2000-008f9000 r-xp 00000000 08:02 542038 /lib/i386-linux-gnu/librt-2.15.so
008f9000-008fa000 r--p 00006000 08:02 542038 /lib/i386-linux-gnu/librt-2.15.so
008fa000-008fb000 rw-p 00007000 08:02 542038 /lib/i386-linux-gnu/librt-2.15.so
00941000-00951000 r-xp 00000000 08:02 151985 /usr/lib/i386-linux-gnu/libtasn1.so.3.1.12
00951000-00952000 r--p 0000f000 08:02 151985 /usr/lib/i386-linux-gnu/libtasn1.so.3.1.12
00952000-00953000 rw-p 00010000 08:02 151985 /usr/lib/i386-linux-gnu/libtasn1.so.3.1.12
00a4c000-00a63000 r-xp 00000000 08:02 542040 /lib/i386-linux-gnu/libpthread-2.15.so
00a63000-00a64000 r--p 00016000 08:02 542040 /lib/i386-linux-gnu/libpthread-2.15.so
00a64000-00a65000 rw-p 00017000 08:02 542040 /lib/i386-linux-gnu/libpthread-2.15.so
00a65000-00a67000 rw-p 00000000 00:00 0
00aa8000-00ca6000 r-xp 00000000 08:02 152868 /usr/lib/libruby-1.9.1.so.1.9.1
00ca6000-00ca9000 r--p 001fd000 08:02 152868 /usr/lib/libruby-1.9.1.so.1.9.1
00ca9000-00cab000 rw-p 00200000 08:02 152868 /usr/lib/libruby-1.9.1.so.1.9.1
00cab000-00cbb000 rw-p 00000000 00:00 0
00d91000-00da1000 r-xp 00000000 08:02 151983 /usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0
00da1000-00da2000 r--p 0000f000 08:02 151983 /usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0
00da2000-00da3000 rw-p 00010000 08:02 151983 /usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0
00dd2000-00de5000 r-xp 00000000 08:02 542035 /lib/i386-linux-gnu/libresolv-2.15.so
00de5000-00de6000 ---p 00013000 08:02 542035 /lib/i386-linux-gnu/libresolv-2.15.so
00de6000-00de7000 r--p 00013000 08:02 542035 /lib/i386-linux-gnu/libresolv-2.15.so
00de7000-00de8000 rw-p 00014000 08:02 542035 /lib/i386-linux-gnu/libresolv-2.15.so
00de8000-00dea000 rw-p 00000000 00:00 0
00e8d000-00e94000 r-xp 00000000 08:02 151991 /usr/lib/i386-linux-gnu/libkrb5support.so.0.1
00e94000-00e95000 r--p 00006000 08:02 151991 /usr/lib/i386-linux-gnu/libkrb5support.so.0.1
00e95000-00e96000 rw-p 00007000 08:02 151991 /usr/lib/i386-linux-gnu/libkrb5support.so.0.1
00ede000-00efa000 r-xp 00000000 08:02 541772 /lib/i386-linux-gnu/libgcc_s.so.1
00efa000-00efb000 r--p 0001b000 08:02 541772 /lib/i386-linux-gnu/libgcc_s.so.1
00efb000-00efc000 rw-p 0001c000 08:02 541772 /lib/i386-linux-gnu/libgcc_s.so.1
00f0f000-00f17000 r-xp 00000000 08:02 542030 /lib/i386-linux-gnu/libcrypt-2.15.so
00f17000-00f18000 r--p 00007000 08:02 542030 /lib/i386-linux-gnu/libcrypt-2.15.so
00f18000-00f19000 rw-p 00008000 08:02 542030 /lib/i386-linux-gnu/libcrypt-2.15.so
00f19000-00f40000 rw-p 00000000 00:00 0
00fc9000-00fcb000 r-xp 00000000 08:02 274439 /usr/lib/ruby/1.9.1/i686-linux/enc/trans/transdb.so
00fcb000-00fcc000 r--p 00001000 08:02 274439 /usr/lib/ruby/1.9.1/i686-linux/enc/trans/transdb.so
00fcc000-00fcd000 rw-p 00002000 08:02 274439 /usr/lib/ruby/1.9.1/i686-linux/enc/trans/transdb.so
08048000-08049000 r-xp 00000000 08:02 153550 /usr/bin/ruby1.9.1
08049000-0804a000 r--p 00000000 08:02 153550 /usr/bin/ruby1.9.1
0804a000-0804b000 rw-p 00001000 08:02 153550 /usr/bin/ruby1.9.1
09522000-09949000 rw-p 00000000 00:00 0 [heap]
b7542000-b7544000 rw-p 00000000 00:00 0
b7544000-b754b000 r--s 00000000 08:02 151710 /usr/lib/i386-linux-gnu/gconv/gconv-modules.cache
b754b000-b754c000 ---p 00000000 00:00 0
b754c000-b75d0000 rw-p 00000000 00:00 0
b75d0000-b7759000 r--p 00000000 08:02 151489 /usr/lib/locale/locale-archive
b7759000-b775c000 rw-p 00000000 00:00 0
b776b000-b776d000 rw-p 00000000 00:00 0
bfecd000-bfeee000 rw-p 00000000 00:00 0 [stack]

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted

segmentation fault during calls to cups gem v0.1.10

This is reproducible; originally reported as bug to Ruby 2.2.1 ( https://bugs.ruby-lang.org/issues/11306 ). But their recommendation is for changes to cups.c (shown below as the first comment to this issue). This may or may not be related to issue #10 .

the following works okay:

2.2.1 :001 > list = Cups.show_destinations
 => ["laserjet_1102w", "lp_null"] 
2.2.1 :002 > Cups.device_uri_for( list.first )
 => "hp:/net/HP_LaserJet_Professional_P_1102w?ip=192.168.0.65" 
2.2.1 :003 > Cups.device_uri_for( list.last )
 => "file:///dev/null" 

the following fails (the order is not important; the second call always fails with abort):

2.2.1 :001 > list = Cups.show_destinations
 => ["laserjet_1102w", "lp_null"] 
2.2.1 :002 > CupsDevice.testit( list.first )
 => "hp:/net/HP_LaserJet_Professional_P_1102w?ip=192.168.0.65" 
2.2.1 :003 > CupsDevice.testit( list.last )
/home/daudi/projectspace/swalapala/app/models/cups_device.rb:101: [BUG] Segmentation fault at 0x0000000a491862
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]

where

class CupsDevice < ActiveRecord::Base
  def self.testit( cups_name )
       Cups.device_uri_for( cups_name )
  end
end # class CupsDevice

detailed core dump at: https://gist.github.com/dsaronin/52e1e8aa97b61210c478

Cups gem install fails "Failed to build gem native extension" on Mac OSX Mavericks.

ERROR: Error installing cups:
ERROR: Failed to build gem native extension.

/Users/me/.rvm/rubies/ruby-1.8.7-p374/bin/ruby extconf.rb

checking for main() in -lcups... yes
checking for cups-config... yes
cups version:
1.7.0
creating Makefile

make
/usr/bin/clang -I. -I. -I/Users/me/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin13.0.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -c cups.c
In file included from cups.c:1:
./ruby_cups.h:6:12: fatal error: 'ruby/st.h' file not found
#include <ruby/st.h>
^
1 error generated.
make: *** [cups.o] Error 1

Gem files will remain installed in /Users/me/.rvm/gems/ruby-1.8.7-p374@uiris3/gems/cups-0.1.5 for inspection.
Results logged to /Users/me/.rvm/gems/ruby-1.8.7-p374@uiris3/gems/cups-0.1.5/ext/gem_make.out
Building native extensions. This could take a while...

httpConnectEncrypt has been deprecated in OS X 10.9

make
compiling cups.c
cups.c: In function 'cups_print':
cups.c:155:3: warning: 'httpConnectEncrypt' is deprecated (declared at /usr/include/cups/http.h:453): Use httpConnect2 instead. [-Wdeprecated-declarations]
cups.c: In function 'cups_get_device_uri':
cups.c:469:15: error: dereferencing pointer to incomplete type
cups.c:469:15: error: dereferencing pointer to incomplete type
cups.c:469:15: error: dereferencing pointer to incomplete type
cups.c:469:15: error: dereferencing pointer to incomplete type
make: *** [cups.o] Error 1

Cannot build native gem extensions on Mac 10.10 Yosemite

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

    /Users/phil/.rubies/ruby-1.9.3-p545/bin/ruby -r ./siteconf20141024-1996-yu9jqo.rb extconf.rb
checking for main() in -lcups... yes
checking for cups-config... yes
cups version:
2.0.0
creating Makefile

make  clean

make
compiling cups.c
In file included from cups.c:1:
In file included from ./ruby_cups.h:5:
/Users/phil/.rubies/ruby-1.9.3-p545/include/ruby-1.9.1/ruby/backward/st.h:2:2: warning: use "ruby/st.h" instead of bare "st.h" [-W#warnings]
#warning use "ruby/st.h" instead of bare "st.h"
 ^
cups.c:470:31: error: incomplete definition of type 'struct _ipp_attribute_s'
       return rb_str_new2(attr->values[0].string.text);
                          ~~~~^
/Users/phil/.rubies/ruby-1.9.3-p545/include/ruby-1.9.1/ruby/intern.h:746:27: note: expanded from macro 'rb_str_new_cstr'
    (__builtin_constant_p(str)) ?               \
                          ^
/usr/include/cups/ipp.h:674:16: note: forward declaration of 'struct _ipp_attribute_s'
typedef struct _ipp_attribute_s ipp_attribute_t;
               ^
cups.c:470:31: error: incomplete definition of type 'struct _ipp_attribute_s'
       return rb_str_new2(attr->values[0].string.text);
                          ~~~~^
/Users/phil/.rubies/ruby-1.9.3-p545/include/ruby-1.9.1/ruby/intern.h:747:14: note: expanded from macro 'rb_str_new_cstr'
        rb_str_new((str), (long)strlen(str)) :  \
                    ^
/usr/include/cups/ipp.h:674:16: note: forward declaration of 'struct _ipp_attribute_s'
typedef struct _ipp_attribute_s ipp_attribute_t;
               ^
cups.c:470:31: error: incomplete definition of type 'struct _ipp_attribute_s'
       return rb_str_new2(attr->values[0].string.text);
                          ~~~~^
/Users/phil/.rubies/ruby-1.9.3-p545/include/ruby-1.9.1/ruby/intern.h:748:18: note: expanded from macro 'rb_str_new_cstr'
        rb_str_new_cstr(str);                   \
                        ^
/usr/include/cups/ipp.h:674:16: note: forward declaration of 'struct _ipp_attribute_s'
typedef struct _ipp_attribute_s ipp_attribute_t;
               ^
cups.c:470:15: error: returning 'void' from a function with incompatible result type 'VALUE' (aka 'unsigned long')
       return rb_str_new2(attr->values[0].string.text);
              ^
/Users/phil/.rubies/ruby-1.9.3-p545/include/ruby-1.9.1/ruby/intern.h:800:21: note: expanded from macro 'rb_str_new2'
#define rb_str_new2 rb_str_new_cstr
                    ^
/Users/phil/.rubies/ruby-1.9.3-p545/include/ruby-1.9.1/ruby/intern.h:744:30: note: expanded from macro 'rb_str_new_cstr'
#define rb_str_new_cstr(str) __extension__ (    \
                             ^~~~~~~~~~~~~~~~~~~~
1 warning and 4 errors generated.
make: *** [cups.o] Error 1

make failed, exit code 2

Bundler fails to bundle the gems when using gem 'cups', github: 'm0wfo/cups' in my gemfile. I suspect this is due to yosemite using cups 2.0.

I'm using ruby-1.9.3-p545 managed via chruby

CUPS web server unablq to auth

I recently installed cups from git. I also tried older cupses ( 2.2.5, 2.2.1 ) and they had the same issue. See, when i get to localhost:631 and go to Administration/Add Printer on anything that requires access, i get an authentication promprt witch i can't auth into because no matter what i type it won't accept the username and password as the correct one. I compiled cups from source. Help ?

https://pastebin.com/QTGQeRZs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.