libarchive-ruby icon indicating copy to clipboard operation
libarchive-ruby copied to clipboard

Manual installation of the library under Ruby 1.8.7 Enterprise Edition

Open christian opened this issue 14 years ago • 2 comments

Hello,

I'm trying to compile the library manually. When I try rake compile, this is the result I get:

➜  libarchive-ruby git:(master) rake compile
(in /Users/cristi/Downloads/libarchive-ruby)
cd ext
/Users/cristi/.rvm/rubies/ree-1.8.7-2010.02/bin/ruby extconf.rb
checking for main() in -larchive... yes
checking for archive.h... yes
checking for rb_string_value_cstr() in ruby.h... yes
checking for RETURN_ENUMERATOR in ruby.h... yes
creating Makefile
make
g++ -I. -I. -I/Users/cristi/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/i686-darwin10.4.0 -I. -DHAVE_RB_STRING_VALUE_CSTR  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -g -O2  -pipe -fno-common  -Wall   -c archive.cpp
archive.cpp: In function ‘VALUE Archive_each_block(archive*)’:
archive.cpp:378: error: ‘rb_proc_arity’ was not declared in this scope
archive.cpp: In function ‘VALUE Archive_map_block(write_obj*)’:
archive.cpp:568: error: ‘rb_proc_arity’ was not declared in this scope
make: *** [archive.o] Error 1
rake aborted!
Command failed with status (2): [make...]
/Users/cristi/Downloads/libarchive-ruby/Rakefile.rb:77

I'm using Ruby 1.8.7 Enterprise Edition. When trying to install via Rubygems, it works but when I try to use it, this is what I get:

ree-1.8.7-2010.02 > require 'rubygems'
 => true 
ree-1.8.7-2010.02 > require 'archive'
 => true 
ree-1.8.7-2010.02 > a = Archive.new('/tmp/iAdTest.zip')
 => #<Archive:/tmp/iAdTest.zip> 
ree-1.8.7-2010.02 > a.extract
dyld: lazy symbol binding failed: Symbol not found: _archive_read_support_format_raw
  Referenced from: /Users/cristi/.rvm/gems/ree-1.8.7-2010.02/gems/libarchive-ruby-0.0.3/lib/archive.bundle
  Expected in: flat namespace

dyld: Symbol not found: _archive_read_support_format_raw
  Referenced from: /Users/cristi/.rvm/gems/ree-1.8.7-2010.02/gems/libarchive-ruby-0.0.3/lib/archive.bundle
  Expected in: flat namespace

[1]    25666 trace trap  irb

christian avatar May 30 '11 15:05 christian

the first. i update it in the gem, not there, i make a new push

the second: what is your libarchive version? the gem is for >2.8.4 but i can add fixes so it work with older but it should failed from the build .. i check this

Hanmac avatar May 30 '11 15:05 Hanmac

Thanks a lot for the speedy response!

I'm using libarchive-2.8.4. I've compiled / intalled it several times (don't know if this makes any difference).

It works smoothly on Ruby 1.9, but I cannot use that unfotunatelly ...

christian avatar May 30 '11 15:05 christian