skade / leveldb-sys

MIT License
7 stars 15 forks source link

Compilation error on macOS #10

Closed mre closed 5 years ago

mre commented 5 years ago

Getting the following compilation error on macOS 10.14.4:

❯❯❯ RUST_BACKTRACE=1 cargo build                                                                                                                                                                       
warning: An explicit [[test]] section is specified in Cargo.toml which currently
disables Cargo from automatically inferring other test targets.
This inference behavior will change in the Rust 2018 edition and the following
files will be included as a test target:

* /private/tmp/leveldb/tests/cache.rs
* /private/tmp/leveldb/tests/database.rs
* /private/tmp/leveldb/tests/comparator.rs
* /private/tmp/leveldb/tests/snapshots.rs
* /private/tmp/leveldb/tests/binary.rs
* /private/tmp/leveldb/tests/writebatch.rs
* /private/tmp/leveldb/tests/concurrent_access.rs
* /private/tmp/leveldb/tests/management.rs
* /private/tmp/leveldb/tests/compaction.rs
* /private/tmp/leveldb/tests/utils.rs
* /private/tmp/leveldb/tests/iterator.rs

This is likely to break cargo build or cargo test as these files may not be
ready to be compiled as a test target today. You can future-proof yourself
and disable this warning by adding `autotests = false` to your [package]
section. You may also move the files to a location where Cargo would not
automatically infer them to be a target, such as in subfolders.

For more information on this warning you can consult
https://github.com/rust-lang/cargo/issues/5330
   Compiling leveldb-sys v2.0.3
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:347:21
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::_print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
   6: std::panicking::continue_panic_fmt
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::panicking::panic
  10: <rustc_codegen_llvm::back::archive::LlvmArchiveBuilder as rustc_codegen_ssa::back::archive::ArchiveBuilder>::build
  11: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::join_codegen_and_link::{{closure}}
  12: rustc::util::common::time
  13: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::join_codegen_and_link
  14: rustc_interface::queries::Query<T>::compute
  15: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::link
  16: rustc_interface::interface::run_compiler_in_existing_thread_pool
  17: std::thread::local::LocalKey<T>::with
  18: scoped_tls::ScopedKey<T>::set
  19: syntax::with_globals
query stack during panic:
end of query stack

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.36.0 (a53f9df32 2019-07-03) running on x86_64-apple-darwin

note: compiler flags: -C debuginfo=2 --crate-type lib

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `leveldb-sys`.

To learn more, run the command again with --verbose.

Installed the dependencies like this before:

brew install snappy leveldb

As a side note, building leveldb-sys (v2.0.3) works.

mre commented 5 years ago

Sorry, wrong repo. Moved here.