Windows 32 bits nightlies fail to compile a simple hello world #17251
Closed
Description
opened on Sep 14, 2014
This is probably due to the fact that MinGW is now packaged in rustc. These are the first nightlies where this is the case.
Version: rustc 0.12.0-pre-nightly (ccae356ac 2014-09-12 23:30:54 +0000)
Note: This is on the 32 bits nightlies. It may also happen in the 64 bits nightlies, but I couldn't test it because of #13501 (comment)
cargo new test --bin
cd test
cargo build
Fails with:
error: linking with `gcc` failed: exit code: 1
note: gcc '-m32' '-L' 'C:\Compilation\Rust\bin\rustlib\i686-pc-mingw32\lib' '-o'
'C:\Users\Tomaka17\Projets\test\target\test.exe' 'C:\Users\Tomaka17\Projets\tes
t\target\test.o' '-Wl,--whole-archive' '-lmorestack' '-Wl,--no-whole-archive' '-
fno-lto' '-fno-use-linker-plugin' '-Wl,--gc-sections' '-shared-libgcc' '-Wl,--en
able-long-section-names' '-Wl,--nxcompat' '-Wl,--dynamicbase' '-Wl,--large-addre
ss-aware' 'C:\Compilation\Rust\bin\rustlib\i686-pc-mingw32\lib\libnative-4e7c5e5
c.rlib' 'C:\Compilation\Rust\bin\rustlib\i686-pc-mingw32\lib\libstd-4e7c5e5c.rli
b' 'C:\Compilation\Rust\bin\rustlib\i686-pc-mingw32\lib\libsync-4e7c5e5c.rlib' '
C:\Compilation\Rust\bin\rustlib\i686-pc-mingw32\lib\librustrt-4e7c5e5c.rlib' 'C:
\Compilation\Rust\bin\rustlib\i686-pc-mingw32\lib\librand-4e7c5e5c.rlib' 'C:\Com
pilation\Rust\bin\rustlib\i686-pc-mingw32\lib\libcollections-4e7c5e5c.rlib' 'C:\
Compilation\Rust\bin\rustlib\i686-pc-mingw32\lib\libunicode-4e7c5e5c.rlib' 'C:\C
ompilation\Rust\bin\rustlib\i686-pc-mingw32\lib\liballoc-4e7c5e5c.rlib' 'C:\Comp
ilation\Rust\bin\rustlib\i686-pc-mingw32\lib\liblibc-4e7c5e5c.rlib' 'C:\Compilat
ion\Rust\bin\rustlib\i686-pc-mingw32\lib\libcore-4e7c5e5c.rlib' '-L' 'C:\Users\T
omaka17\Projets\test\target' '-L' 'C:\Users\Tomaka17\Projets\test\target\deps' '
-L' 'C:\Users\Tomaka17\Projets\test\.rust' '-L' 'C:\Users\Tomaka17\Projets\test'
'-L' 'C:\Users\Tomaka17\.rust' '-Wl,--whole-archive' '-Wl,-Bstatic' '-Wl,--no-w
hole-archive' '-Wl,-Bdynamic' '-lws2_32' '-lgcc_s' '-lcompiler-rt'
note: c:/compilation/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/lib/
crt2.o: In function `_mingw_CRTStartup':
e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\bld/../mingwrt-4.0.3-1-mingw32-src
/src/libcrt/crt/crt1.c:217: undefined reference to `__cpu_features_init'
c:/compilation/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/lib/crt2.o
: In function `mingw32_init_mainargs':
e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\bld/../mingwrt-4.0.3-1-mingw32-src
/src/libcrt/crt/init.c:260: undefined reference to `_CRT_glob'
c:/compilation/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/lib/crt2.o
: In function `_mingw_setargv':
e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\bld/../mingwrt-4.0.3-1-mingw32-src
/src/libcrt/crt/init.c:120: undefined reference to `_CRT_glob'
e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\bld/../mingwrt-4.0.3-1-mingw32-src
/src/libcrt/crt/init.c:155: undefined reference to `_CRT_glob'
e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\bld/../mingwrt-4.0.3-1-mingw32-src
/src/libcrt/crt/init.c:241: undefined reference to `__mingw_glob'
c:/compilation/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/lib/crt2.o
: In function `mingw32_init_fmode':
e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\bld/../mingwrt-4.0.3-1-mingw32-src
/src/libcrt/crt/crt1.c:84: undefined reference to `_CRT_fmode'
e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\bld/../mingwrt-4.0.3-1-mingw32-src
/src/libcrt/crt/crt1.c:101: undefined reference to `_CRT_fmode'
e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\bld/../mingwrt-4.0.3-1-mingw32-src
/src/libcrt/crt/crt1.c:105: undefined reference to `_CRT_fmode'
c:/compilation/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/lib/crt2.o
: In function `_mingw_setargv':
e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\bld/../mingwrt-4.0.3-1-mingw32-src
/src/libcrt/crt/init.c:214: undefined reference to `__mingw_glob'
e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\bld/../mingwrt-4.0.3-1-mingw32-src
/src/libcrt/crt/init.c:186: undefined reference to `_CRT_glob'
collect2.exe: error: ld returned 1 exit status
error: aborting due to previous error
Could not compile `test`.
To learn more, run the command again with --verbose.
Activity