Newbie crosstool problem - Embedded

This is a discussion on Newbie crosstool problem - Embedded ; Hi, I have a SUSE 10.3 host running on 32 bit x86 core and I am trying to use crosstool to build a cross compiler for arm-linux. Idownload the crosstool-0.43 archive and unpacked it. I edited my demo- arm9tdmi shell ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Newbie crosstool problem

  1. Newbie crosstool problem

    Hi,

    I have a SUSE 10.3 host running on 32 bit x86 core and I am trying to
    use crosstool to build a cross compiler for arm-linux.
    Idownload the crosstool-0.43 archive and unpacked it. I edited my demo-
    arm9tdmi shell script to look like this:

    #!/bin/sh
    # This script has one line for each known working toolchain
    # for this architecture. Uncomment the one you want.
    # Generated by generate-demo.pl from buildlogs/all.dats.txt

    set -ex
    TARBALLS_DIR=$HOME/downloads
    RESULT_TOP=/opt/crosstool
    export TARBALLS_DIR RESULT_TOP
    GCC_LANGUAGES="c,c++,java"
    export GCC_LANGUAGES

    # Really, you should do the mkdir before running this,
    # and chown /opt/crosstool to yourself so you don't need to run as
    root.
    mkdir -p $RESULT_TOP

    #eval `cat arm9tdmi.dat gcc-3.2.3-glibc-2.2.5.dat` sh all.sh --notest
    #eval `cat arm9tdmi.dat gcc-3.2.3-glibc-2.3.2.dat` sh all.sh --notest
    #eval `cat arm9tdmi.dat gcc-3.2.3-glibc-2.3.2-tls.dat` sh all.sh --
    notest
    #eval `cat arm9tdmi.dat gcc-3.3.6-glibc-2.2.5.dat` sh all.sh --notest
    #eval `cat arm9tdmi.dat gcc-3.3.6-glibc-2.3.2.dat` sh all.sh --notest
    #eval `cat arm9tdmi.dat gcc-3.3.6-glibc-2.3.2-tls.dat` sh all.sh --
    notest
    #eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.2.5.dat` sh all.sh --notest
    #eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.2.dat` sh all.sh --notest
    #eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.2-tls.dat` sh all.sh --
    notest
    #eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.5.dat` sh all.sh --notest
    #eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.5-tls.dat` sh all.sh --
    notest
    #eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.6.dat` sh all.sh --notest
    #eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.6-tls.dat` sh all.sh --
    notest
    #eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.2.dat` sh all.sh --notest
    #eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.2-tls.dat` sh all.sh --
    notest
    #eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.5.dat` sh all.sh --notest
    #eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.5-tls.dat` sh all.sh --
    notest
    #eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.6.dat` sh all.sh --notest
    #eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.6-tls.dat` sh all.sh --
    notest
    #eval `cat arm9tdmi.dat gcc-4.1.0-glibc-2.3.2.dat` sh all.sh --notest
    eval `cat arm9tdmi.dat gcc-4.1.0-glibc-2.3.2-tls.dat` sh all.sh --
    notest

    echo Done.

    and ran it.

    After a lot of downloads and building I eventually get an error:

    + CC=gcc
    + /home/rico/ct/crosstool-0.43/build/arm-9tdmi-linux-gnu/gcc-4.1.0-
    glibc-2.3.2/glibc-2.3.2/configure --prefix=/usr --build=i686-pc-linux-
    gnu --host=arm-9tdmi-linux-gnu --without-cvs --disable-sanity-checks --
    with-headers=/opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-9tdmi-linux-gnu/
    arm-9tdmi-linux-gnu/include --enable-hacker-mode
    checking build system type... i686-pc-linux-gnu
    checking host system type... arm-9tdmi-linux-gnu
    checking sysdep dirs... sysdeps/arm/elf sysdeps/unix/sysv/linux/arm
    sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/
    mman sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix/arm sysdeps/unix
    sysdeps/posix sysdeps/arm/fpu sysdeps/arm sysdeps/wordsize-32 sysdeps/
    ieee754/flt-32 sysdeps/ieee754/dbl-64 sysdeps/ieee754 sysdeps/generic/
    elf sysdeps/generic
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether ln -s works... yes
    checking for pwd... /bin/pwd
    checking for arm-9tdmi-linux-gnu-gcc... gcc
    checking version of gcc... 4.2.1, bad
    checking for gnumake... no
    checking for gmake... gmake
    checking version of gmake... 3.81, ok
    configure: error:
    *** These critical programs are missing or too old: gcc
    *** Check the INSTALL file for required versions.

    which -a gcc return:

    /usr/bin/gcc

    and gcc --version | head -1 returns:

    gcc (GCC) 4.2.1 (SUSE Linux)

    Can somebody point me in the right direction please?

    TIA,

    Richard.


  2. Re: Newbie crosstool problem

    On Oct 29, 6:17 am, Rico wrote:
    > Hi,
    >
    > checking version of gcc... 4.2.1, bad
    >
    > Can somebody point me in the right direction please?
    >
    > TIA,
    >
    > Richard.


    Could you check your glibc configure script? It may test for a version
    of gcc
    3.2.X or later. If it doesn't test for a number greater than 3, it
    will fail.


  3. Re: Newbie crosstool problem

    You probably need to go back to a gcc in the 3.4 era. Gcc 4.x is much more
    demanding and frequently fails on code that has only been compiled on 3.4.
    because it is much less forgiving -Clark


    "Rico" wrote in message
    news:1193656639.687931.246270@22g2000hsm.googlegro ups.com...
    > Hi,
    >
    > I have a SUSE 10.3 host running on 32 bit x86 core and I am trying to
    > use crosstool to build a cross compiler for arm-linux.
    > Idownload the crosstool-0.43 archive and unpacked it. I edited my demo-
    > arm9tdmi shell script to look like this:
    >
    > #!/bin/sh
    > # This script has one line for each known working toolchain
    > # for this architecture. Uncomment the one you want.
    > # Generated by generate-demo.pl from buildlogs/all.dats.txt
    >
    > set -ex
    > TARBALLS_DIR=$HOME/downloads
    > RESULT_TOP=/opt/crosstool
    > export TARBALLS_DIR RESULT_TOP
    > GCC_LANGUAGES="c,c++,java"
    > export GCC_LANGUAGES
    >
    > # Really, you should do the mkdir before running this,
    > # and chown /opt/crosstool to yourself so you don't need to run as
    > root.
    > mkdir -p $RESULT_TOP
    >
    > #eval `cat arm9tdmi.dat gcc-3.2.3-glibc-2.2.5.dat` sh all.sh --notest
    > #eval `cat arm9tdmi.dat gcc-3.2.3-glibc-2.3.2.dat` sh all.sh --notest
    > #eval `cat arm9tdmi.dat gcc-3.2.3-glibc-2.3.2-tls.dat` sh all.sh --
    > notest
    > #eval `cat arm9tdmi.dat gcc-3.3.6-glibc-2.2.5.dat` sh all.sh --notest
    > #eval `cat arm9tdmi.dat gcc-3.3.6-glibc-2.3.2.dat` sh all.sh --notest
    > #eval `cat arm9tdmi.dat gcc-3.3.6-glibc-2.3.2-tls.dat` sh all.sh --
    > notest
    > #eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.2.5.dat` sh all.sh --notest
    > #eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.2.dat` sh all.sh --notest
    > #eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.2-tls.dat` sh all.sh --
    > notest
    > #eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.5.dat` sh all.sh --notest
    > #eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.5-tls.dat` sh all.sh --
    > notest
    > #eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.6.dat` sh all.sh --notest
    > #eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.6-tls.dat` sh all.sh --
    > notest
    > #eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.2.dat` sh all.sh --notest
    > #eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.2-tls.dat` sh all.sh --
    > notest
    > #eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.5.dat` sh all.sh --notest
    > #eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.5-tls.dat` sh all.sh --
    > notest
    > #eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.6.dat` sh all.sh --notest
    > #eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.6-tls.dat` sh all.sh --
    > notest
    > #eval `cat arm9tdmi.dat gcc-4.1.0-glibc-2.3.2.dat` sh all.sh --notest
    > eval `cat arm9tdmi.dat gcc-4.1.0-glibc-2.3.2-tls.dat` sh all.sh --
    > notest
    >
    > echo Done.
    >
    > and ran it.
    >
    > After a lot of downloads and building I eventually get an error:
    >
    > + CC=gcc
    > + /home/rico/ct/crosstool-0.43/build/arm-9tdmi-linux-gnu/gcc-4.1.0-
    > glibc-2.3.2/glibc-2.3.2/configure --prefix=/usr --build=i686-pc-linux-
    > gnu --host=arm-9tdmi-linux-gnu --without-cvs --disable-sanity-checks --
    > with-headers=/opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-9tdmi-linux-gnu/
    > arm-9tdmi-linux-gnu/include --enable-hacker-mode
    > checking build system type... i686-pc-linux-gnu
    > checking host system type... arm-9tdmi-linux-gnu
    > checking sysdep dirs... sysdeps/arm/elf sysdeps/unix/sysv/linux/arm
    > sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/
    > mman sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix/arm sysdeps/unix
    > sysdeps/posix sysdeps/arm/fpu sysdeps/arm sysdeps/wordsize-32 sysdeps/
    > ieee754/flt-32 sysdeps/ieee754/dbl-64 sysdeps/ieee754 sysdeps/generic/
    > elf sysdeps/generic
    > checking for a BSD-compatible install... /usr/bin/install -c
    > checking whether ln -s works... yes
    > checking for pwd... /bin/pwd
    > checking for arm-9tdmi-linux-gnu-gcc... gcc
    > checking version of gcc... 4.2.1, bad
    > checking for gnumake... no
    > checking for gmake... gmake
    > checking version of gmake... 3.81, ok
    > configure: error:
    > *** These critical programs are missing or too old: gcc
    > *** Check the INSTALL file for required versions.
    >
    > which -a gcc return:
    >
    > /usr/bin/gcc
    >
    > and gcc --version | head -1 returns:
    >
    > gcc (GCC) 4.2.1 (SUSE Linux)
    >
    > Can somebody point me in the right direction please?
    >
    > TIA,
    >
    > Richard.
    >




  4. Re: Newbie crosstool problem


    If you are using GCC4.x to cross-build a GCC3.x toolchain you will in
    almost all cases need some special patches for the GCC and/or glibc
    sources. I've recently sucessfully built a gcc-3.3.2/glib-2.3.2 arm-linux
    toolchain under Gentoo2007, which uses GCC4.1.2 as native
    compiler. However, i did not use crosstool for that purpose. I followed the
    howto found here: http://www.ibm.com/developerworks/ (you will have to
    register first; then search for topic "cross-compiler" and you will
    find an article "Build a GCC-based cross-compiler for Linux" which is
    a step-by step instruction set).

    Good luck!
    Kai

+ Reply to Thread