1
votes

I have the following in my configure script...

ANDROID_ROOT="$HOME/Development/Android/android-ndk-r8c" \
....
CPPFLAGS="-I$ANDROID_ROOT/platforms/android-14/arch-arm/usr/include" \

And if I ls that folder ($ANDROID_ROOT/platforms/android-14/arch-arm/usr/include) I see the sys folder and under that I see cdefs.h, however, when I run my configure I see....

Development/Android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/include-fixed/stdio.h:50:23: fatal error: sys/cdefs.h: No such file or directory

So this doesn't seem to make sense, I am in fact including the header. Any idea what I am missing here?

Update

I also tried creating a standalone toolchain and changing to...

ANDROID_ROOT="$HOME/toolchain" \
...
CPPFLAGS="-I$ANDROID_ROOT/sysroot/usr/include" \
LDFLAGS="-L$ANDROID_ROOT/sysroot/usr/lib" \

But no dice....

2

2 Answers

0
votes

So i was close with my Update, however, I forgot to update my PATH. Once done I got past this issue.

0
votes

Not quite clear what you're trying to achieve here, and even less clear is your answer, but the easy way to solve the stand-alone toolchain problem is to add a --sysroot param to gcc.

This might help: http://ronubo.blogspot.co.il/2016/01/standalone-gcc-clang-cross-compiling.html