building the android beagle toolchain -- getting around the issues

a number of observations regarding building the android toolchain if
anyone wanted to try that. at the moment, it doesn't build according
to what's in the README, and here's why, and here's how to fix it.
(this will, not surprisingly, go up on my wiki in short order.)

  if you want the official embinux toolchain for android for the
beagle, you can go here:

where what you get is a tarball from which you can allegedly *build*
the toolchain. sadly, there are issues, and here's how to deal with

  the README instructs one to use the configuration option
"--target=arm-eabi". however, the configure file itself contains this
snippet regarding gdb:


The toolchain you are mentioning is not from embinux. looking at source tar ball name (android-toolchain-20081019.tar.bz2 ), it seems that you have downloaded it from following link.

I will like to clarify that embinux had never released a toolchain for android. And the one released at following link is not meant to compile android build. Regards, Rupesh Gujare Robert P. J. Day wrote:

ok, i stand corrected, but it's certainly confusing to have that
link at embinux's home page, immediately underneath a link labelled
"Android on Beagle".



     If you download toolchain from embinux it gives you following tar
ball. "arm-none-linux-gnueabi-cortex-core-v2.tar.bz2"

While the one you have mentioned is "android-toolchain-20081019.tar.bz2"

  It is better to acknowledge your mistakes, rather than pointing at
others, and what others should do.

Rupesh Gujare

Robert P. J. Day wrote:

ok, if i messed that up, i apologize, but i have no idea where that
other toolchain could have come from. i'll try again.


you're right, i apologize. i'm absolutely baffled as to where that
other toolchain came from. my mistake.


Hi all,
I am trying porting Cortex patches from code sourcery to Android
toolchain. I did that and am now compiling with top
patches as follows:


This might be of interest to you.

Regards, melwyn wrote:

I think I prefer to compile the toolchain rather than using a prebuilt
I got over the above issue by using --disable-multilib option

However when I use this compiler for compiling the Android package I
get the following error:

Do you have the toolchain source for the tarball "http://"
I could use that as a reference.


While using your toolchain binaries (after following the README) I get
the following error:

prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-gcc -I
system/core/include -I hardware/libhardware/include -I hardware/
ril/include -I dalvik/libnativehelper/include -I frameworks/base/
include -I external/skia/include -I out/target/product/generic/obj/
include -I bionic/libc/arch-arm/include -I bionic/libc/include -
I bionic/libstdc++/include -I bionic/libc/kernel/common -I bionic/
libc/kernel/arch-arm -I bionic/libm/include -I bionic/libm/include/
arch/arm -I bionic/libthread_db/include -I external/srec/audio/
test/AudioHardwareRecordLoop/include -I external/srec/audio/AudioIn/
UNIX/include -I external/srec/audio/test/AudioHardwareRecordLoop -
I out/target/product/generic/obj/EXECUTABLES/
AudioHardwareRecordLoop_intermediates -c -fno-exceptions -Wno-
multichar -msoft-float -fpic -ffunction-sections -funwind-tables -
fstack-protector -march=armv7-a -D__ARM_ARCH_7__ -include system/core/
include/arch/linux-arm/AndroidConfig.h -I system/core/include/arch/
linux-arm/ -mthumb-interwork -DANDROID -fmessage-length=0 -W -Wall -
Wno-unused -DSK_RELEASE -DNDEBUG -O2 -g -Wstrict-aliasing=2 -finline-
functions -fno-inline-functions-called-once -fgcse-after-reload -
frerun-cse-after-loop -frename-registers -DNDEBUG -UDEBUG -mthumb -Os -
fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -MD -o
bin/../libexec/gcc/arm-eabi/4.4.0/cc1: error while loading shared
libraries: cannot open shared object file: No such file
or directory

Seems like you don't have MPFR library( on your
host machine, please install it and give a try.

On ubuntu you could do,
$ sudo apt-get install libmpfr1ldbl



Hi Anil,

I get this error on a newly built toolchain. Could you tell what this
could be?

external/srec/uapi/java/jniapi/jniapi/JNIHelper.cpp:168: internal
compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <> for instructions.
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/
libUAPI_jni_intermediates/JNIHelper.o] Error 1


It seems to be new error from the gcc , can you please send some more
detail log of the error.



Think these kinds of errors are encountered when you mix the
optimization flags passed to the compiler in a way that is not

You could try building in the verbose mode with
#make showcommands
and send the line where the fault occurs.