eabi-gcc can't find stdio.h

538 views
Skip to first unread message

Matt

unread,
Jun 24, 2009, 5:06:12 PM6/24/09
to android-ndk
Hey all.

I've tried to build and use the ndk toolchain from both the
"master" (this is now cupcake, right?) repository and the donut
repository and have had no luck. I'm closer to my goal in the master
repository. I followed the how-to html file in the development/pdk/
ndk directory, but when I try to make the sample project (samples/
sample) the eabi-gcc tells me it can't find "stdio.h."

I've installed build-essentials and stdio.h is in my /lib/include
directory, though there is no stdio.h in eabi's include directory.
Does this matter?

I've been able to cross-compile with CodeSourcery but I can't seem to
get the "official" toolchain to work.

For reference I'm using Kubuntu 9.04 on an x86-32bit machine.

Thanks in advance for the help,
Matt

Rohit Grover

unread,
Jun 24, 2009, 8:40:51 PM6/24/09
to andro...@googlegroups.com
I've tried to build and use the ndk toolchain from both the
"master" (this is now cupcake, right?) repository and the donut
repository and have had no luck.  I'm closer to my goal in the master
repository.  I followed the how-to html file in the development/pdk/
ndk directory, but when I try to make the sample project (samples/
sample) the eabi-gcc tells me it can't find "stdio.h."

$(ANDROID)/bionic/libc/include/stdio.h 
 
I've installed build-essentials and stdio.h is in my /lib/include
directory, though there is no stdio.h in eabi's include directory.
I've been able to cross-compile with CodeSourcery but I can't seem to

get the "official" toolchain to work.

The "official" toolchain works fine. Try adding the following includes to gcc.

INCLUDES = -I$(ANDROID)/system/core/include            \
           -I$(ANDROID)/hardware/libhardware/include        \
           -I$(ANDROID)/out/target/product/generic/obj/include    \
           -I$(ANDROID)/bionic/libc/arch-arm/include        \
           -I$(ANDROID)/bionic/libc/include            \
           -I$(ANDROID)/bionic/libstdc++/include        \
           -I$(ANDROID)/bionic/libc/kernel/common        \
           -I$(ANDROID)/bionic/libc/kernel/arch-arm        \
           -I$(ANDROID)/bionic/libm/include            \
           -I$(ANDROID)/bionic/libm/include/arch/arm        \
           -I$(ANDROID)/bionic/libthread_db/include        \
           -I$(ANDROID)/bionic/libm/arm                \
           -I$(ANDROID)/bionic/libm
 
CFLAGS   = -nostdlib                                                    \
           $(INCLUDES)                                                  \
           -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__                           \
           -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -DANDROID               \
           -DSK_RELEASE -DNDEBUG -UDEBUG                                \
           -march=armv5te -mtune=xscale -msoft-float -mthumb-interwork  \
           -fpic -fno-exceptions -ffunction-sections -funwind-tables    \
           -fstack-protector -fmessage-length=0                         \
           -include $(ANDROID)/system/core/include/arch/linux-arm/AndroidConfig.h

LDFLAGS  = -nostdlib -Bdynamic                         \
           -Wl,-T,$(ANDROID)/build/core/armelf.x             \
           -Wl,--gc-sections                         \
           -Wl,-z,nocopyreloc                         \
           -Wl,--no-undefined                         \
           -Wl,-rpath-link=$(ANDROID)/out/target/product/generic/obj/lib \
           -L$(ANDROID)/out/target/product/generic/obj/lib         \
           -Wl,-dynamic-linker,/system/bin/linker
Reply all
Reply to author
Forward
0 new messages