Search code examples
androidgccideterminal-ide

Android Terminal-IDE: terminal-gcc error: arm-eabi-gcc not found


I'm using Terminal-IDE as my development environment. (Google code site here.)

I'm running Terminal-IDE v 2.02 - the very latest. My Android versions are:

  • Android 4.0.3
  • Software version 2.14.531.3 71ORD
  • (the rest aren't likely pertinent, but more on request)

I'm in a suitable development directory with a simple enough c source code file ready and run 'make'.

I have never yet gotten any compilation to work successfully. Most likely, there's a version mis-match with regard to what executable is available versus what the software is looking for.

Here's the command and error message:

terminal-gcc -c -Wall -I/data/data/com.spartacusrex.spartacuside/files/local/include tester.c -o tester.o
/data/data/com.spartacusrex.spartacuside/files/system/bin/terminal-gcc[43]: arm-eabi-gcc: not found
make: *** [tester.o] Error 127

Snafu, of course. I'm not at all sure how to find out what the right compiler file name(s) should be because, on this non-rooted phone, I don't have permissions to hunt through the PATH and find the actual executables.

It may also be that PATH is set wrong. All input appreciated.


Solution

  • ...I'm not sure what's supposed to happen, but I found in the Terminal-IDE directory tree the file:

    $IDESYSTEM/android-gcc-4.4.0.tar.gz
    

    I also found that terminal-gcc is a bash script. Looking inside it seemed to say that a gcc tree should exist in "$HOME", which is the installation directory. So, I unzipped, then un-tarred the file identified above and put the resulting directory tree as a top-level subdirectory.

    Well well, what do you know? Success.

    I went a little further and created soft links to the actual compiler in ~/bin for both gcc and just cc, and suddenly all my previously created "Makefile" scripts used in other projects I wanted to move over started working perfectly.

    Apparently, even though I thought I'd done it right, I overlooked running this script:

    ./system/bin/install_gcc
    

    It extracts the tar, like I did, but does not create the links you may need.

    Hey, if you're glad I got here before you, give it a thumbs up!