Results 1 to 3 of 3

Thread: Cross compiling application to arm - I need some hints

  1. #1

    Question Cross compiling application to arm - I need some hints

    I need some hints on cross-compiling to arm in leap 42.3 on x64

    My eventual objective is to compile audacious media player for a headless banana pi (armv7) running armbian (like debian). (The published packages contain lots of GUI stuff but there are compile-time options to exclude both GTK and Qt: https://audacious-media-player.org/download.) I am completely new to cross-compiling.

    I installed these:
    cross-arm-binutils
    cross-armv7hl-gcc48-icecream-backend (I'm puzzled by 'icecream')

    I assumed, naïvely, that these added arm to gcc and that I could merely specify the target, something like
    gcc helloworld.c -o helloworld-arm -march=armv7
    helloworld.c:1:0: error: bad value (armv7) for -march= switch

    I discovered in /usr/share/icecream-envs/ another gcc, and if I run that in isolation it accepts -march=armv7 but unsurprisingly fails for other reasons, presumably because it's not installed properly. So maybe I should be running that, or pointing some environment variable at it.

    I've read many forum threads, mostly out of date, and often advising some completely different method. Ubuntu seems to use a separate compiler: arm-linux-gnueabi-gcc. I've even watched a presentation by Andreas Färber, which I think describes the correct system but not how to use it.

    Is there a howto somewhere?
    What do I do next?

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,293
    Blog Entries
    2

    Default Re: Cross compiling application to arm - I need some hints

    You may not be searching in the proper Forum.

    For a question like this, you'd probably have better luck searching for info, and posting in one of the Developer Forums

    https://forums.opensuse.org/forumdis...97-Development


    For for your situation, you should consult documentation for whatever you're doing.
    From what you've posted, I'm guessing that you may be building to an Android target (ice cream is a friendly codename for a version of Android).
    If that is really what you're doing, then I'd also guess that you may have an Android NDK installed, and maybe even Android Studio which is the recommended coding tool.

    If that is your setup,
    Then you should look for Quickstarts and tutorials related to what you have installed.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #3

    Default Re: Cross compiling application to arm - I need some hints [SOLVED]

    I think you're right that the development forum would have been better. I hadn't spotted it.

    Icecream is a distributed compile system - https://en.opensuse.org/Icecream.
    I was aware of that, and knew I didn't want it, but since cross-armv7hl-gcc48-icecream-backend appeared to be the only cross-compiler in the standard repos I thought maybe it optionally interfaced with icecream in some way. The problem was it didn't actually install a cross-compiler!

    Anyway, knowing the magic prefix "cross-arm-linux-gnueabi" I found another one
    https://software.opensuse.org/packag...ux-gnueabi-gcc
    which does install utilities, libraries, and the compiler: arm-linux-gnueabi-gcc
    and doesn't object to -march=armv7

    So now I get
    helloworld.c:1:18: error: no include path in which to search for stdio.h

    Which I understand - I now need to sort out the paths to the libraries etc.

    So I'm one step along this long journey

    Edited to add: how do I mark this SOLVED in the title that appears on the index?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •