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

Tantivy compile error #733

Closed
joepio opened this issue Dec 7, 2023 · 0 comments
Closed

Tantivy compile error #733

joepio opened this issue Dec 7, 2023 · 0 comments

Comments

@joepio
Copy link
Member

joepio commented Dec 7, 2023

Just released atomic-server v0.36.1 and tried to cargo install it, but then got the error below.

It only happens when doing a --release build.

Seems to come from tantivy + latest rust stable version.

see rust issue

JUST USE NIGHTLY OR AN OLDER VERSION OF RUSTC

error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in Item(DefId(0:7908 ~ tantivy[6942]::store::reader::{impl#3}::iter_raw::{closure#2})) (after phase change to runtime-optimized) at bb2[6]:
                                Alias(Opaque, AliasTy { args: [ReErased], def_id: DefId(0:18076 ~ tantivy[6942]::store::reader::{impl#3}::block_checkpoints::{opaque#0}) }) does not have fields
  --> /Users/joep/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:52:9
   |
52 |         self.inner.next()
   |         ^^^^^^^^^^
   |
note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:94:25
         0: std::backtrace::Backtrace::create
         1: <rustc_errors::HandlerInner>::emit_diagnostic
         2: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, alloc::string::String>
         3: <rustc_const_eval::transform::validate::CfgChecker>::fail::<alloc::string::String>
         4: <rustc_const_eval::transform::validate::Validator as rustc_middle::mir::MirPass>::run_pass
         5: rustc_mir_transform::pass_manager::run_passes_inner
         6: rustc_mir_transform::optimized_mir
         7: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::optimized_mir::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
         8: <rustc_query_impl::query_impl::optimized_mir::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId)>>::call_once
         9: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
        10: rustc_query_impl::query_impl::optimized_mir::get_query_non_incr::__rust_end_short_backtrace
        11: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, rustc_middle::query::erase::Erased<[u8; 8]>>>
        12: <rustc_metadata::rmeta::encoder::EncodeContext>::encode_crate_root
        13: rustc_metadata::rmeta::encoder::encode_metadata_impl
        14: rustc_data_structures::sync::parallel::disabled::join::<rustc_metadata::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata::rmeta::encoder::encode_metadata::{closure#1}, (), ()>
        15: rustc_metadata::rmeta::encoder::encode_metadata
        16: rustc_metadata::fs::encode_and_write_metadata
        17: rustc_interface::passes::start_codegen
        18: <rustc_middle::ty::context::GlobalCtxt>::enter::<<rustc_interface::queries::Queries>::ongoing_codegen::{closure#0}, core::result::Result<alloc::boxed::Box<dyn core::any::Any>, rustc_span::ErrorGuaranteed>>
        19: <rustc_interface::queries::Queries>::ongoing_codegen
        20: rustc_span::set_source_map::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
        21: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
        22: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
        23: std::sys::unix::thread::Thread::new::thread_start
        24: __pthread_joiner_wake
  --> /Users/joep/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:52:9
   |
52 |         self.inner.next()
   |         ^^^^^^^^^^

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.74.0 (79e9716c9 2023-11-13) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no

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

query stack during panic:
end of query stack
error: could not compile `tantivy` (lib)
error: failed to compile `atomic-server v0.36.1`, intermediate artifacts can be found at `/var/folders/4j/nbs48t1s7l52fvv4vfnrrymw0000gp/T/cargo-installP0lS6N`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
@joepio joepio closed this as completed Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant