problem building glibc-2.9

Khem Raj raj.khem@gmail.com
Wed Nov 3 22:03:00 GMT 2010


2010/11/2 Kim Højgaard-Hansen <kimrhh@gmail.com>:
> Hi,
>
> I'm trying to use crosstool-ng in an OpenEmbedded inspired project.
> This usually works, but i have run into the following problem:
>
> [INFO ]  Installing static core C compiler: done in 153.74s (at 09:41)
> [INFO ]  =================================================================
> [INFO ]  Installing C library headers
> [EXTRA]    Configuring C library
> [EXTRA]    Installing C library headers
> [ERROR]    make[2]: *** [/usr/include/limits.h] Error 1
> [ERROR]    make[1]: *** [install-headers] Error 2
> [ERROR]    Build failed in step 'Installing C library headers'
> [ERROR]    Error happened in
> '/home/kimrhh/crosstool/lib/ct-ng-1.8.0/scripts/functions' in function
> 'CT_DoExecLog' (line unknown, sorry)
> [ERROR]          called from
> '/home/kimrhh/crosstool/lib/ct-ng-1.8.0/scripts/build/libc/glibc.sh'
> at line # 175 in function 'do_libc_headers'
> [ERROR]          called from
> '/home/kimrhh/crosstool/lib/ct-ng-1.8.0/scripts/crosstool-NG.sh' at
> line # 586 in function 'main'
> [ERROR]    Look at
> '/home/kimrhh/workshop/kimrhhs-oe-lite/tmp.d/default/work/cross/arm-cortexa8-linux-gnueabi/gcc-cross-1.8.0-gcc-4.5.1-glibc-2.9-r1.2/install/build.log'
> for more info on this error.
>
> build.log snippet:
>
> [ALL  ]    (echo '# Generated from tls.make.c by Makerules.';
> /home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/gcc-core-static/bin/arm-cortexa8-linux-gnueabi-gcc
> -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings
> -fmerge-all-constants -g -Wstrict-prototypes      -Iinclude
> -I/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/build-libc-headers
> -Iports/sysdeps/arm/elf -Iports/sysdeps/unix/sysv/linux/arm/eabi
> -Iports/sysdeps/unix/sysv/linux/arm -Iports/sysdeps/unix/sysv/linux
> -Isysdeps/unix/sysv/linux -Isysdeps/gnu -Isysdeps/unix/common
> -Isysdeps/unix/mman -Isysdeps/unix/inet -Iports/sysdeps/unix/sysv
> -Isysdeps/unix/sysv -Iports/sysdeps/unix/arm -Iports/sysdeps/unix
> -Isysdeps/unix -Isysdeps/posix -Iports/sysdeps/arm/eabi
> -Iports/sysdeps/arm/fpu -Iports/sysdeps/arm -Isysdeps/wordsize-32
> -Isysdeps/ieee754/flt-32 -Isysdeps/ieee754/dbl-64 -Isysdeps/ieee754
> -Isysdeps/generic/elf -Isysdeps/generic -Iports   -Ilibio -I.
> -nostdinc -isystem
> /home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/gcc-core-static/lib/gcc/arm-cortexa8-linux-gnueabi/4.5.1/include
> -isystem /home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/gcc-core-static/lib/gcc/arm-cortexa8-linux-gnueabi/4.5.1/include-fixed
> -isystem /home/kimrhh/workshop/kimrhhs-oe-lite/tmp.d/default/work/cross/arm-cortexa8-linux-gnueabi/gcc-cross-1.8.0-gcc-4.5.1-glibc-2.9-r1.2/install/arm-cortexa8-linux-gnueabi//sys-root/usr/include
>  -include include/libc-symbols.h        -E -DASSEMBLER tls.make.c
>  -MD -MP -MT '$(common-objpfx)tls.make' -MF
> /home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/build-libc-headers/tls.make.dT
>  | sed -n '/@@@/{s/@@@[      ]*(.*)@@@/1/;s/[        ]*$//p;}';  echo
> 'common-generated += tls.make';  sed -e 's@
> /home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/build-libc-headers/@
> $(common-objpfx)@g' -e
> 's@^/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/build-libc-headers/@$(common-objpfx)@g'
> -e 's@  *([^      /$][^   ]*)@ $(..)1@g' -e 's@^([^       /$][^
> ]*)@$(..)1@g' /home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/build-libc-headers/tls.make.dT;
>  rm -f /home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/build-libc-headers/tls.make.dT)
>> /home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/build-libc-headers/tls.makeT
> [ALL  ]    mv -f
> /home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/build-libc-headers/tls.makeT
> /home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/build-libc-headers/tls.make
> [ALL  ]    make[2]: Leaving directory
> `/home/kimrhh/crosstool/bin/targets/src/glibc-2.9'
> [ALL  ]    make[2]: Entering directory
> `/home/kimrhh/crosstool/bin/targets/src/glibc-2.9'
> [ALL  ]    /home/kimrhh/crosstool/bin/targets/tools/bin/install -c -m
> 644 include/limits.h /usr/include/limits.h
> [ALL  ]    /usr/bin/install: cannot remove `/usr/include/limits.h':
> Permission denied
> [ERROR]    make[2]: *** [/usr/include/limits.h] Error 1
> [ALL  ]    make[2]: Leaving directory
> `/home/kimrhh/crosstool/bin/targets/src/glibc-2.9'
> [ERROR]    make[1]: *** [install-headers] Error 2
> [ALL  ]    make[1]: Leaving directory
> `/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/build-libc-headers'
> [ERROR]    Build failed in step 'Installing C library headers'
> [ERROR]    Error happened in
> '/home/kimrhh/crosstool/lib/ct-ng-1.8.0/scripts/functions' in function
> 'CT_DoExecLog' (line unknown, sorry)
> [ERROR]          called from
> '/home/kimrhh/crosstool/lib/ct-ng-1.8.0/scripts/build/libc/glibc.sh'
> at line # 175 in function 'do_libc_headers'
> [ERROR]          called from
> '/home/kimrhh/crosstool/lib/ct-ng-1.8.0/scripts/crosstool-NG.sh' at
> line # 586 in function 'main'
> [ERROR]    Look at
> '/home/kimrhh/workshop/kimrhhs-oe-lite/tmp.d/default/work/cross/arm-cortexa8-linux-gnueabi/gcc-cross-1.8.0-gcc-4.5.1-glibc-2.9-r1.2/install/build.log'
> for more info on this error.
> [ERROR]  (elapsed: 9:56.05)
>
> So somehow it tries to install the headers into my host system.
>
> Looking a bit more at the build.log, something seems wrong with the
> args passed to configure for glibc:
>
> [INFO ]  =================================================================
> [INFO ]  Installing C library headers
> [EXTRA]    Configuring C library
> [DEBUG]    Using gcc for target:
> '/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/gcc-core-static/bin/arm-cortexa8-linux-gnueabi-gcc'
> [DEBUG]    Extra config passed : '--enable-add-ons=ports
> --enable-kernel=2.6.32'
> [DEBUG]    ==> Executing:
> '/home/kimrhh/crosstool/bin/targets/src/glibc-2.9/configure
> --build=i686-build_unknown-linux-gnu --host=arm-cortexa8-linux-gnueabi
> --prefix=/usr --with-headers=/home/kimrhh/workshop/kimrhhs-oe-lite/tmp.d/default/work/cross/arm-cortexa8-linux-gnueabi/gcc-cross-1.8.0-gcc-4.5.1-glibc-2.9-r1.2/install/arm-cortexa8-linux-gnueabi//sys-root/usr/include
> --without-cvs --disable-sanity-checks --enable-hacker-mode
> --enable-add-ons=ports  --enable-kernel=2.6.32 --without-nptl'
> [ALL  ]    configure: WARNING: you should use --build, --host, --target
>
> at least --prefix is wrong, which i find confusing since it it correct
> for the same build when gcc is built:
>
> [INFO ]  =================================================================
> [INFO ]  Installing static core C compiler
> [DEBUG]    Copying headers to install area of bootstrap gcc, so it can
> build libgcc2
> [DEBUG]    ==> Executing: 'cp -a
> /home/kimrhh/workshop/kimrhhs-oe-lite/tmp.d/default/work/cross/arm-cortexa8-linux-gnueabi/gcc-cross-1.8.0-gcc-4.5.1-glibc-2.9-r1.2/install/arm-cortexa8-linux-gnueabi//sys-root/usr/include
> /home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/gcc-core-static/arm-cortexa8-linux-gnueabi/include'
> [EXTRA]    Configuring static core C compiler
> [DEBUG]    Extra config passed: '--with-newlib --enable-threads=no
> --disable-shared --with-pkgversion=crosstool-NG-1.8.0
> --with-cpu=cortex-a8 --with-tune=cortex-a8 --enable-__cxa_atexit
> --with-gmp=/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/static
> --with-mpfr=/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/static
> --with-ppl=/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/static
> --with-cloog=/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/static
> --with-mpc=/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/static
> --with-libelf=/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/static'
> [DEBUG]    ==> Executing:
> '/home/kimrhh/crosstool/bin/targets/src/gcc-4.5.1/configure
> --build=i686-build_unknown-linux-gnu
> --host=i686-build_unknown-linux-gnu
> --target=arm-cortexa8-linux-gnueabi
> --prefix=/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/gcc-core-static
> --with-local-prefix=/home/kimrhh/workshop/kimrhhs-oe-lite/tmp.d/default/work/cross/arm-cortexa8-linux-gnueabi/gcc-cross-1.8.0-gcc-4.5.1-glibc-2.9-r1.2/install/arm-cortexa8-linux-gnueabi//sys-root
> --disable-multilib --disable-libmudflap
> --with-sysroot=/home/kimrhh/workshop/kimrhhs-oe-lite/tmp.d/default/work/cross/arm-cortexa8-linux-gnueabi/gcc-cross-1.8.0-gcc-4.5.1-glibc-2.9-r1.2/install/arm-cortexa8-linux-gnueabi//sys-root
> --with-newlib --enable-threads=no --disable-shared
> --with-pkgversion=crosstool-NG-1.8.0 --with-cpu=cortex-a8
> --with-tune=cortex-a8 --enable-__cxa_atexit
> --with-gmp=/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/static
> --with-mpfr=/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/static
> --with-ppl=/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/static
> --with-cloog=/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/static
> --with-mpc=/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/static
> --with-libelf=/home/kimrhh/crosstool/bin/targets/arm-cortexa8-linux-gnueabi/build/static
> --disable-nls --enable-symvers=gnu --enable-languages=c'
>
> i have uploaded the configuration i'm using here:
> http://www.control.aau.dk/~kimhh/crosstool-ng-config
> and the complete build.log here: http://www.control.aau.dk/~kimhh/build.log.gz
>
> i hope this is enough info to give some hints as to where i failed :)
>

usr/bin/install: cannot remove `/usr/include/limits.h': Permission denied

thats the issue. Are you using make 3.82 by any chance ?
then please backport the relevant patch from upstream glibc or peek
into OpenEmbedded

http://git.openembedded.org/cgit.cgi/openembedded/tree/recipes/glibc/glibc-2.9/0001-Don-t-mix-pattern-rules-with-normal-rules.patch

might help

> Best,
>
> Kim
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>
>

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list