Android framework build errors fix under Ubuntu 9.04

Android framework build errors fix under Ubuntu 9.04

9/2/2009 11:44:20 PM
 
 issue discription:
------------------------------------------------------------------------------------------------
error type : undeclared or Error 1.
------------------------------------------------------------------------------------------------
host C: emulator <= external/qemu/console.c
host C: emulator <= external/qemu/loader.c
host C: emulator <= external/qemu/sockets.c
external/qemu/sockets.c: In function ‘sock_address_init_resolve’:
external/qemu/sockets.c:637: error: ‘EAI_NODATA’ undeclared (first use in this function)
external/qemu/sockets.c:637: error: (Each undeclared identifier is reported only once
external/qemu/sockets.c:637: error: for each function it appears in.)
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/sockets.o] Error 1
=========================================================
2.1 Solution:
=========================================================
The 1st way to fix:
Apparently you have to modify the makefile to fix it.
/external/qemu/Makefile.android
# this is needed to build the emulator on 64-bit Linux systems
 ifeq ($(HOST_OS)-$(HOST_ARCH),linux-x86)
-  MY_CFLAGS += -Wa,--32
+  MY_CFLAGS += -Wa,--32 -D_GNU_SOURCE
 endif
 ifeq ($(HOST_OS),freebsd)
The 2st way to fix:
commenting out the EAI_NODATA line
found in sockets.c file.
             err = EHOSTDOWN;
             break;
-        case EAI_NODATA:
+        /* case EAI_NODATA: */
         case EAI_NONAME:
             err = ENOENT;
             break;
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2.2 Reference Reading.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2.2.1 The reference link:
http://groups.google.com/group/android-porting/browse_thread/thread/8432b5f2accb718a/8bbec3737be7fc28?lnk=gst&q=external%2Fqemu%2Fsockets.c+%E2%80%98
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2.2.2 key words: qemu
 QEMU is a generic and open source processor emulator which can emulate i386, x86_64, ARM, MIPS, PowerPC and SPARC systems. In case of ARM, it can emulate an Integrator or a Versatile platform. The Versatile one is the most interesting as it includes a hard disk SCSI controller, an Ethernet card and a graphical display.
Using a kernel compiled with the right options, it is possible to install a Debian distribution on such an emulated platform. That makes a cheap development platform. The emulated system running on an Athlon 64 X2 3800+ is around 20% faster than the popular NSLU2 and possibly with much more RAM (my emulated system has 256MiB of RAM).
This howto has been written for a Debian host system, but could be easily adapted for other distributions.
Alternatively prebuilt images are also available.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
本文来自优快云博客,转载请标明出处: http://blog.youkuaiyun.com/forlong401/archive/2009/06/14/4269107.aspx
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值