Doesn't install with rocksdb 7.0.2
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 76
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
I'm installing rocksdb-dev from alpine testing/edge. They recently updated it to 7.0.2 https://pkgs.alpinelinux.org/packages?name=rocksdb-dev&branch=edge ... but rocksdb-ruby doesn't compile with that:
From our Dockerfile:
RUN apk --no-cache add rocksdb-dev --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing
Installing rocksdb-ruby fails with:
...
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /usr/local/bundle/gems/rocksdb-ruby-1.0.2/ext/rocksdb
/usr/local/bin/ruby -I /usr/local/lib/ruby/site_ruby/3.0.0 -r
./siteconf20220323-1-bs9mqy.rb extconf.rb
checking for -lrocksdb_debug... no
checking for rocksdb/db.h... yes
checking for -lrocksdb... yes
creating Makefile
current directory: /usr/local/bundle/gems/rocksdb-ruby-1.0.2/ext/rocksdb
make DESTDIR\= clean
current directory: /usr/local/bundle/gems/rocksdb-ruby-1.0.2/ext/rocksdb
make DESTDIR\=
compiling rocksdb_batch_rb.cc
In file included from /usr/include/rocksdb/iterator.h:23,
from /usr/include/rocksdb/db.h:18,
from rocksdb_batch_rb.h:1,
from rocksdb_batch_rb.cc:1:
/usr/include/rocksdb/slice.h:46:20: error: 'string_view' in namespace 'std' does
not name a type
46 | Slice(const std::string_view& sv) : data_(sv.data()), size_(sv.size())
{}
| ^~~~~~~~~~~
/usr/include/rocksdb/slice.h:46:15: note: 'std::string_view' is only available
from C++17 onwards
46 | Slice(const std::string_view& sv) : data_(sv.data()), size_(sv.size())
{}
| ^~~
/usr/include/rocksdb/slice.h:95:8: error: 'string_view' in namespace 'std' does
not name a type
95 | std::string_view ToStringView() const {
| ^~~~~~~~~~~
/usr/include/rocksdb/slice.h:95:3: note: 'std::string_view' is only available
from C++17 onwards
95 | std::string_view ToStringView() const {
| ^~~
/usr/include/rocksdb/slice.h: In constructor 'rocksdb::Slice::Slice(const
int&)':
/usr/include/rocksdb/slice.h:46:48: error: request for member 'data' in 'sv',
which is of non-class type 'const int'
46 | Slice(const std::string_view& sv) : data_(sv.data()), size_(sv.size())
{}
| ^~~~
/usr/include/rocksdb/slice.h:46:66: error: request for member 'size' in 'sv',
which is of non-class type 'const int'
46 | Slice(const std::string_view& sv) : data_(sv.data()), size_(sv.size())
{}
| ^~~~
make: *** [Makefile:213: rocksdb_batch_rb.o] Error 1
make failed, exit code 2
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 reviewing ext/rocksdb/extconf.rb and the C++ extension files, especially rocksdb_batch_rb.cc and rocksdb_batch_rb.h, then reproduce the failure using the Dockerfile with Alpine's rocksdb-dev 7.0.2. Done means the native extension compiles successfully against that RocksDB version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, ruby
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100