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
catch22 opened this issue
Oct 2, 2014
· 2 comments
· Fixed by #18797
Labels
A-driverArea: rustc_driver that ties everything together into the `rustc` compilerA-linkageArea: linking into static, shared libraries and binariesO-windowsOperating system: Windows
Building the hello world program fails with the following message:
error: linking with `gcc` failed: exit code: 1
note: gcc '-m64' [snip]
note: C:\Tools\Rust\bin\rustlib\x86_64-w64-mingw32\lib\libnative-4e7c5e5c.rlib(native-4e7c5e5c.o):(.text+0x89): undefined reference to `_Unwind_Resume'
C:\Tools\Rust\bin\rustlib\x86_64-w64-mingw32\lib\libnative-4e7c5e5c.rlib(native-4e7c5e5c.o):(.text+0x5bb): undefined reference to `_Unwind_Resume'
C:\Tools\Rust\bin\rustlib\x86_64-w64-mingw32\lib\libnative-4e7c5e5c.rlib(native-4e7c5e5c.o):(.text+0x12c8): undefined reference to `_Unwind_Resume'
C:\Tools\Rust\bin\rustlib\x86_64-w64-mingw32\lib\libnative-4e7c5e5c.rlib(native-4e7c5e5c.o):(.text+0x1396): undefined reference to `_Unwind_Resume'
C:\Tools\Rust\bin\rustlib\x86_64-w64-mingw32\lib\libnative-4e7c5e5c.rlib(native-4e7c5e5c.o):(.text+0x1463): undefined reference to `_Unwind_Resume'
C:\Tools\Rust\bin\rustlib\x86_64-w64-mingw32\lib\libnative-4e7c5e5c.rlib(native-4e7c5e5c.o):(.text+0x1781): more undefined references to `_Unwind_Resume' follow
c:/tools/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Tools\Rust\bin\rustlib\x86_64-w64-mingw32\lib\libnative-4e7c5e5c.rlib(native-4e7c5e5c.o): bad reloc address 0x0 in section `.data'
collect2.exe: error: ld returned 1 exit status
It appears that rustc picks up another MingW's version of ld rather than the one it ships with. The same error also appears if the rust binary directory is the first item in my PATH. The only way around it is to either remove my MingW's bin directory from the PATH or by prefixing rustlib/...mingw/gcc/bin to the PATH. Both solutions seem to be quite hackish -- I just wanted to check if this is the desired behavior.
The text was updated successfully, but these errors were encountered:
kmcallister
added
O-windows
Operating system: Windows
A-linkage
Area: linking into static, shared libraries and binaries
A-driver
Area: rustc_driver that ties everything together into the `rustc` compiler
labels
Oct 4, 2014
Based on Windows bundle feedback we got to date,
- We *do* want to prefer the bundled linker: The external one might be for the wrong architecture (e.g. 32 bit vs 64 bit). On the other hand, binutils don't add many new features these days, so using an older bundled linker is not likely to be a problem.
- We *do* want to prefer bundled libraries: The external ones might not have the symbols we expect (e.g. what's needed for DWARF exceptions vs SjLj). Since `-L rustlib/<triple>/lib` appears first on the linker command line, it's a good place to keep our platform libs that we want to be found first.
Closes#18325, closes#17726.
A-driverArea: rustc_driver that ties everything together into the `rustc` compilerA-linkageArea: linking into static, shared libraries and binariesO-windowsOperating system: Windows
Building the hello world program fails with the following message:
It appears that rustc picks up another MingW's version of
ld
rather than the one it ships with. The same error also appears if the rust binary directory is the first item in my PATH. The only way around it is to either remove my MingW'sbin
directory from the PATH or by prefixingrustlib/...mingw/gcc/bin
to the PATH. Both solutions seem to be quite hackish -- I just wanted to check if this is the desired behavior.The text was updated successfully, but these errors were encountered: