Skip to content

Rust is failing to build on i686-pc-mingw32 #10893

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
cnd opened this issue Dec 10, 2013 · 15 comments · Fixed by #11590
Closed

Rust is failing to build on i686-pc-mingw32 #10893

cnd opened this issue Dec 10, 2013 · 15 comments · Fixed by #11590
Labels
O-windows Operating system: Windows

Comments

@cnd
Copy link
Contributor

cnd commented Dec 10, 2013

llvm[3]: ======= Finished Linking Release+Asserts Executable yaml2obj (without symbols)
make[3]: Leaving directory `/d/Heather/Contrib/P/rust/i686-pc-mingw32/llvm/tools/yaml2obj'
make[3]: Entering directory `/d/Heather/Contrib/P/rust/i686-pc-mingw32/llvm/tools/llvm-c-test'
llvm[3]: Compiling calc.c for Release+Asserts build
llvm[3]: Compiling disassemble.c for Release+Asserts build
llvm[3]: Compiling helpers.c for Release+Asserts build
llvm[3]: Compiling include-all.c for Release+Asserts build
In file included from d:/Heather/Contrib/P/rust/src/llvm/tools/llvm-c-test/include-all.c:33:0:
d:/Heather/Contrib/P/rust/src/llvm/include/llvm-c/lto.h:158:54: error: unknown type name 'off_t'
                                     size_t map_size, off_t offset);
                                                      ^
/usr/bin/rm: cannot lstat `/d/Heather/Contrib/P/rust/i686-pc-mingw32/llvm/tools/llvm-c-test/Release+
Asserts/include-all.d.tmp': No such file or directory
make[3]: *** [/d/Heather/Contrib/P/rust/i686-pc-mingw32/llvm/tools/llvm-c-test/Release+Asserts/inclu
de-all.o] Error 1
make[3]: Leaving directory `/d/Heather/Contrib/P/rust/i686-pc-mingw32/llvm/tools/llvm-c-test'
make[2]: *** [llvm-c-test/.makeall] Error 2
make[2]: Leaving directory `/d/Heather/Contrib/P/rust/i686-pc-mingw32/llvm/tools'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/d/Heather/Contrib/P/rust/i686-pc-mingw32/llvm'
make: *** [/d/Heather/Contrib/P/rust/i686-pc-mingw32/llvm/Release+Asserts/bin/llvm-config.exe] Error
 2
@cnd
Copy link
Contributor Author

cnd commented Dec 11, 2013

Today error :

cp: i686-pc-mingw32/stage2/bin/rustrt.lib
cp: i686-pc-mingw32/stage2/bin/std.dll
warning: removing previous 'std-*.dll' libraries: i686-pc-mingw32/stage2/bin//std-6425b930ca146ae9-0
.9-pre.dll
warning: removing previous 'libstd-*.rlib' libraries: i686-pc-mingw32/stage2/bin//libstd-6425b930ca1
46ae9-0.9-pre.rlib
cp: cannot stat `i686-pc-mingw32/stage1/bin/rustc/i686-pc-mingw32/bin/libstd-6425b930ca146ae9-0.9-pr
e.rlib': No such file or directory
make: *** [i686-pc-mingw32/stage2/bin/std.dll] Error 1

@klutzy
Copy link
Contributor

klutzy commented Dec 12, 2013

I've heard the off_t error from IRC: lto.h misses #include <sys/types.h>, but invoking make again seems to work well.

@cnd
Copy link
Contributor Author

cnd commented Dec 12, 2013

Yes I just successfully build it today, thanks

@cnd cnd closed this as completed Dec 12, 2013
@klutzy
Copy link
Contributor

klutzy commented Dec 12, 2013

@Heather I think the first off_t error is significant and should be fixed (no need to re-make). Could you reopen it?

@cnd
Copy link
Contributor Author

cnd commented Dec 12, 2013

@klutzy wait... but it's building without errors for me now...

Do you mean it's working only because I run build second time?

@klutzy
Copy link
Contributor

klutzy commented Dec 12, 2013

@Heather llvm build is triggered only if you haven't built it before or llvm has been upgraded.
So I guess llvm fails to complete, but it anyway succeeded to make some binary we use.

@cnd
Copy link
Contributor Author

cnd commented Dec 12, 2013

@klutzy I will try to reproduce with clean build

@cnd
Copy link
Contributor Author

cnd commented Dec 12, 2013

Right, it's still being failing if I build it first time ( or even if I remove i686-... (build) folder ) with the same error.

@cnd cnd reopened this Dec 12, 2013
@klutzy
Copy link
Contributor

klutzy commented Dec 18, 2013

@Heather What version of mingw/gcc did you use? grep VERSION /mingw/include/_mingw.h would show __MINGW32_VERSION and/or __MINGW_VERSION. (If both values exist, trust the second one.)

@cnd
Copy link
Contributor Author

cnd commented Dec 18, 2013

>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=d:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=mingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --e
nable-lto --enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32
-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gmp=/usr/src/pkg/gmp-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/
mpc-1.0.1-1-mingw32-src/bld --with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-libgomp --enable-threads --with-libiconv
-prefix=/mingw32 --with-libintl-prefix=/mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
Thread model: win32
gcc version 4.8.1 (GCC)

@klutzy
Copy link
Contributor

klutzy commented Dec 18, 2013

I also reproduced the error on mingw 4.0 / gcc 4.8.1.

@ameyp
Copy link

ameyp commented Dec 18, 2013

I'm having the same issue:

$ grep VERSION /mingw/include/_mingw.h
#define __MINGW_VERSION             4.0
#define __MINGW32_VERSION           3.20

$ gcc --version
gcc.exe (GCC) 4.8.1

@Kelet
Copy link

Kelet commented Dec 23, 2013

I'm also having this issue. Same version information as @ameyp.

@rwtaber
Copy link

rwtaber commented Jan 4, 2014

I am also getting the error. Same versions as ameyp. Any more info on this?

@vadimcn
Copy link
Contributor

vadimcn commented Jan 15, 2014

According to this thread, this error happens because this particular binary (llvm-c-test) is compiled with -std=c99 flag. Apparently 'off_t' is not in ANSI standard, so mingw's <sys/types.h> specifically omits it when __STRICT_ANSI__ is defined.

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
6 participants