Android 源码编译记录

  

问题1:
Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/html/DocTypeStrings.cpp] Error 2
make: *** Waiting for unfinished jobs....
Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/platform/ColorData.cpp] Error 2
target Generated: libwebcore <= external/webkit/Source/WebCore/html/parser/HTMLEntityNames.in

解决方法:
sudo apt-get install libswitch-perl

问题2:
/bin/bash: xsltproc: command not found

解决方法:
sudo apt-get install xsltproc


问题3:
host C++: libandroidfw <= frameworks/base/libs/androidfw/Asset.cpp
/home/jason/Android/android-4.2.2_r1/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/bin/../lib/gcc/i686-linux/4.6.x-google/../../../../i686-linux/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/CopyFile.o] Error 1
make: *** Waiting for unfinished jobs....
/home/jason/Android/android-4.2.2_r1/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/bin/../lib/gcc/i686-linux/4.6.x-google/../../../../i686-linux/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o] Error 1
/home/jason/Android/android-4.2.2_r1/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/bin/../lib/gcc/i686-linux/4.6.x-google/../../../../i686-linux/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libandroidfw_intermediates/Asset.o] Error 1
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

解决方法:
sudo apt-get install zlib1g
sudo apt-get install zlib1g:i386


问题4:
In file included from /home/jason/Android/android-4.2.2_r1/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/bin/../lib/gcc/i686-linux/4.6.x-google/../../../../i686-linux/include/c++/4.6.x-google/cstdlib:66:0,
from libcore/include/UniquePtr.h:20,
from cts/suite/audio_quality/lib/src/task/TaskSound.cpp:17:
/usr/include/stdlib.h:759:34: fatal error: bits/stdlib-bsearch.h: No such file or directory
compilation terminated.
In file included from cts/suite/audio_quality/lib/src/task/TaskInput.cpp:17:0:
/usr/include/stdlib.h:759:34: fatal error: bits/stdlib-bsearch.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libcts_audio_quality_intermediates/src/task/TaskSound.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libcts_audio_quality_intermediates/src/task/TaskInput.o] Error 1
In file included from cts/suite/audio_quality/lib/src/task/TaskSequential.cpp:16:0:
/usr/include/stdlib.h:759:34: fatal error: bits/stdlib-bsearch.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libcts_audio_quality_intermediates/src/task/TaskSequential.o] Error 1

解决方法:
sudo apt-get install gcc-multilib

posted @ 2016-01-01 17:27  jasonkent27  阅读(838)  评论(0编辑  收藏  举报