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

powerpc32: Expected no forward declarations! LLVM ERROR: Broken function found, compilation aborted! #41253

Closed
tonychain opened this issue Apr 12, 2017 · 7 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-PowerPC Target: PowerPC processors

Comments

@tonychain
Copy link

tonychain commented Apr 12, 2017

$ rustc --version
rustc 1.18.0-nightly (c58c928e6 2017-04-11)
$ cat /proc/cpuinfo
processor	: 0
cpu		: 7447A, altivec supported
clock		: 1499.999994MHz
revision	: 1.5 (pvr 8003 0105)

(that's a G4)

Here's an example of the error compiling rustc-serialize, but really it appears to be almost any crate. I've seen one crate (fake-simd) compile, but encounter this error on almost any others.

   Compiling rustc-serialize v0.3.23
     Running `rustc --crate-name rustc_serialize /home/tony/.cargo/registry/src/gh.neting.cc-eae4ba8cbf2ce1c7/rustc-serialize-0.3.23/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=77e9450ddf5d5cb1 -C extra-filename=-77e9450ddf5d5cb1 --out-dir /home/tony/src/test/rustseemodule/target/debug/deps -L dependency=/home/tony/src/test/rustseemodule/target/debug/deps --cap-lints allow`
Expected no forward declarations!
!2477 = <temporary!> !{}
LLVM ERROR: Broken function found, compilation aborted!
error: Could not compile `rustc-serialize`.

Caused by:
  process didn't exit successfully: `rustc --crate-name rustc_serialize /home/tony/.cargo/registry/src/gh.neting.cc-eae4ba8cbf2ce1c7/rustc-serialize-0.3.23/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=77e9450ddf5d5cb1 -C extra-filename=-77e9450ddf5d5cb1 --out-dir /home/tony/src/test/rustseemodule/target/debug/deps -L dependency=/home/tony/src/test/rustseemodule/target/debug/deps --cap-lints allow` (exit code: 1)

Sorry that's not a lot to go on, but I'm happy to provide any additional information you need to debug.

@alexcrichton alexcrichton added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-PowerPC Target: PowerPC processors labels Apr 12, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 27, 2017
@pkgw
Copy link
Contributor

pkgw commented Jan 28, 2018

I see this when running rustc on a fake PowerPC processor using qemu as well. The current nightly (rustc 1.25.0-nightly (7d6e5b9da 2018-01-27)) seems to succeed much more often than 1.24, but I still find crates where this error occurs repeatably.

@pkgw
Copy link
Contributor

pkgw commented Jan 28, 2018

Compiling in release mode avoids the problem for me.

@glaubitz
Copy link
Contributor

This seems to be the same as #50960.

@pkgw
Copy link
Contributor

pkgw commented Oct 27, 2018

Still happens with Rust 1.27.0, FWIW.

@glaubitz
Copy link
Contributor

Still happens with Rust 1.27.0, FWIW.

1.27.0 is too old. You will need at least 1.29.0, if I remember correctly. The bug was in LLVM and has been fixed, see #50960.

@pkgw
Copy link
Contributor

pkgw commented Oct 27, 2018

Thanks, that's helpful to know. Can't close this bug myself, but happy to see it closed if this is fixed — looks like you've been pretty involved in #50960 so happy to defer to you on that.

@sanxiyn
Copy link
Member

sanxiyn commented Mar 29, 2019

Closing, based on discussion at #50960.

@sanxiyn sanxiyn closed this as completed Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-PowerPC Target: PowerPC processors
Projects
None yet
Development

No branches or pull requests

6 participants