20120409 问题已经解决,debian6 上编译 android ics4.0编译用时:...

99封情书 提交于 2019-12-07 12:56:37

我的主机是 debian 6 x86_64 

同步完android 4.0 的源码后,进行编译。

google 官方只有ubuntu 的解决方案,只字未提debian.

看来google 与ubuntu 关系很好!

以下为出错日志,现在还未解决,

看上去是.so 版本不匹配,找不到相应的函数。

/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(ClDisplay.o): In function `XCloseDisplay':

(.text+0xbd): undefined reference to `xcb_disconnect'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(OpenDis.o): In function `OutOfMemory':
(.text+0x449): undefined reference to `xcb_disconnect'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(OpenDis.o): In function `XOpenDisplay':
(.text+0x7f4): undefined reference to `xcb_get_setup'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(OpenDis.o): In function `XOpenDisplay':
(.text+0xd6d): undefined reference to `xcb_get_maximum_request_length'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(xcb_disp.o): In function `_XConnectXCB':
(.text+0xa8): undefined reference to `xcb_parse_display'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(xcb_disp.o): In function `_XConnectXCB':
(.text+0x15e): undefined reference to `xcb_connect_to_display_with_auth_info'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(xcb_disp.o): In function `_XConnectXCB':
(.text+0x17c): undefined reference to `xcb_get_file_descriptor'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(xcb_disp.o): In function `_XConnectXCB':
(.text+0x1a3): undefined reference to `xcb_generate_id'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(xcb_disp.o): In function `_XConnectXCB':
(.text+0x1e0): undefined reference to `xcb_connection_has_error'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(xcb_disp.o): In function `_XConnectXCB':
(.text+0x214): undefined reference to `xcb_connect'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(xcb_io.o): In function `require_socket':
(.text+0x3b4): undefined reference to `xcb_take_socket'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(xcb_io.o): In function `wait_or_poll_for_event':
(.text+0x43c): undefined reference to `xcb_wait_for_event'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(xcb_io.o): In function `wait_or_poll_for_event':
(.text+0x4a5): undefined reference to `xcb_poll_for_event'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(xcb_io.o): In function `process_responses':
(.text+0x56b): undefined reference to `xcb_poll_for_reply'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(xcb_io.o): In function `process_responses':
(.text+0x6ea): undefined reference to `xcb_connection_has_error'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(xcb_io.o): In function `_XAllocIDs':
(.text+0x7dc): undefined reference to `xcb_generate_id'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(xcb_io.o): In function `_XIDHandler':
(.text+0x84e): undefined reference to `xcb_generate_id'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(xcb_io.o): In function `_XSend':
(.text+0xa41): undefined reference to `xcb_writev'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib32/libX11.a(xcb_io.o): In function `_XReply':
(.text+0xc2a): undefined reference to `xcb_wait_for_reply'
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/lib/libEGL_translator.so] Error 1
make: *** Waiting for unfinished jobs....

解决方法:

下载i386版的libX11-dev.deb:i386, 

1 提取 lib/libX11.a && libX11.so.6.3.0  

2 复制到 /usr/lib32/

3 ln -s /usr/lib32/libX11.so.6.3.0 /usr/lib32/libX11.so


接下来就可以编译了:

$ cd android/source

$ source build/envsetup.sh

$ lunch full-eng

$ make -j4

等待漫长的编译过程.


编译时间太长了,机器档次较低,用时256m54.955s

Install: out/target/product/generic/system/app/Settings.odex
Install: out/target/product/generic/system/app/Settings.apk
Finding NOTICE files: out/target/product/generic/obj/NOTICE_FILES/hash-timestamp
Combining NOTICE files: out/target/product/generic/obj/NOTICE.html
Installed file list: out/target/product/generic/installed-files.txt
Target system fs image: out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img
Install system fs image: out/target/product/generic/system.img


real 178m30.719s
user 256m54.955s
sys 18m7.696s


启动模拟器:

与以前不一样:

$ emulator64-arm

启动中..

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!