Gem installation fails on MacOS
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 76
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
I cannot install this gem on MacOS (Monterey / Intel / Ruby 3.1.2).
This is the error message:
$ brew install rocksdb
Warning: rocksdb 7.5.3 is already installed and up-to-date.
To reinstall 7.5.3, run:
brew reinstall rocksdb
$ gem install rocksdb-ruby
Building native extensions. This could take a while...
ERROR: Error installing rocksdb-ruby:
ERROR: Failed to build gem native extension.
current directory: /Users/collimarco/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rocksdb-ruby-1.0.2/ext/rocksdb
/Users/collimarco/.rbenv/versions/3.1.2/bin/ruby -I /Users/collimarco/.rbenv/versions/3.1.2/lib/ruby/3.1.0 -r ./siteconf20220907-11247-eq0d9k.rb extconf.rb
checking for -lrocksdb_debug... no
checking for rocksdb/db.h... no
can't find header or library of rocksdb
*** 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
--without-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/collimarco/.rbenv/versions/3.1.2/bin/$(RUBY_BASE_NAME)
--with-rocksdb-dir
--without-rocksdb-dir
--with-rocksdb-include
--without-rocksdb-include=${rocksdb-dir}/include
--with-rocksdb-lib
--without-rocksdb-lib=${rocksdb-dir}/lib
--with-rocksdb_debug-dir
--without-rocksdb_debug-dir
--with-rocksdb_debug-include
--without-rocksdb_debug-include=${rocksdb_debug-dir}/include
--with-rocksdb_debug-lib
--without-rocksdb_debug-lib=${rocksdb_debug-dir}/lib
--with-rocksdb_debuglib
--without-rocksdb_debuglib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/collimarco/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/extensions/x86_64-darwin-21/3.1.0/rocksdb-ruby-1.0.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/collimarco/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rocksdb-ruby-1.0.2 for inspection.
Results logged to /Users/collimarco/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/extensions/x86_64-darwin-21/3.1.0/rocksdb-ruby-1.0.2/gem_make.out
I would love to use this gem and any help would be appreciated.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported gem install rocksdb-ruby failure on macOS with Ruby 3.1.2 and Homebrew RocksDB. Inspect ext/rocksdb/extconf.rb, the generated mkmf.log, and the native extension build output to determine why rocksdb/db.h and the library are not found. Done means the gem installs successfully in the reported environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- build-system, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100