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

Building a project using --release results in "LLVM Error: Broken function found" #1667

Closed
yorickpeterse opened this issue May 31, 2015 · 1 comment

Comments

@yorickpeterse
Copy link

To reproduce:

  1. git clone git@github.com:YorickPeterse/aeon.git
  2. cd aeon
  3. cargo build --release --verbose

This will result in the following output:

$ cargo build --release --verbose
   Compiling aeon v0.0.1 (file:///home/yorickpeterse/Private/Projects/rust/aeon)
     Running `rustc src/lib.rs --crate-name libaeon --crate-type lib -C opt-level=3 --out-dir /home/yorickpeterse/Private/Projects/rust/aeon/target/release --emit=dep-info,link -L dependency=/home/yorickpeterse/Private/Projects/rust/aeon/target/release -L dependency=/home/yorickpeterse/Private/Projects/rust/aeon/target/release/deps`
Attributes 'readnone and readonly' are incompatible!
void (%"2.core::result::Result<core::option::Option<alloc::rc::Rc<core::cell::RefCell<object::Object>>>, collections::string::String>"*, %"virtual_machine::VirtualMachine"*, i64, %"compiled_code::CompiledCode"*)* @"_ZN15virtual_machine28VirtualMachine$LT$$u27$l$GT$3run20hd9ac846594b29f06JraE"
LLVM ERROR: Broken function found, compilation aborted!
Could not compile `aeon`.

Caused by:
  Process didn't exit successfully: `rustc src/lib.rs --crate-name libaeon --crate-type lib -C opt-level=3 --out-dir /home/yorickpeterse/Private/Projects/rust/aeon/target/release --emit=dep-info,link -L dependency=/home/yorickpeterse/Private/Projects/rust/aeon/target/release -L dependency=/home/yorickpeterse/Private/Projects/rust/aeon/target/release/deps` (exit code: 1)

Rust version: rustc 1.0.0-dev (built 2015-05-17)
Cargo version: cargo 0.3.0-nightly (06dbe65 2015-05-29) (built 2015-05-29)
LLVM version: 3.5.2
Platform: Linux tuxbook 4.0.4-1-ARCH #1 SMP PREEMPT Mon May 18 06:43:19 CEST 2015 x86_64 GNU/Linux (Arch Linux)

@alexcrichton
Copy link
Member

Thanks for the report! This bug belongs on the rust-lang/rust repo, however, as this repo is just for Cargo itself (and this is perhaps a bug in the compiler). Also, could you try reducing the test case down to something smaller? It'll make it easier to fix!

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

2 participants