您的位置:首页 > 产品设计 > UI/UE

Android framework build errors fix under Ubuntu 9.04

2009-06-14 22:32 295 查看
-----------------------------------------------------------------------------------------------

Environment:

Ubuntu 9.04- the Jaunty Jackalope - released in April 2009.

About:

This file will focus on fixing the build errors while we make the Android project under the Ubuntu 9.04 .

Author:

congli.sw@gmail.com

               

-----------------------------------------------------------------------------------------------

1.     issue discription:

------------------------------------------------------------------------------------------------

error type : command not found or Error 127.

------------------------------------------------------------------------------------------------

Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l

/bin/bash: flex: command not found

make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp]

Error 127

=========================================================

1.1 Solution:

=========================================================

Install the tool flex.

The following step:

    The 1st : find the apt

        System->Administration->Synaptic Package Manager->Quick search

    The 2st : input the "flex" , then select them for Apply.

         

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

1.2 Reference Reading.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

1.2.1 key words: Flex

Flex is a tool for generating scanners: programs which recognized lexical

patterns in text. It reads the given input files for a description of a

scanner to generate. The description is in the form of pairs of regular

expressions and C code, called rules. Flex generates as output a C source

file, lex.yy.c, which defines a routine yylex().  This file is compiled

and linked with the -lfl library to produce an executable. When the

executable is run, it analyzes its input for occurrences of the regular

expressions. Whenever it finds one, it executes the corresponding C code.

The behaviour of Flex has undergone a major change since version

2.5.4a. Flex scanners are now reentrant, and it is now possible to

have multiple scanners in the same program with differing sets of

defaults, and the scanners play nicer with modern C and C++

compilers. The Flip side is that Flex no longer conforms to the POSIX

lex behaviour, and the scanners require conforming implementations

when flex is used in ANSI C mode. The package flex-old provides the

older behaviour.

Canonical provides critical updates for flex until October 2010.

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

------------------------------------------------------------------------------------------------

2. 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.

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

------------------------------------------------------------------------------------------------

3. issue discription:

------------------------------------------------------------------------------------------------

error type : sh: gperf: not found or Error 25.

------------------------------------------------------------------------------------------------

Creating hashtable for external/webkit/JavaScriptCore/parser/Keywords.table

target Generated: libwebcore <= external/webkit/JavaScriptCore/pcre/pcre_internal.h

Generating CSSPropertyNames.h <= CSSPropertyNames.in

sh: gperf: not found

calling gperf failed: 32512 at ./makeprop.pl line 96.

make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h] Error 25

make: *** Deleting file `out/target/product/generic/obj/SHARED_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h'

=========================================================

3.1. Solution:

=========================================================

Install the tool gperf.

The following step:

    The 1st : find the apt

        System->Administration->Synaptic Package Manager->Quick search

    The 2st : input the "gperf" , then select them for Apply.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

3.2 Reference Reading.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

3.2.1The reference link:

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

3.3.3 key words: gperf

Perfect hash function generator

gperf is a program that generates perfect hash functions for sets of

key words.

A perfect hash function is simply: A hash function and a data structure

that allows recognition of a key word in a set of words using exactly 1

probe into the data structure.

Canonical provides critical updates for gperf until October 2010.

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息