Crosstool 0.28 failure building mipsel on cygwin

Joel Sumner joel.sumner@ni.com
Wed Dec 29 21:38:00 GMT 2004


First of all, thanks to all of the folks who are trying to make building 
a gcc cross compiler easier. I told my coworkers that I was looking into 
building a gcc cross compiler and I got looks of amusement mixed with 
horror.  I've spent the last few days wrestling with old and obsolete 
instructions:

http://www.onkelinx.com/agenda/compiling_toolchain.html
http://www.village.org/villagers/imp/build.html
http://www.student.cs.uwaterloo.ca/~cs350/common/make-linux-gcc.html

or ones that have never been looked at on cygwin

http://openwrt.org/userguide.html
http://www.singingtree.com/~mikey/linksys-firmware.html
http://cmeerw.org/dev/node/125
http://openwrt.org/forum/viewtopic.php?t=15&highlight=build

So imagine my surprise to find crosstool actively supporting cygwin and 
also having the exact build configuration I was looking for (demo-mipsel.sh)

So, I'm hoping that after a few days of wrestling with the build 
process, I'm nearing success.  I've run into a problem that I don't know 
how to deal with however:

I'm running Windows XP SP2 and an install of cygwin that defaulted to 
just about everything.  The cygwin packages were last updated 
yesterday.  I've got crosstool untarred in

/cygdrive/c/linksys/crosstool-0.28-rc37
I changed demo-mipsel.sh to change the tarball directory to 
$PWD/downloads and I'm building the configuration

"eval `cat mipsel.dat gcc-3.2.3-glibc-2.2.3.dat`        sh all.sh --notest"

This configuration is mentioned in demo-mipsel.sh as working with the 
Linksys WRT54G router and that configuration is also mentioned as being 
good at http://kegel.com/crosstool/#results.  However, it's failing in a 
way that's very similar to the failures mentioned on the crosstool build 
logs page, specifically the

gcc-3.3.4,glibc-2.2.5,binutils-2.15,linux-2.6.8 Failure at 
http://kegel.com/crosstool/crosstool-0.28-rc37/buildlogs/0.28/mipsel-gcc-3.3.4-glibc-2.2.5.log.txt
and the
gcc-3.4.2,glibc-2.2.5,binutils-2.15,linux-2.6.8 Failure at 
http://kegel.com/crosstool/crosstool-0.28-rc37/buildlogs/0.28/mipsel-gcc-3.4.2-glibc-2.2.5.log.txt

Here are the first few relevant lines of the output log:

+ TARBALLS_DIR=/cygdrive/c/linksys/crosstool-0.28-rc37/downloads
+ RESULT_TOP=/opt/crosstool
+ GCC_LANGUAGES=c,c++
+ cat mipsel.dat gcc-3.2.3-glibc-2.2.3.dat
+ KERNELCONFIG=/cygdrive/c/linksys/crosstool-0.28-rc37/mipsel.config TARGET=mipsel-unknown-linux-gnu TARGET_CFLAGS=-O2 -finline-limit=10000 BINUTILS_DIR=binutils-2.15 GCC_DIR=gcc-3.2.3 GLIBC_DIR=glibc-2.2.3 LINUX_DIR=linux-2.6.8 GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.2.3 sh all.sh --notest
+ TOOLCOMBO=gcc-3.2.3-glibc-2.2.3
+ BUILD_DIR=/cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3
+ TOP_DIR=/cygdrive/c/linksys/crosstool-0.28-rc37
+ SRC_DIR=/cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3
+ TARBALLS_DIR=/cygdrive/c/linksys/crosstool-0.28-rc37/downloads
+ RESULT_TOP=/opt/crosstool
+ PREFIX=/opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3
+ GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.2.3
+ SRC_DIR=/cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3
+ TOP_DIR=/cygdrive/c/linksys/crosstool-0.28-rc37

...........

It made it through building binutils and gcc but it falls over a ways 
through building glibc


-------

