Further GCC Cross compiler errors

Programming, for all ages and all languages.
Post Reply
halofreak1990
Member
Member
Posts: 41
Joined: Thu Aug 09, 2012 5:10 am

Further GCC Cross compiler errors

Post by halofreak1990 »

I, too, am having difficulties building a cross-compiler.
I've followed the article in the wiki to the letter, but when I try to compile binutils, I get these errors:

Code: Select all

cp ../../binutils-2.22/ld/emultempl/astring.sed stringify.sed
LIB_PATH='' /bin/sh ../../binutils-2.22/ld/genscripts.sh "../../binutils-2.22/ld
" "/usr/local/cross/lib" "/usr/local/cross" "/usr/local/cross" i686-pc-cygwin i5
86-pc-elf i586-elf "elf_i386" "/usr/local/lib /lib /usr/lib" no no elf_i386 "i58
6-elf"
sed: kan bestand stringify.sed niet openen: Permission denied
sed: kan bestand stringify.sed niet openen: Permission denied
sed: kan bestand stringify.sed niet openen: Permission denied
sed: kan bestand stringify.sed niet openen: Permission denied
sed: kan bestand stringify.sed niet openen: Permission denied
sed: kan bestand stringify.sed niet openen: Permission denied
sed: kan bestand stringify.sed niet openen: Permission denied
sed: kan bestand stringify.sed niet openen: Permission denied
sed: kan bestand stringify.sed niet openen: Permission denied
sed: kan bestand stringify.sed niet openen: Permission denied
sed: kan bestand stringify.sed niet openen: Permission denied
sed: kan bestand stringify.sed niet openen: Permission denied
sed: kan bestand stringify.sed niet openen: Permission denied
source='eelf_i386.c' object='eelf_i386.o' libtool=no \
DEPDIR=.deps depmode=none /bin/sh ../../binutils-2.22/ld/../depcomp \
gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.22/ld  -I. -I../../binutils-2.22/ld -
I../bfd -I../../binutils-2.22/ld/../bfd -I../../binutils-2.22/ld/../include   -g
 -O2 -DENABLE_PLUGINS  -DLOCALEDIR="\"/usr/local/cross/share/locale\""   -W -Wal
l -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c eelf_i386.c
../../binutils-2.22/ld/emultempl/elf32.em: In function `gldelf_i386_get_script':

../../binutils-2.22/ld/emultempl/elf32.em:1995: let op: `return' with no value,in function returning non-void
../../binutils-2.22/ld/emultempl/elf32.em:1996: let op: `return' with no value,in function returning non-void
../../binutils-2.22/ld/emultempl/elf32.em:1997: let op: `return' with no value,in function returning non-void
../../binutils-2.22/ld/emultempl/elf32.em:1998: let op: `return' with no value,in function returning non-void
../../binutils-2.22/ld/emultempl/elf32.em:2001: let op: `return' with no value,in function returning non-void
../../binutils-2.22/ld/emultempl/elf32.em:2002: let op: `return' with no value,in function returning non-void
../../binutils-2.22/ld/emultempl/elf32.em:2003: let op: `return' with no value,in function returning non-void
../../binutils-2.22/ld/emultempl/elf32.em:2006: let op: `return' with no value,in function returning non-void
../../binutils-2.22/ld/emultempl/elf32.em:2007: let op: `return' with no value,in function returning non-void
../../binutils-2.22/ld/emultempl/elf32.em:2008: let op: `return' with no value,in function returning non-void
../../binutils-2.22/ld/emultempl/elf32.em:2010: let op: `return' with no value,in function returning non-void
../../binutils-2.22/ld/emultempl/elf32.em:2011: let op: `return' with no value,in function returning non-void
../../binutils-2.22/ld/emultempl/elf32.em:2012: let op: `return' with no value,in function returning non-void
Makefile:1419: recipe for target `eelf_i386.o' failed
make[4]: *** [eelf_i386.o] Error 1
make[4]: Map '/usr/src/build-binutils/ld' wordt verlaten
Makefile:1642: recipe for target `all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Map '/usr/src/build-binutils/ld' wordt verlaten
Makefile:910: recipe for target `all' failed
make[2]: *** [all] Error 2
make[2]: Map '/usr/src/build-binutils/ld' wordt verlaten
Makefile:7015: recipe for target `all-ld' failed
make[1]: *** [all-ld] Error 2
make[1]: Map '/usr/src/build-binutils' wordt verlaten
Makefile:842: recipe for target `all' failed
make: *** [all] Error 2
I'm building this using Cygwin, on a 32-bit Windows 7 machine.
<PixelToast> but i cant mouse

Porting is good if you want to port, not if you want maximum quality. -- sortie
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: GCC Cross compiler errors

Post by Combuster »

Permission denied
Have you tried running with administrator privileges?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
halofreak1990
Member
Member
Posts: 41
Joined: Thu Aug 09, 2012 5:10 am

Re: GCC Cross compiler errors

Post by halofreak1990 »

Combuster wrote:
Permission denied
Have you tried running with administrator privileges?
Yeah, I should've guessed that was the problem. Though I'm curious... I've compiled many things with cygwin before, and I never needed it to be run with admin privileges. Why now?

Thanks anyway.
<PixelToast> but i cant mouse

Porting is good if you want to port, not if you want maximum quality. -- sortie
halofreak1990
Member
Member
Posts: 41
Joined: Thu Aug 09, 2012 5:10 am

Re: Further GCC Cross compiler errors

Post by halofreak1990 »

One of my development machines is now running a 64-bit Windows 8, and of course the previously compiled cross compiler no longer works.
However, re-doing all the steps in the Cross-compiler tutorials doesn't produce a working environment.
Binutils compiles fine, but during the compilation of GCC, I run into the following errors:

Code: Select all

Configuring in ./fixincludes
configure: loading cache ./config.cache
configure: error: `target_alias' has changed since the previous run:
configure:   former value:  `i686-pc-cygwin'
configure:   current value: `i586-elf'
configure: error: in `/usr/src/build-gcc/fixincludes':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
Makefile:3236: recipe for target `configure-fixincludes' failed
make: *** [configure-fixincludes] Error 1
I have not changed anything between running

Code: Select all

cd /usr/src/build-binutils
../binutils-x.xx/configure --target=$TARGET --prefix=$PREFIX --disable-nls
make all
make install
and the build of GCC, yet, for some reason, it seems as though my target gets changed.
<PixelToast> but i cant mouse

Porting is good if you want to port, not if you want maximum quality. -- sortie
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Re: GCC Cross compiler errors

Post by qw »

halofreak1990 wrote:Yeah, I should've guessed that was the problem. Though I'm curious... I've compiled many things with cygwin before, and I never needed it to be run with admin privileges. Why now?
I don't have the answer to that question but I did have the same problem once: Solved problem building cross compiler.
halofreak1990
Member
Member
Posts: 41
Joined: Thu Aug 09, 2012 5:10 am

Re: Further GCC Cross compiler errors

Post by halofreak1990 »

I finally managed to compile GCC. I re-ran cygwin setup, reinstalled the required libs and updated some programs, and that produced a working GCC, but now I get a different error when trying to compile my kernel, namely:

Code: Select all

 /usr/local/cross/bin/i586-elf-ld.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
This is the exact error that made me recompile my GCC previously. (I had simply copied it over from my 32-bit machine, hoping it would work on 64-bit also)


EDIT: Running GCC from cmd showed that it couldn't find cygwin1.dll
After adding the cygwin bin directory to my PATH the error went away.
<PixelToast> but i cant mouse

Porting is good if you want to port, not if you want maximum quality. -- sortie
Post Reply