Open jamesaspinwall opened 10 years ago
I can confirm, fails~
I realise that it is over two years since this was actually reported as a problem, but hopefully this can help someone :)
$ gem install mmap
Building native extensions. This could take a while...
ERROR: Error installing mmap:
I think this is because you're using the Rubygems version of this gem, not the code in this repo. If you download this branch (has some boilerplate to help build the gem), then do this:
$ bundle
$ rake compile
$ rake package
$ gem install pkg/mmap-0.2.6.gem
You should be able to be use the gem:
$ irb -rmmap
irb(main):001:0> mmap = Mmap.new("/Users/will/Downloads/day_of_the_tentacle_remastered_2.4.0.6\ \(1\).pkg")
=> #<Mmap:0x007fa16a182708>
irb(main):002:0> mmap.advise(Mmap::MADV_SEQUENTIAL)
=> nil
irb(main):003:0> mmap[0..10]
=> "xar!\x00\x1C\x00\x01\x00\x00\x00"
irb(main):004:0>
@wjessop that branch no longer exists
Hi, Is it possible for you to take a look and fix the mmap gem install? I tried and failed:
doingthingstogether - ~ $ gem install mmap Building native extensions. This could take a while... ERROR: Error installing mmap: ERROR: Failed to build gem native extension.
creating Makefile
make "DESTDIR=" clean
make "DESTDIR=" compiling mmap.c In file included from mmap.c:15:0: /home/jaspinwall/.rvm/rubies/ruby-2.1.2/include/ruby-2.1.0/ruby/backward/rubyio.h:2:2: warning: #warning use "ruby/io.h" instead of "rubyio.h" [-Wcpp]
warning use "ruby/io.h" instead of "rubyio.h"
^ mmap.c:16:20: fatal error: intern.h: No such file or directory
include
compilation terminated. make: *\ [mmap.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/jaspinwall/.rvm/gems/ruby-2.1.2/gems/mmap-0.2.6 for inspection. Results logged to /home/jaspinwall/.rvm/gems/ruby-2.1.2/extensions/x86_64-linux/2.1.0/mmap-0.2.6/gem_make.out