Am Mon, 20 Nov 2000 schrieb Edmund Ng:
>
>However when I get to actually creating the cross compiler, I get the
>following error message:
>_muldi3
>../../gcc/libgcc2.c:41: stdlib.h: No such file or directory
>.../../gcc/libgcc2.c:42: unistd.h: No such file or directory
>mmake[1]: *** [libgcc2.a] Error 1
>make[1]: Leaving directory `/home/edmung/gnu/src/gcc-2.95.2/CROSS/gcc'
>make: *** [all-gcc] Error 2
I had the same error when building cross-gcc for Linux-mingw32 some time ago.
I solved it by creating a symlink to the missing headerfiles in some directory.
I don't remeber the exact position I put the symlinks in - Sorry.
Ciao,
Franco
>I had downloaded the files and just upzip them so I cannot understand
>why the files stdlib.h and snistd.h would not be included.
>in gcc. Anyone?
>
>
>
>Thanx in advance,
>
>
>Edmund

Edmund Ng wrote:
>
> I am a newbie trying to cross compile using mingw on Solaris 2.5.1 to
> Window's NT 4. I'm in the process of creating a cross compiler and hit
> some snags.
>
> However when I get to actually creating the cross compiler, I get the
> following error message:
>
> /home/edmung/gnu/src/gcc-2.95.2/CROSS/gcc/xgcc
> -B/home/edmung/gnu/src/gcc-2.95.2/CROSS/gcc/
> -B/home/edmung/gnu/i386-mingw32/bin/
> -I/home/edmung/gnu/i386-mingw32/include -O2
The last two rows say where your Mingw binutils and includes
SHOULD be, if you did as the 'gcc/INSTALL' in the GCC-sources
(please search for "Cross-Compiler" there) told.
We can see that you used '--prefix=/home/edmung/gnu' and
'--target=i386-mingw32' when configuring. The given $(prefix)
and $(target) decide the install directory, '$(prefix)/$(target)',
so the only problem is whether you followed the instructions or
not...
BTW, the '-B' and '-I' are necessary because of the relative
search paths, the '$(prefix)/lib/gcc-lib/$(target)/2.95.2'
doesn't yet exist while building, but the search paths go
through it!!! The '-L/home/edmung/gnu/i386-mingw32/lib' for the
target libs is however still missing... (Building 'libiberty'
may still fail...)
The work-around is :
Pre-create the the '$(prefix)/lib/gcc-lib/$(target)/2.95.2'.
Then everything should be found using the internal search paths.
> _muldi3
> ../../gcc/libgcc2.c:41: stdlib.h: No such file or directory
> ../../gcc/libgcc2.c:42: unistd.h: No such file or directory
> make[1]: *** [libgcc2.a] Error 1
>
> I had downloaded the files and just upzip them so I cannot understand
> why the files stdlib.h and snistd.h would not be included.
> in gcc. Anyone?
Where on earth you unzipped the 'i386-mingw32'-stuff, if not
into the $(prefix) of your own choice ('/home/edmung/gnu') ?
Cheers, Kai