You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there.
I use gcc version 8.1.0 (x86_64-posix-sjlj-rev0, Built by MinGW-W64 project) at first.
I failed to run "cargo run" in the instructions and got these errors.
PS E:\Documents\source\rust\hello> cargo run
Compiling hello v0.1.0 (E:\Documents\source\rust\hello)
error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
|
= note: "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-va" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsbegin.o" "E:\\Documents\\source\\rust\\hello\\target\\debug\\deps\\hello-77f9d87c52a665da.2gqdlf8f8gtgwb48.rcgu.o" "E:\\Documents\\source\\rust\\hello\\target\\debug\\deps\\hello-77f9d87c52a665da.2pg8ttz0es2f6a3w.rcgu.o" "E:\\Documents\\source\\rust\\hello\\target\\debug\\deps\\hello-77f9d87c52a665da.330p22tyija6tnq3.rcgu.o" "E:\\Documents\\source\\rust\\hello\\target\\debug\\deps\\hello-77f9d87c52a665da.34xpm6ntgnkmw9i3.rcgu.o" "E:\\Documents\\source\\rust\\hello\\target\\debug\\deps\\hello-77f9d87c52a665da.3dvcen0ak15jp1wb.rcgu.o" "E:\\Documents\\source\\rust\\hello\\target\\debug\\deps\\hello-77f9d87c52a665da.atxoafg6m4hfagr.rcgu.o" "E:\\Documents\\source\\rust\\hello\\target\\debug\\deps\\hello-77f9d87c52a665da.ax3z8lnuwmz4rkl.rcgu.o" "E:\\Documents\\source\\rust\\hello\\target\\debug\\deps\\hello-77f9d87c52a665da.i0jk5y12xey3ltv.rcgu.o" "E:\\Documents\\source\\rust\\hello\\target\\debug\\deps\\hello-77f9d87c52a665da.4wvnen60ldvov5rb.rcgu.o" "-L" "E:\\Documents\\source\\rust\\hello\\target\\debug\\deps" "-L" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,--start-group" "-Wl,-Bstatic" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libstd-57e8ea4e1cfb36e3.rlib" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libpanic_unwind-d50ed3cb69dbfa89.rlib" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libobject-db8fbc6e4b507d8c.rlib" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libmemchr-2c2fe1d9eecdd835.rlib" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libaddr2line-8e620bb89415248d.rlib" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libgimli-50c1bebcf1938271.rlib" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libstd_detect-1df005efff689fb6.rlib" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librustc_demangle-7bd71b39d5dd92f1.rlib" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libhashbrown-79c4ada05aad6e88.rlib" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librustc_std_workspace_alloc-cfc3e2e8bead46d2.rlib" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libunwind-adc2f2a5afea326c.rlib" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcfg_if-d9c292e85ad6a944.rlib" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liblibc-fc23eff1f7c571db.rlib" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liballoc-2b42541821d9e283.rlib" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librustc_std_workspace_core-10202bb8c6593b6a.rlib" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcore-0e8789dc8677c5cb.rlib" "-Wl,--end-group" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcompiler_builtins-b7726d063fa88be4.rlib" "-Wl,-Bdynamic" "-lkernel32" "-lws2_32" "-lbcrypt" "-ladvapi32" "-luserenv" "-lkernel32" "-lgcc_eh" "-l:libpthread.a" "-lmsvcrt" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-luser32" "-lkernel32" "-Wl,--nxcompat" "-L" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-o" "E:\\Documents\\source\\rust\\hello\\target\\debug\\deps\\hello-77f9d87c52a665da.exe" "-Wl,--gc-sections" "-no-pie" "-nodefaultlibs" "C:\\Users\\xxxx\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsend.o"
= note: E:\Documents\source\rust\hello\target\debug\deps\hello-77f9d87c52a665da.34xpm6ntgnkmw9i3.rcgu.o: In function `core::ops::function::FnOnce::call_once':
/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\core\src\ops/function.rs:227: undefined reference to `_Unwind_Resume'
E:\Documents\source\rust\hello\target\debug\deps\hello-77f9d87c52a665da.atxoafg6m4hfagr.rcgu.o: In function `std::sys_common::backtrace::__rust_begin_short_backtrace':
/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\std\src\sys_common/backtrace.rs:119: undefined reference to `_Unwind_Resume'
C:\Users\xxxx\.rustup\toolchains\stable-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib\libstd-57e8ea4e1cfb36e3.rlib(std-57e8ea4e1cfb36e3.std.0253c85e-cgu.0.rcgu.o): In function `alloc::collections::btree::mem::replace':
/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\alloc\src\collections\btree/mem.rs:35: undefined reference to `_Unwind_Resume'
C:\Users\xxxx\.rustup\toolchains\stable-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib\libstd-57e8ea4e1cfb36e3.rlib(std-57e8ea4e1cfb36e3.std.0253c85e-cgu.0.rcgu.o): In function `<std::backtrace::BytesOrWide as core::fmt::Debug>::fmt':
/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\/library\std\src/backtrace.rs:247: undefined reference to `_Unwind_Resume'
C:\Users\xxxx\.rustup\toolchains\stable-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib\libstd-57e8ea4e1cfb36e3.rlib(std-57e8ea4e1cfb36e3.std.0253c85e-cgu.0.rcgu.o): In function `core::ops::function::FnOnce::call_once':
/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\core\src\ops/function.rs:227: undefined reference to `_Unwind_Resume'
C:\Users\xxxx\.rustup\toolchains\stable-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib\libstd-57e8ea4e1cfb36e3.rlib(std-57e8ea4e1cfb36e3.std.0253c85e-cgu.0.rcgu.o):/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\/library\std\src/backtrace.rs:485: more undefined references to `_Unwind_Resume' follow
C:\Users\xxxx\.rustup\toolchains\stable-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib\libpanic_unwind-d50ed3cb69dbfa89.rlib(panic_unwind-d50ed3cb69dbfa89.panic_unwind.9edbbfc2-cgu.0.rcgu.o): In function `panic_unwind::real_imp::panic':
/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\/library\panic_unwind\src/gcc.rs:62: undefined reference to `_Unwind_RaiseException'
C:\Users\xxxx\.rustup\toolchains\stable-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib\libpanic_unwind-d50ed3cb69dbfa89.rlib(panic_unwind-d50ed3cb69dbfa89.panic_unwind.9edbbfc2-cgu.0.rcgu.o): In function `rust_eh_personality':
/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\/library\panic_unwind\src/gcc.rs:273: undefined reference to `_GCC_specific_handler'
C:\Users\xxxx\.rustup\toolchains\stable-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib\libobject-db8fbc6e4b507d8c.rlib(object-db8fbc6e4b507d8c.object.f268efff-cgu.0.rcgu.o):object.f268efff-cg:(.text+0x1b4a): undefined reference to `_Unwind_Resume'
C:\Users\xxxx\.rustup\toolchains\stable-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib\libobject-db8fbc6e4b507d8c.rlib(object-db8fbc6e4b507d8c.object.f268efff-cgu.0.rcgu.o):object.f268efff-cg:(.text+0x25b7): undefined reference to `_Unwind_Resume'
C:\Users\xxxx\.rustup\toolchains\stable-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib\libgimli-50c1bebcf1938271.rlib(gimli-50c1bebcf1938271.gimli.8148d4e3-cgu.0.rcgu.o):gimli.8148d4e3-cgu:(.text+0x73e): undefined reference to `_Unwind_Resume'
C:\Users\xxxx\.rustup\toolchains\stable-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib\libgimli-50c1bebcf1938271.rlib(gimli-50c1bebcf1938271.gimli.8148d4e3-cgu.0.rcgu.o):gimli.8148d4e3-cgu:(.text+0x2b99): undefined reference to `_Unwind_Resume'
C:\Users\xxxx\.rustup\toolchains\stable-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib\libgimli-50c1bebcf1938271.rlib(gimli-50c1bebcf1938271.gimli.8148d4e3-cgu.0.rcgu.o):gimli.8148d4e3-cgu:(.text+0x2c26): undefined reference to `_Unwind_Resume'
C:\Users\xxxx\.rustup\toolchains\stable-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib\libgimli-50c1bebcf1938271.rlib(gimli-50c1bebcf1938271.gimli.8148d4e3-cgu.0.rcgu.o):gimli.8148d4e3-cgu:(.text+0x2daf): more undefined references to `_Unwind_Resume' follow
collect2.exe: error: ld returned 1 exit status
= help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
error: could not compile `hello` due to previous error
Then I found a page saying that I should use SEH rather than SJLJ.
After installing the SEH version of GCC(x86_64-8.1.0-posix-seh-rt_v6-rev0), the "cargo run" works fine.
PS E:\Documents\source\rust\hello> cargo run
Compiling hello v0.1.0 (E:\Documents\source\rust\hello)
Finished dev [unoptimized + debuginfo] target(s) in 0.99s
Running `target\debug\hello.exe`
Hello, world!
Is this a bug?
The text was updated successfully, but these errors were encountered:
Hi there.
I use gcc version 8.1.0 (x86_64-posix-sjlj-rev0, Built by MinGW-W64 project) at first.
I failed to run "cargo run" in the instructions and got these errors.
Then I found a page saying that I should use SEH rather than SJLJ.
After installing the SEH version of GCC(x86_64-8.1.0-posix-seh-rt_v6-rev0), the "cargo run" works fine.
Is this a bug?
The text was updated successfully, but these errors were encountered: