Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't compile nearcore project after last RocksDB version bump

Tags:

nearprotocol

Here are the important parts of the error

error: failed to run custom build command for `librocksdb-sys v6.2.4`
Caused by:
  process didn't exit successfully: `nearcore/target/debug/build/librocksdb-sys-9223f5cf5557dfe7/build-script-build` (exit code: 101)

--- stderr
rocksdb/include/rocksdb/c.h:65:10: fatal error: 'stdarg.h' file not found
rocksdb/include/rocksdb/c.h:65:10: fatal error: 'stdarg.h' file not found, err: true
thread 'main' panicked at 'unable to generate rocksdb bindings: ()', src/libcore/result.rs:1165:5

If I'm missing something (ie. stdarg.h), is there a way to just include it automatically?

like image 656
amgando Avatar asked Dec 13 '25 04:12

amgando


1 Answers

You'll need to install llvm and clang

Unfortunately there isn't a way to automatically check for and include this that I know of.

The Near team should update the relevant Dockerfile(s) and add something to docs.nearprotocol.com

to fix this error run:

apt install llvm clang
... or ...
brew install llvm clang

like image 132
amgando Avatar answered Dec 15 '25 21:12

amgando