Skip to content
This repository has been archived by the owner on Jul 14, 2020. It is now read-only.

Dependency on serpent fails #10

Open
lazzarello opened this issue Apr 18, 2018 · 1 comment
Open

Dependency on serpent fails #10

lazzarello opened this issue Apr 18, 2018 · 1 comment

Comments

@lazzarello
Copy link

lazzarello commented Apr 18, 2018

Installing serpent 0.3.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/leeazzarello/.gem/ruby/2.5.1/gems/serpent-0.3.0/ext/serpent
/Users/leeazzarello/.rubies/ruby-2.5.1/bin/ruby -r ./siteconf20180418-78765-1rx97ar.rb extconf.rb
/Users/leeazzarello/.rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require':
cannot load such file -- mkmf-rice (LoadError)
from /Users/leeazzarello/.rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in
`require'
	from extconf.rb:2:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Users/leeazzarello/.gem/ruby/2.5.1/gems/serpent-0.3.0 for inspection.
Results logged to
/Users/leeazzarello/.gem/ruby/2.5.1/extensions/x86_64-darwin-17/2.5.0-static/serpent-0.3.0/gem_make.out

An error occurred while installing serpent (0.3.0), and Bundler cannot continue.
Make sure that `gem install serpent -v '0.3.0'` succeeds before bundling.

In Gemfile:
  serpent

gem install rice fails with the following message

Unfortunately Rice does not build against a staticly linked Ruby.
You'll need to rebuild Ruby with --enable-shared to use this library.

If you're on rvm:   rvm reinstall [version] -- --enable-shared
If you're on rbenv: CONFIGURE_OPTS="--enable-shared" rbenv install [version]

If you are using Heroku, they use a own custom configured, staticly linked Ruby
for their stack and it unfortunately does not work with Rice. You will need to use
a custom Ruby build pack that builds and uses a non-static version of Ruby.

extconf failed, exit code 1

After recompiling ruby with --enable-shared using ruby-install 2.5.1 -- --enable-shared the error is gone.

Now the error from serpent changes to read

checking for -lserpent... no
missing libserpent.so
*** 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/leeazzarello/.rubies/ruby-2.5.1/bin/$(RUBY_BASE_NAME)
	--with-libpath
	--without-libpath
	--with-serpentlib
	--without-serpentlib

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Users/leeazzarello/.gem/ruby/2.5.1/extensions/x86_64-darwin-17/2.5.0/serpent-0.3.0/mkmf.log

extconf failed, exit code 1
@songky
Copy link

songky commented May 25, 2018

Hey, you need serpent first.

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

No branches or pull requests

2 participants