Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snappy 0.0.11 fails to install on OS X #12

Open
zachmargolis opened this issue Oct 11, 2014 · 8 comments
Open

snappy 0.0.11 fails to install on OS X #12

zachmargolis opened this issue Oct 11, 2014 · 8 comments

Comments

@zachmargolis
Copy link

I believe this is a result of vendoring the library in #11

I believe the relevant error is:

./autogen.sh: line 5: libtoolize: command not found

Here's the full error barf that I get

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

    /Users/margolis/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb 
checking for main() in -lsnappy... no
./autogen.sh: line 5: libtoolize: command not found
cp /Users/margolis/.rvm/gems/ruby-2.0.0-p353/gems/snappy-0.0.11/ext/../vendor/snappy/config.h /Users/margolis/.rvm/gems/ruby-2.0.0-p353/gems/snappy-0.0.11/ext/../vendor/snappy/snappy-c.cc /Users/margolis/.rvm/gems/ruby-2.0.0-p353/gems/snappy-0.0.11/ext/../vendor/snappy/snappy-c.h /Users/margolis/.rvm/gems/ruby-2.0.0-p353/gems/snappy-0.0.11/ext/../vendor/snappy/snappy-internal.h /Users/margolis/.rvm/gems/ruby-2.0.0-p353/gems/snappy-0.0.11/ext/../vendor/snappy/snappy-sinksource.cc /Users/margolis/.rvm/gems/ruby-2.0.0-p353/gems/snappy-0.0.11/ext/../vendor/snappy/snappy-sinksource.h /Users/margolis/.rvm/gems/ruby-2.0.0-p353/gems/snappy-0.0.11/ext/../vendor/snappy/snappy-stubs-internal.cc /Users/margolis/.rvm/gems/ruby-2.0.0-p353/gems/snappy-0.0.11/ext/../vendor/snappy/snappy-stubs-internal.h /Users/margolis/.rvm/gems/ruby-2.0.0-p353/gems/snappy-0.0.11/ext/../vendor/snappy/snappy-stubs-public.h /Users/margolis/.rvm/gems/ruby-2.0.0-p353/gems/snappy-0.0.11/ext/../vendor/snappy/snappy.cc /Users/margolis/.rvm/gems/ruby-2.0.0-p353/gems/snappy-0.0.11/ext/../vendor/snappy/snappy.h /Users/margolis/.rvm/gems/ruby-2.0.0-p353/gems/snappy-0.0.11/ext
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/margolis/.rvm/rubies/ruby-2.0.0-p353/bin/ruby
    --with-snappylib
    --without-snappylib
/Users/margolis/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:1552:in `stat': No such file or directory - /Users/margolis/.rvm/gems/ruby-2.0.0-p353/gems/snappy-0.0.11/ext/../vendor/snappy/config.h (Errno::ENOENT)
    from /Users/margolis/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:1552:in `block in fu_each_src_dest'
    from /Users/margolis/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:1561:in `block in fu_each_src_dest0'
    from /Users/margolis/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:1559:in `each'
    from /Users/margolis/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:1559:in `fu_each_src_dest0'
    from /Users/margolis/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:1550:in `fu_each_src_dest'
    from /Users/margolis/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:393:in `cp'
    from extconf.rb:27:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Users/margolis/.rvm/gems/ruby-2.0.0-p353/gems/snappy-0.0.11 for inspection.
Results logged to /Users/margolis/.rvm/gems/ruby-2.0.0-p353/extensions/x86_64-darwin-13/2.0.0/snappy-0.0.11/gem_make.out
An error occurred while installing snappy (0.0.11), and Bundler cannot
continue.
Make sure that `gem install snappy -v '0.0.11'` succeeds before bundling.
@miyucy
Copy link
Owner

miyucy commented Oct 12, 2014

I think related this issue https://code.google.com/p/snappy/issues/detail?id=24
(also occurred in my machine...)

Can you try again after brew install snappy?

@zachmargolis
Copy link
Author

Hi, brew install snappy did let the gem installation work.

However, I am skeptical of this as a long-term solution. It complicates the development workflow for me and my team, as now we have to make sure that each person has run brew install snappy out-of-band from the normal bundle install that we do. Are there any other alternatives?

@dideler
Copy link

dideler commented Apr 16, 2015

There's some suggestions at http://stackoverflow.com/questions/19697359/ruby-debug-could-not-create-makefile-due-to-some-reason-probably-lack-of-necess, but brew install snappy worked for me.

@msroot
Copy link

msroot commented Sep 21, 2016

here is the problem

  tar = 'tar'
  tar = 'gnutar' if find_executable 'gnutar'

  ver = "1.1.1"
  src = "snappy-#{ver}"

  FileUtils.rm_rf File.join dst, src
  system "curl -s http://snappy.googlecode.com/files/#{src}.tar.gz | #{tar} xz"

http://snappy.googlecode.com doent exist

@miyucy
Copy link
Owner

miyucy commented Sep 21, 2016

This problem is already fixed in latest version. (I hope)
Because snappy.gem is contains snappy repos.
So please use latest snappy.gem

@msroot
Copy link

msroot commented Sep 21, 2016

@miyucy i have a locked version 0.0.10 at my server and its not easy to update

@miyucy
Copy link
Owner

miyucy commented Sep 22, 2016

Could you rewrite ext/extconf.rb with like https://github.com/SpringMT/snappy/commit/c48feb9cb13d4d0afcb183b48828cb024eba86d9

snappy.gem-v0.0.10 used snappy-v1.1.1.
so you can use this tarball maybe.
http://pkgs.fedoraproject.org/repo/pkgs/snappy/snappy-1.1.1.tar.gz/8887e3b7253b22a31f5486bca3cbc1c2/snappy-1.1.1.tar.gz

Or, rubygems.org is able to overwrite gem version? if it can, i wish overwrite with it...

@lavoiesl
Copy link

This is because snappy doesn't provide a snappy.pc: google/snappy#55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants