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

RocksDB does not build on musl #174

Open
cetra3 opened this issue Mar 27, 2018 · 9 comments
Open

RocksDB does not build on musl #174

cetra3 opened this issue Mar 27, 2018 · 9 comments

Comments

@cetra3
Copy link

cetra3 commented Mar 27, 2018

It would be nice if rust-rocksdb could build on x86_64-unknown-linux-musl.

I get the following error when using the rust musl docker:

   Compiling librocksdb-sys v5.11.3 (file:///home/rust/src/rust-rocksdb/librocksdb-sys)
error: failed to run custom build command for `librocksdb-sys v5.11.3 (file:///home/rust/src/rust-rocksdb/librocksdb-sys)`
process didn't exit successfully: `/home/rust/src/rust-rocksdb/target/debug/build/librocksdb-sys-030649180e4da4ff/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=build.rs
cargo:rerun-if-changed=rocksdb/
cargo:rerun-if-changed=snappy/
rocksdb/include/rocksdb/c.h:48:9: warning: #pragma once in main file [-Wpragma-once-outside-header], err: false
rocksdb/include/rocksdb/c.h:68:10: fatal error: 'stdarg.h' file not found, err: true

--- stderr
rocksdb/include/rocksdb/c.h:48:9: warning: #pragma once in main file [-Wpragma-once-outside-header]
rocksdb/include/rocksdb/c.h:68:10: fatal error: 'stdarg.h' file not found
thread 'main' panicked at 'unable to generate rocksdb bindings: ()', /checkout/src/libcore/result.rs:906:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
ekmartin pushed a commit to ekmartin/rust-rocksdb that referenced this issue Apr 23, 2018
dl00 pushed a commit to blockscape/blockscape that referenced this issue Jul 28, 2018
Maintaining RockDB on ARM has become impossible with latest versions as they are. Also see here: rust-rocksdb/rust-rocksdb#174
@rubencaro
Copy link

On Fedora28 I got the same error message and just had to install the clang-devel package, which contains the missing stdarg.h (and others...).

@cetra3
Copy link
Author

cetra3 commented Aug 1, 2018

Ok with the current master, I can at least compile the thing, but have to make dodgy workarounds as per this issue by adding a musl-g++ symlink to g++ to the PATH.

Steps for posterity:

sudo apt-get install -y clang
sudo ln -s /usr/bin/g++ /usr/bin/musl-g++

I'm not sure why it's looking for musl-g++ ?

@Jake-Shadle
Copy link

@rubencaro Thanks for the tip, had this exact problem even though I had multiple stdarg.h version already.

@cetra3 It's looking for that because of the way cc-rs creates executable names, as noted here, it's "dodgy" rust-lang/cc-rs#105

@cetra3
Copy link
Author

cetra3 commented Aug 22, 2018

I had a look at the cc-rs code but can't really find the spot that it's resolving to musl-g++. I'm hoping that someone smarter than me knows how to adjust it!

@Jake-Shadle
Copy link

@alex88
Copy link

alex88 commented Oct 1, 2019

I've the same problem on ubuntu 19:04 ubuntu:rolling image, I've installed

build-essential curl llvm-dev libclang-dev linux-headers-generic libsnappy-dev liblz4-dev libzstd-dev libgflags-dev zlib1g-dev libbz2-dev

but I get the same missing stdarg.h error

@alex88
Copy link

alex88 commented Oct 1, 2019

@cetra3 in the meantime did you find a solution?

Also because compiling rocksdb from their source works fine, from this package doesn't

@cetra3
Copy link
Author

cetra3 commented Oct 2, 2019

@alex88 I managed to get it to compile a while ago. See my comment here, this may not be valid anymore

@alex88
Copy link

alex88 commented Oct 2, 2019

@cetra3 I've solved mine by installing clang, since I was getting an header problem I thought it was a lib package needed, not one with the binaries like clang. Thank you!

rleungx pushed a commit to rleungx/rust-rocksdb that referenced this issue Jun 23, 2020
update titan to include tikv/titan#169 for tikv-4.x

include the following changes
```
81814ec 2020-06-04 zbk602423539@gmail.. Fix GC may delete a already deleted blob file (rust-rocksdb#168) (rust-rocksdb#169)
80657c0 2020-06-04 zbk602423539@gmail.. Fix wrong assert delta < 0 for cocurrent compaction while flush (rust-rocksdb#172) (rust-rocksdb#176)
0db7976 2020-06-04 sre-bot@pingcap.com  Fix wrong live data size when encounter rewrite failure (rust-rocksdb#161) (rust-rocksdb#175)
c41f2a2 2020-06-04 sre-bot@pingcap.com  feat: Titan should return user value to compaction filter rust-rocksdb#163 (rust-rocksdb#164) (rust-rocksdb#174)
```

Signed-off-by: sre-bot <sre-bot@pingcap.com>
kodiakhq bot pushed a commit to Azure/iotedge that referenced this issue Sep 29, 2020
This reverts commit b8800a2.

The rocksdb build does not work right now on musl (needed for alpine). There is some conflicting information about if it is possible to get it building on alpine, but there is some conflicting info. I have overcame two issues people have ran into, but there is a linking problem that I can't yet figure out.

Here are some links for context:
- People say it can work: rust-rocksdb/rust-rocksdb#174 (comment)
- Someone with same linking problem says it won't work: rust-rocksdb/rust-rocksdb#418

I am going to do some more investigation then sync with Arnav and David to see if fixable.
gordonwang0 pushed a commit to gordonwang0/iotedge that referenced this issue Jan 12, 2021
This reverts commit b8800a2.

The rocksdb build does not work right now on musl (needed for alpine). There is some conflicting information about if it is possible to get it building on alpine, but there is some conflicting info. I have overcame two issues people have ran into, but there is a linking problem that I can't yet figure out.

Here are some links for context:
- People say it can work: rust-rocksdb/rust-rocksdb#174 (comment)
- Someone with same linking problem says it won't work: rust-rocksdb/rust-rocksdb#418

I am going to do some more investigation then sync with Arnav and David to see if fixable.
BHouwens pushed a commit to AIBlockOfficial/Network that referenced this issue Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants