Skip to content

run test.sh in mingw64 panic! #1197

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

Closed
unitsoftrover opened this issue Sep 2, 2021 · 9 comments
Closed

run test.sh in mingw64 panic! #1197

unitsoftrover opened this issue Sep 2, 2021 · 9 comments
Labels
O-windows Operating system: Windows

Comments

@unitsoftrover
Copy link

[mini_core_hello_world : codegen mono items] start
[mini_core_hello_world : codegen mono items] end time: 11.797544ms
thread 'rustc' panicked at 'can't resolve symbol _ZN9mini_core8A_STATIC17h1e90a401893c503aE', C:\Users\robinson.cargo\git\checkouts\wasmtime-41807828cb3a7a7e\9c550fc\cranelift\jit\src\backend.rs:288:21
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

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/bjorn3/rustc_codegen_cranelift/issues/new

note: rustc 1.56.0-nightly (29ef6cf16 2021-08-31) running on x86_64-pc-windows-gnu

note: compiler flags: -Z unstable-options -C debuginfo=2 -C llvm-args=mode=jit -C prefer-dynamic

query stack during panic:
end of query stack
warning: 1 warning emitted

@bjorn3
Copy link
Member

bjorn3 commented Sep 2, 2021

Try https://github.com/bjorn3/rustc_codegen_cranelift/pull/1195. This PR contains several windows fixes.

@bjorn3 bjorn3 added the O-windows Operating system: Windows label Sep 2, 2021
@unitsoftrover
Copy link
Author

I checkout the windows_fix branch. build fail.

Compiling cranelift-bforest v0.76.0 (https://github.com/bytecodealliance/wasmtime.git#9c550fcf)
Compiling regalloc v0.0.31
Compiling gimli v0.25.0
error[E0107]: this struct takes 2 generic arguments but 1 generic argument was supplied
--> C:\Users\robinson.cargo\registry\src\jiasu.xzqcsaa.nyc.mn-1ecc6299db9ec823\gimli-0.25.0\src\write\abbrev.rs:16:14
|
16 | abbrevs: IndexSet,
| ^^^^^^^^ ------------ supplied 1 generic argument
| |
| expected 2 generic arguments
|
note: struct defined here, with 2 generic parameters: T, S
--> C:\Users\robinson.cargo\registry\src\jiasu.xzqcsaa.nyc.mn-1ecc6299db9ec823\indexmap-1.7.0\src\set.rs:67:12
|
67 | pub struct IndexSet<T, S> {
| ^^^^^^^^ - -
help: add missing generic argument
|
16 | abbrevs: IndexSet<Abbreviation, S>,
| +++

error[E0107]: this struct takes 2 generic arguments but 1 generic argument was supplied
--> C:\Users\robinson.cargo\registry\src\jiasu.xzqcsaa.nyc.mn-1ecc6299db9ec823\gimli-0.25.0\src\write\cfi.rs:25:11
|
25 | cies: IndexSet,
| ^^^^^^^^ ---------------------- supplied 1 generic argument
| |
| expected 2 generic arguments

@bjorn3
Copy link
Member

bjorn3 commented Sep 2, 2021

Huh, compilation succeeds on CI.

@unitsoftrover
Copy link
Author

when could the cranelift run in windows?
I want to use Rust to improve ERP system speed, but the Rust compile too slowly. even use the Diesel-ORM when table fields number more than 32, every compile time long than a minute. I think the rustc_codegen_cranelift can solve the compile problem.
btw, how long do you compile rust program offen?

@bjorn3
Copy link
Member

bjorn3 commented Sep 2, 2021

btw, how long do you compile rust program offen?

This depends on the program. Some programs stress the backend more, while others the frontend. This project only replaces part of the backend and as such doesn't help much when most of the time is spent in the frontend.

I want to use Rust to improve ERP system speed, but the Rust compile too slowly. even use the Diesel-ORM when table fields number more than 32, every compile time long than a minute. I think the rustc_codegen_cranelift can solve the compile problem.

I guess Diesel is rather heavy in the frontend, but I am not sure. How long does cargo check take on your program? This only runs the frontend and as such is the absolute lower bound on how long it will take to compile with cg_clif.

when could the cranelift run in windows?

Not sure. I don't use windows myself and wine at least in the version I have doesn't implement an api required by cargo, so I can't easily test it locally.

@unitsoftrover
Copy link
Author

I read the Diesel source code and write a new driver to odbc. I find compile very slow is subjected to macro. rust macro is very powerful but waste compiling time. every time modify some words and compile, then waiting about a minute.
can cranelift save macro compilation time?

@bjorn3
Copy link
Member

bjorn3 commented Sep 2, 2021

It should save on the time it takes to compile the macro itself.

@unitsoftrover
Copy link
Author

ok, thanks very much.

@bjorn3
Copy link
Member

bjorn3 commented Sep 1, 2022

The thread 'rustc' panicked at 'can't resolve symbol _ZN9mini_core8A_STATIC17h1e90a401893c503aE' issue has been fixed by https://github.com/bjorn3/rustc_codegen_cranelift/pull/1273. There are still some windows issues, but they are being worked at.

@bjorn3 bjorn3 closed this as completed Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

2 participants