UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    compiling with gcc in a chroot'ed system

    Scheduled Pinned Locked Moved Support
    2 Posts 1 Posters 900 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • G Offline
        guru
        last edited by guru

        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?

        Thanks

        G 1 Reply Last reply Reply Quote 0
        • G Offline
          guru @guru
          last edited by

          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
          

          HIH

          1 Reply Last reply Reply Quote 3

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post