substrate icon indicating copy to clipboard operation
substrate copied to clipboard

cargo build error `librocksdb-sys v5.18.3` on Mac

Open skyh24 opened this issue 7 years ago • 3 comments

this is my log..why my clang is newest

Compiling substrate-telemetry v2.0.0 (/Users/skyhigh/Blockchain/polka/substrate/core/telemetry) Compiling substrate-peerset v2.0.0 (/Users/skyhigh/Blockchain/polka/substrate/core/peerset) Compiling srml-support-procedural v2.0.0 (/Users/skyhigh/Blockchain/polka/substrate/srml/support/procedural) error: failed to run custom build command for librocksdb-sys v5.18.3

Caused by: process didn't exit successfully: /Users/skyhigh/Blockchain/polka/substrate/target/debug/build/librocksdb-sys-73db39e7ae2a0511/build-script-build (exit code: 101) --- stdout cargo:rerun-if-changed=build.rs cargo:rerun-if-changed=rocksdb/ cargo:rerun-if-changed=snappy/ cargo:rerun-if-changed=lz4/ cargo:rerun-if-changed=zstd/ cargo:rerun-if-changed=zlib/ cargo:rerun-if-changed=bzip2/

--- stderr rocksdb/include/rocksdb/c.h:152:34: error: unknown type name 'uint32_t' rocksdb/include/rocksdb/c.h:163:5: error: unknown type name 'uint32_t' rocksdb/include/rocksdb/c.h:176:28: error: unknown type name 'int64_t' rocksdb/include/rocksdb/c.h:180:28: error: unknown type name 'uint32_t' rocksdb/include/rocksdb/c.h:184:28: error: unknown type name 'uint64_t' rocksdb/include/rocksdb/c.h:188:28: error: unknown type name 'uint32_t' rocksdb/include/rocksdb/c.h:202:5: error: unknown type name 'uint64_t' rocksdb/include/rocksdb/c.h:310:24: error: unknown type name 'uint64_t' rocksdb/include/rocksdb/c.h:337:27: error: unknown type name 'uint64_t' rocksdb/include/rocksdb/c.h:346:40: error: unknown type name 'uint64_t' rocksdb/include/rocksdb/c.h:352:40: error: unknown type name 'uint64_t' rocksdb/include/rocksdb/c.h:422:114: error: unknown type name 'uint64_t' rocksdb/include/rocksdb/c.h:423:28: error: unknown type name 'uint64_t' rocksdb/include/rocksdb/c.h:660:51: error: unknown type name 'uint64_t' rocksdb/include/rocksdb/c.h:717:46: error: unknown type name 'uint32_t' rocksdb/include/rocksdb/c.h:719:46: error: unknown type name 'uint32_t' rocksdb/include/rocksdb/c.h:737:29: error: unknown type name 'uint64_t' rocksdb/include/rocksdb/c.h:739:29: error: unknown type name 'uint64_t' rocksdb/include/rocksdb/c.h:742:29: error: unknown type name 'uint64_t' fatal error: too many errors emitted, stopping now [-ferror-limit=] rocksdb/include/rocksdb/c.h:152:34: error: unknown type name 'uint32_t', err: true rocksdb/include/rocksdb/c.h:163:5: error: unknown type name 'uint32_t', err: true rocksdb/include/rocksdb/c.h:176:28: error: unknown type name 'int64_t', err: true rocksdb/include/rocksdb/c.h:180:28: error: unknown type name 'uint32_t', err: true rocksdb/include/rocksdb/c.h:184:28: error: unknown type name 'uint64_t', err: true rocksdb/include/rocksdb/c.h:188:28: error: unknown type name 'uint32_t', err: true rocksdb/include/rocksdb/c.h:202:5: error: unknown type name 'uint64_t', err: true rocksdb/include/rocksdb/c.h:310:24: error: unknown type name 'uint64_t', err: true rocksdb/include/rocksdb/c.h:337:27: error: unknown type name 'uint64_t', err: true rocksdb/include/rocksdb/c.h:346:40: error: unknown type name 'uint64_t', err: true rocksdb/include/rocksdb/c.h:352:40: error: unknown type name 'uint64_t', err: true rocksdb/include/rocksdb/c.h:422:114: error: unknown type name 'uint64_t', err: true rocksdb/include/rocksdb/c.h:423:28: error: unknown type name 'uint64_t', err: true rocksdb/include/rocksdb/c.h:660:51: error: unknown type name 'uint64_t', err: true rocksdb/include/rocksdb/c.h:717:46: error: unknown type name 'uint32_t', err: true rocksdb/include/rocksdb/c.h:719:46: error: unknown type name 'uint32_t', err: true rocksdb/include/rocksdb/c.h:737:29: error: unknown type name 'uint64_t', err: true rocksdb/include/rocksdb/c.h:739:29: error: unknown type name 'uint64_t', err: true rocksdb/include/rocksdb/c.h:742:29: error: unknown type name 'uint64_t', err: true fatal error: too many errors emitted, stopping now [-ferror-limit=], err: true thread 'main' panicked at 'unable to generate rocksdb bindings: ()', src/libcore/result.rs:999:5 note: Run with RUST_BACKTRACE=1 environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish... error: build failed