make[2]: Entering directory `/cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/glibc-2.2.3/misc'

[snip]

mipsel-unknown-linux-gnu-gcc ../sysdeps/generic/stty.c -c -O2 -Wall 
-Winline -Wstrict-prototypes -Wwrite-strings -finline-limit=10000 
-isystem 
/cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/linux-2.6.8/include/asm-mips/mach-generic 
-I../include -I. 
-I/cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/misc 
-I.. -I../libio 
-I/cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc 
-I../sysdeps/mips/elf -I../linuxthreads/sysdeps/unix/sysv/linux 
-I../linuxthreads/sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv 
-I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/mips 
-I../sysdeps/unix/sysv/linux/mips -I../sysdeps/unix/sysv/linux 
-I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman 
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/mips 
-I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/mips/mipsel 
-I../sysdeps/mips/fpu -I../sysdeps/mips -I../sysdeps/wordsize-32 
-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 
-I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic 
-nostdinc -isystem 
/opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/lib/gcc-lib/mipsel-unknown-linux-gnu/3.2.3/include 
-isystem 
/opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/mipsel-unknown-linux-gnu/include 
-D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -o 
/cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/misc/stty.o

mipsel-unknown-linux-gnu-gcc  ../sysdeps/unix/sysv/linux/ptrace.c -c -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -finline-limit=10000 -isystem /cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/linux-2.6.8/include/asm-mips/mach-generic      -I../include -I. -I/cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/misc -I.. -I../libio  -I/cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc -I../sysdeps/mips/elf -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/mips -I../sysdeps/unix/sysv/linux/mips -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/mips -I../sysdeps/unix -I../sysdeps/posix -I../sy
sdeps/mips/mipsel -I../sysdeps/mips/fpu -I../sysdeps/mips -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic  -nostdinc -isystem /opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/lib/gcc-lib/mipsel-unknown-linux-gnu/3.2.3/include -isystem /opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/mipsel-unknown-linux-gnu/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC   -o /cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/misc/ptrace.o
In file included from /opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/mipsel-unknown-linux-gnu/include/linux/user.h:1,
                 from ../sysdeps/unix/sysv/linux/sys/user.h:1,
                 from ../sysdeps/unix/sysv/linux/ptrace.c:22:
/opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/mipsel-unknown-linux-gnu/include/asm/user.h:12:21: asm/reg.h: No such file or directory
In file included from /opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/mipsel-unknown-linux-gnu/include/linux/user.h:1,
                 from ../sysdeps/unix/sysv/linux/sys/user.h:1,
                 from ../sysdeps/unix/sysv/linux/ptrace.c:22:
/opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/mipsel-unknown-linux-gnu/include/asm/user.h:38: `EF_SIZE' undeclared here (not in a function)
make[2]: *** [/cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/misc/ptrace.o] Error 1
make[2]: Leaving directory `/cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/glibc-2.2.3/misc'
make[1]: *** [misc/subdir_lib] Error 2
make[1]: Leaving directory `/cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/glibc-2.2.3'


----------
make: *** [all] Error 2


I don't see a file reg.h pertaining to mips in the distribution....

-- /cygdrive/c/linksys/crosstool-0.28-rc37
$ find . -name reg.h -print
./build/mipsel-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/glibc-2.2.5/sysdeps/unix/sysv/linux/i386/sys/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/glibc-2.2.5/sysdeps/unix/sysv/linux/m68k/sys/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sys/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.6.8/include/asm-ppc/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.6.8/include/asm-sparc/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.6.8/include/asm-alpha/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.6.8/include/asm-sparc64/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/glibc-2.2.5/sysdeps/unix/sysv/linux/i386/sys/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/glibc-2.2.5/sysdeps/unix/sysv/linux/m68k/sys/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sys/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/linux-2.6.8/include/asm-ppc/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/linux-2.6.8/include/asm-sparc/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/linux-2.6.8/include/asm-alpha/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/linux-2.6.8/include/asm-sparc64/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/glibc-2.2.3/sysdeps/unix/sysv/linux/i386/sys/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/glibc-2.2.3/sysdeps/unix/sysv/linux/m68k/sys/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/linux-2.6.8/include/asm-ppc/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/linux-2.6.8/include/asm-sparc/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/linux-2.6.8/include/asm-alpha/reg.h
./build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/linux-2.6.8/include/asm-sparc64/reg.h

I am also somewhat suspicious of the following errors while making the 
dependencies but crosstool kept going so I assumed they were ok.

for dir in /cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc-headers sysdeps/mips/elf sysdeps/unix/sysv/linux/mips sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix/mips sysdeps/unix sysdeps/posix sysdeps/mips/mipsel sysdeps/mips/fpu sysdeps/mips sysdeps/wordsize-32 sysdeps/ieee754/flt-32 sysdeps/ieee754/dbl-64 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic; do \
  test -f $dir/syscalls.list && \
  { /bin/sh.exe sysdeps/unix/make-syscalls.sh $dir || exit 1; }; \
  test $dir = sysdeps/unix && break; \
done > /cygdrive/c/linksys/crosstool-0.28-rc37/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc-headers/sysd-syscallsT
In file included from /opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/mipsel-unknown-linux-gnu/include/asm/unistd.h:15,
                 from sysdeps/unix/sysv/linux/sys/syscall.h:25,
                 from sysdeps/unix/sysdep.h:21,
                 from sysdeps/unix/mips/sysdep.h:20,
                 from sysdeps/unix/sysv/linux/mips/sysdep.h:23,
                 from <stdin>:1:
/opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/mipsel-unknown-linux-gnu/include/asm/sgidefs.h:18:2: #error Use a Linux compiler or give up.

I got a bunch of them...

I'm going to go try build  gcc-3.3.4, glibc-2.3.2, binutils-2.15, 
linux-2.6.8 since that is listed as working right now on the buildlogs 
page to see if I can get that one to work.

Is there something not set up properly on my machine? 

Thanks
-Joel



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list