Page 1 of 1

why gcc-4.6.1 cross compilation give stdio.h error message

Posted: Wed Feb 25, 2015 4:22 am
by hitlar
Error: -
In file included from ../../../gcc-4.6.1/libgcc/../gcc/libgcc2.c:29:0:
../../../gcc-4.6.1/libgcc/../gcc/tsystem.h:87:19: fatal error: stdio.h: No such file or directory

when i gcc-4.6.1 cross compilation on fedora-20 it gives above error message, how can i resolve it, my procedure -

mkdir /root/mingw

copy packges in /root/mingw
binutils-2.21.1 gcc-4.6.1 w32api-3.17-2-mingw32-dev mingwrt-3.18-mingw32-dev

cd binutils-2.21.1
./configure --prefix=/home/shine --target=i586-mingw
make
make install

copy lib include share directory of w32api-3.17-2-mingw32-dev mingwrt-3.18-mingw32-dev into /home/shine/mingw
mkdir gcc_obj
cd gcc_obj

../gcc-4.6.1/configure --prefix=/home/shine --target=i586-mingw --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath --disable-target-libiberty --disable-target-zlib --enable-languages=c,c++ --without-ppl --without-cloog --with-headers=/home/shine/mingw/include --with-libs=/home/shine/mingw/lib --with-as=/home/shine/bin/i586-mingw-as --with-ld=/home/shine/bin/i586-mingw-ld --enable-sjlj-exceptions --enable-version-specific-runtime-libs
make

above error message comes when make run

Re: why gcc-4.6.1 cross compilation give stdio.h error messa

Posted: Wed Feb 25, 2015 5:21 am
by Combuster
The first thing is that you're not making a crosscompiler usable for OS development, but rather one that makes windows binaries on a linux machine. You're also unnecessarily using the unix root account.

Depending on what you really want, you might be better off asking the mingw community instead.