and this is my /usr/local/include/ appbase gd_errors.h graphviz libtasn1.h pcre2.h textstyle.h unistr.h autosprintf.h gd_io.h idn2.h libusb-1.0 pcre2posix.h tiff.h unistring boost gdbm.h jconfig.h lld pcre_scanner.h tiffconf.h unitypes.h bsoncxx gdcache.h jerror.h llvm pcre_stringpiece.h tiffio.h uniwbrk.h c++ gdfontg.h jmorecfg.h llvm-c pcrecpp.h tiffio.hxx uniwidth.h clang gdfontl.h jpeglib.h ltdl.h pcrecpparg.h tiffvers.h usbmuxd-proto.h clang-c gdfontmb.h libbson-1.0 lua pcreposix.h unicase.h usbmuxd.h entities.h gdfonts.h libc++ lua5.3 plist uniconv.h webp eosio.system gdfontt.h libimobiledevice lzma png.h unictype.h zip.h eosiolib gdfx.h libintl.h lzma.h pngconf.h unigbrk.h zipconf.h fontconfig gdpp.h libios_deploy.h mongocxx pnglibconf.h unilbrk.h freetype2 gettext-po.h libltdl musl polly uniname.h gd.h gmp.h libmongoc-1.0 node secp256k1.h uninorm.h gd_color_map.h gmpxx.h libpng16 pcre.h textstyle unistdio.h

skyh24 avatar Jul 09 '19 07:07 skyh24

ls /usr/local/include/


appbase            gd_errors.h        graphviz           libtasn1.h         pcre2.h            textstyle.h        unistr.h
autosprintf.h      gd_io.h            idn2.h             libusb-1.0         pcre2posix.h       tiff.h             unistring
boost              gdbm.h             jconfig.h          lld                pcre_scanner.h     tiffconf.h         unitypes.h
bsoncxx            gdcache.h          jerror.h           llvm               pcre_stringpiece.h tiffio.h           uniwbrk.h
c++                gdfontg.h          jmorecfg.h         llvm-c             pcrecpp.h          tiffio.hxx         uniwidth.h
clang              gdfontl.h          jpeglib.h          ltdl.h             pcrecpparg.h       tiffvers.h         usbmuxd-proto.h
clang-c            gdfontmb.h         libbson-1.0        lua                pcreposix.h        unicase.h          usbmuxd.h
entities.h         gdfonts.h          libc++             lua5.3             plist              uniconv.h          webp
eosio.system       gdfontt.h          libimobiledevice   lzma               png.h              unictype.h         zip.h
eosiolib           gdfx.h             libintl.h          lzma.h             pngconf.h          unigbrk.h          zipconf.h
fontconfig         gdpp.h             libios_deploy.h    mongocxx           pnglibconf.h       unilbrk.h
freetype2          gettext-po.h       libltdl            musl               polly              uniname.h
gd.h               gmp.h              libmongoc-1.0      node               secp256k1.h        uninorm.h
gd_color_map.h     gmpxx.h            libpng16           pcre.h             textstyle          unistdio.h

skyh24 avatar Jul 09 '19 07:07 skyh24

Try running

xcode-select --install

or

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

arkpar avatar Jul 09 '19 07:07 arkpar

You already reported it in the correct repo: https://github.com/rust-rocksdb/rust-rocksdb/issues/316 Will close it here, because it is not a bug of Substrate.

bkchr avatar Jul 09 '19 08:07 bkchr