-
Notifications
You must be signed in to change notification settings - Fork 57
LLVM ERROR: Program used external function '___morestack_addr' which could not be resolved! #14
Comments
This seems very odd. I'll need more information about your setup. |
rustc 1.0.0-nightly (3ef8ff1f8 2015-02-12 00:38:24 +0000) |
Have you been able to get rusti to compile before or is this your first attempt? |
I successfully compiled and used earlier versions of Rusti. I suppose I'll just have to hope that this strange error will go away by itself in later versions. If you wish, I can close the issue. |
The error is still occurring in the latest version, so I'm reopening this. |
On version |
This bug still live on nightly
seems lowks has asked this problem before |
Inserting
|
@durka: That is very strange. I never understood why this error was happening in the first place. It seems to me that |
Yeah, it doesn't make any sense to me either since by the time |
Do we know where in rusti's code the LLVM ERROR occurs? It's certainly not at the |
There are only a few calls to the LLVM API from rusti. I would guess it's when the ExecutionEngine is built (with an empty LLVM Module created by the rustc API). Running rusti with env var |
|
But |
@murarth I assume you've seen this https://users.rust-lang.org/t/why-is-my-rust-broken-26-02-2015-build/492 |
Okay, I was wrong. It looks like the initial construction goes fine. (The first "loading crate" message isn't immediately followed by an error.) There's not another log message there to make it clear, but it seems that That link is interesting. It would appear that |
Yeah... but it isn't? I tried changing |
It seems like it could be a Rust bug, in that |
I don't think adding the symbol to I'm not very knowledgeable about LLVM. I'm trying to get some insight into this on #rust-internals. |
Inserting #[export_name = "___morestack_addr"] also works for me. |
I'm working on a fix that I'll push to the Rust repo. This bug isn't the result of any rusti code, but rather the code in Rust's LLVM wrapper that builds the |
@Sarjo2222, @durka: Can you confirm that this issue is resolved in the latest nightly |
Verified on a Mac # uname -a
Darwin xxx 14.3.0 Darwin Kernel Version 14.3.0:Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
# cargo run --release
Compiling regex v0.1.30
Compiling libc v0.1.8
Compiling rand v0.3.8
Compiling log v0.3.1
Compiling getopts v0.2.11
Compiling tempfile v0.3.0
Compiling env_logger v0.3.1
Compiling rusti v0.0.1 (file:///Users/xxx/rust/rusti)
Running `target/release/rusti`
rusti=> 1+1
2
# cargo test --release
Compiling rusti v0.0.1 (file:///Users/xxx/rust/rusti)
Running target/release/exec-7afabf774ebc3dee
running 5 tests
test test_exec ... ignored
test test_static ... ignored
test test_static_mut ... ignored
test test_thread ... ignored
test test_thread_local ... ignored
test result: ok. 0 passed; 0 failed; 5 ignored; 0 measured
Running target/release/repl-2084aa6840fec652
running 5 tests
test test_rc ... ok
test test_file ... ok
test test_print ... ok
test test_type ... ok
test test_eval ... ok
test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured
Doc-tests rusti
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
# rustc -vV
rustc 1.2.0-nightly (2228ce10c 2015-06-09)
binary: rustc
commit-hash: 2228ce10c6d83c17b6346396aa7c7ef9082f1c04
commit-date: 2015-06-09
host: x86_64-apple-darwin
release: 1.2.0-nightly |
👍 |
Simple commands (e.g. 2 + 2, println!("Hello world")) result in "LLVM ERROR: Program used external function '___morestack_addr' which could not be resolved!
An unknown error occurred".
The text was updated successfully, but these errors were encountered: