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

Build issue in running cargo test on macOS with librocksdb? #1355

Closed
laudiacay opened this issue Jan 7, 2022 · 3 comments · Fixed by #1398
Closed

Build issue in running cargo test on macOS with librocksdb? #1355

laudiacay opened this issue Jan 7, 2022 · 3 comments · Fixed by #1398
Labels

Comments

@laudiacay
Copy link
Contributor

Describe the bug

I think something is wrong with how we're including librocksdb in some dependency, because it's breaking

To Reproduce
Steps to reproduce the behavior:

  1. I run cargo test and I get this error.

Log output

Log Output
# laudiacay @ Claudias-MacBook-Pro in ~/pl-work/forest on git:main o [1:01:12] 
$ cargo test
  Compiling lru v0.7.2
  Compiling forest_json_utils v0.1.1 (/Users/laudiacay/pl-work/forest/utils/json_utils)
  Compiling forest_bigint v0.1.4 (/Users/laudiacay/pl-work/forest/utils/bigint)
  Compiling forest_hash_utils v0.1.0 (/Users/laudiacay/pl-work/forest/utils/hash_utils)
  Compiling fil_clock v0.1.0 (/Users/laudiacay/pl-work/forest/node/clock)
  Compiling librocksdb-sys v6.17.3
  Compiling forest_cid v0.3.0 (/Users/laudiacay/pl-work/forest/ipld/cid)
  Compiling libp2p-request-response v0.13.0-rc.1
error: could not find native static library `rocksdb`, perhaps an -L flag is missing?

The following warnings were emitted during compilation:

warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(db_impl_debug.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(db_impl_debug.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(memkind_kmem_allocator.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(thread_status_util_debug.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(sync_point_impl.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(block_cache_trace_analyzer.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(io_tracer_parser_tool.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(trace_analyzer_tool.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(db_impl_debug.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(memkind_kmem_allocator.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(thread_status_util_debug.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(sync_point_impl.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(block_cache_trace_analyzer.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(io_tracer_parser_tool.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(trace_analyzer_tool.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(db_impl_debug.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(memkind_kmem_allocator.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(thread_status_util_debug.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(sync_point_impl.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(block_cache_trace_analyzer.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(io_tracer_parser_tool.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/laudiacay/pl-work/forest/target/debug/build/librocksdb-sys-47144188043123e1/out/librocksdb.a(trace_analyzer_tool.o) has no symbols

error: could not compile `librocksdb-sys` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed

Expected behaviour

Screenshots

Environment (please complete the following information):

  • OS:
  • Rust version(e.g. rustc --version)
  • Branch/commit

Other information and links

@laudiacay laudiacay added the Bug label Jan 7, 2022
@bevanhunt
Copy link

I believe the problem is that rocksdb is version 0.15 in Forest and this patch went into 0.16 to support M1 Macs. rust-rocksdb/rust-rocksdb#503. Would you like me to submit a PR for the version bump to 0.16 or 0.17 (latest)?

I tried building on my Mac Mini 2018 (Intel) on Monterey 12.2 Beta and cargo test worked without changes.

@clearloop
Copy link
Contributor

clearloop commented Jan 25, 2022

cargo test with 1aec44b passed on my mac

2:31PM system_profiler SPHardwareDataType                                                                                                                                                                                                                                01.25
Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro17,1
      Chip: Apple M1
      Total Number of Cores: 8 (4 performance and 4 efficiency)
      Memory: 16 GB
      System Firmware Version: 6723.140.2
      OS Loader Version: 6723.140.2

@bevanhunt
Copy link

Can confirm with 1aec44b cargo test passed on my new Mac.

 Model Name:	Mac mini
  Model Identifier: Macmini9,1
  Chip: Apple M1
  Total Number of Cores: 8 (4 performance and 4 efficiency)
  Memory: 16 GB
  System Firmware Version: 7429.81.3
  OS Loader Version: 7429.81.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants