compiling with gcc in a chroot'ed system

  • I have in my BQ E4.5 below ~phablet/myRoot a complete Linux un-tared to be able to compile and test things there. I did this already in the time of Canonical.

    The root fs was made of un-taring ubports-touch.rootfs-xenial-armhf.tar.gz

    Now I can not figure out to compile something there. The configure fails with:

    # ./configure CC=/usr/bin/arm-linux-gnueabihf-gcc 
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... no
    checking whether make supports nested variables... no
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking build system type... armv7l-unknown-linux-gnueabihf
    checking host system type... armv7l-unknown-linux-gnueabihf
    checking whether make supports nested variables... (cached) no
    configure: autobuild project... libassuan
    configure: autobuild revision... 2.5.1
    configure: autobuild hostname... ubuntu-phablet
    configure: autobuild timestamp... 20190106-143049
    checking for style of include used by make... none
    checking for gcc... /usr/bin/arm-linux-gnueabihf-gcc
    checking whether the C compiler works... no
    configure: error: in `/src/libassuan-2.5.1':
    configure: error: C compiler cannot create executables
    See `config.log' for more details

    In config.log it is missing the file crt1.o nd maybe others:

    configure:3667: checking whether the C compiler works
    configure:3689: /usr/bin/arm-linux-gnueabihf-gcc    conftest.c  >&5
    /usr/bin/ld: cannot find crt1.o: No such file or directory
    /usr/bin/ld: cannot find crti.o: No such file or directory
    collect2: error: ld returned 1 exit status

    I tried as well with he normal compile CC=gcc
    What additional packages I have to install in this system and which gcc to use?


  • To answer my own question:

    root@ubuntu-phablet:/# apt-get install gcc
    root@ubuntu-phablet:/# apt-get install libc-dev
    root@ubuntu-phablet:/# apt-get install make


Log in to reply