[Clfs-support] Problem compiling glibc

Per Andreas Gulbrandsen theperan at gmail.com
Thu Jan 8 04:43:13 PST 2009


Hi.

I'm kind of a n00b, so please bear with me.

I'm following the clfs guide for cross compiling a linux system for
mips (CLFS_TARGET="mipsel-unknown-linux-gnu"). SVN Version
SVN-20090107-MIPS. My host system is openSuse 11
(CLFS_HOST="x86_64-cross-linux-gnu"). I've checked host requirements
and I have all tools specified there.

I get stuck in 5.11, Constructing Cross-Compile Tools - glibc. When I
try to make I get the following error:
mipsel-unknown-linux-gnu-gcc -mabi=32
../sysdeps/unix/sysv/linux/sa_len.c -c -std=gnu99 -fgnu89-inline -O2
-Wall -Winline -Wwrite-strings -fmerge-all-constants -g
-Wstrict-prototypes      -I../include
-I/mnt/clfs/sources/glibc-build/socket -I/mnt/clfs/sources/glibc-build
-I../ports/sysdeps/mips/elf
-I../ports/sysdeps/unix/sysv/linux/mips/mips32
-I../ports/sysdeps/unix/sysv/linux/mips/nptl
-I../ports/sysdeps/unix/sysv/linux/mips
-I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread
-I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux
-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common
-I../sysdeps/unix/mman -I../sysdeps/unix/inet
-I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv
-I../sysdeps/unix/sysv -I../ports/sysdeps/unix/mips/mips32
-I../ports/sysdeps/unix/mips -I../nptl/sysdeps/unix
-I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix
-I../ports/sysdeps/mips/mips32 -I../ports/sysdeps/mips
-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64
-I../sysdeps/wordsize-32 -I../ports/sysdeps/mips/fpu
-I../ports/sysdeps/mips/nptl -I../sysdeps/ieee754
-I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports
-I.. -I../libio -I. -nostdinc -isystem
/mnt/clfs/cross-tools/bin/../lib/gcc/mipsel-unknown-linux-gnu/4.3.2/include
-isystem /mnt/clfs/cross-tools/bin/../lib/gcc/mipsel-unknown-linux-gnu/4.3.2/include-fixed
-isystem /tools/include -D_LIBC_REENTRANT -include
../include/libc-symbols.h  -DPIC     -o
/mnt/clfs/sources/glibc-build/socket/sa_len.o -MD -MP -MF
/mnt/clfs/sources/glibc-build/socket/sa_len.o.dt
-MT/mnt/clfs/sources/glibc-build/socket/sa_len.o
In file included from /tools/include/asm/byteorder.h:65,
                 from /tools/include/linux/atalk.h:4,
                 from ../sysdeps/unix/sysv/linux/netatalk/at.h:25,
                 from ../sysdeps/unix/sysv/linux/sa_len.c:22:
/tools/include/linux/byteorder.h:8:3: error: #error Fix
asm/byteorder.h to define one endianness
make[2]: *** [/mnt/clfs/sources/glibc-build/socket/sa_len.o] Error 1
make[2]: Leaving directory `/mnt/clfs/sources/glibc-2.8/socket'
make[1]: *** [socket/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/clfs/sources/glibc-2.8'
make: *** [all] Error 2

I've looked at asm/byteorder.h, but I can't figure out what to do. I
can't understand how I'm suppose to "fix" it. I've tried different
stuff, i.e. undefing __MIPSEB__ and/or __BIG_ENDIAN if __MIPSEB__ is
defined. But I still get the same error.
However, If I undef __BIG_ENDIAN in /tools/include/linux/byteorder.h
just before the check that triggers the error it compiles. But this
doesn't seem like a very good solution. Seems like I should get rid of
the initial definition of __BIG_ENDIAN (alt. __MIPSEB). Can anyone
please advice? I'd like to get this right, and not just hack my way
through it.

-- 
mvh
Per Andreas Gulbrandsen



More information about the Clfs-support mailing list