编译环境: 1. 华硕笔记本 2. cpu:amd 4800h 3. 硬盘:外挂2t机械硬盘 4. 内存:16+8 5. 系统:window10
虚拟机软件:vm workstation 虚拟机系统:ubuntu 18 具体配置如下图
问题1
Import includes file: out/target/product/generic_x86/obj/STATIC_LIBRARIES/third_party_libwebp_libwebp_utils_gyp_intermediates/import_includes
Export includes file: external/chromium_org/GypAndroid.linux-x86.mk -- out/target/product/generic_x86/obj/STATIC_LIBRARIES/third_party_libwebp_libwebp_utils_gyp_intermediates/export_includes
Gyp action: third_party_WebKit_Source_platform_platform_generated_gyp_make_platform_generated_target_FontFamilyNames (out/target/product/generic_x86/obj/GYP/shared_intermediates/blink/platform/FontFamilyNames.cpp)
Gyp action: third_party_WebKit_Source_platform_platform_generated_gyp_make_platform_generated_target_RuntimeEnabledFeatures (out/target/product/generic_x86/obj/GYP/shared_intermediates/blink/platform/RuntimeEnabledFeatures.cpp)
Gyp action: third_party_WebKit_Source_platform_platform_generated_gyp_make_platform_generated_target_ColorData (out/target/product/generic_x86/obj/GYP/shared_intermediates/blink/platform/ColorData.cpp)
Import includes file: out/target/product/generic_x86/obj/STATIC_LIBRARIES/third_party_WebKit_Source_platform_blink_platform_gyp_intermediates/import_includes
/bin/bash: gperf: command not found
external/chromium_org/third_party/WebKit/Source/platform/make_platform_generated.target.linux-x86.mk:47: recipe for target 'out/target/product/generic_x86/obj/GYP/shared_intermediates/blink/platform/ColorData.cpp' failed
make: *** [out/target/product/generic_x86/obj/GYP/shared_intermediates/blink/platform/ColorData.cpp] Error 127
make: *** Waiting for unfinished jobs....
Export includes file: external/chromium_org/GypAndroid.linux-x86.mk -- out/target/product/generic_x86/obj/STATIC_LIBRARIES/third_party_WebKit_Source_platform_blink_platform_gyp_intermediates/export_includes
#### make failed to build some targets (01:51 (mm:ss)) ####
关键信息 out/target/product/generic_x86/obj/GYP/shared_intermediates/blink/platform/ColorData.cpp 这个cpp文件error并且failed google得出解决方案
$ sudo apt-get install libswitch-perl
$ sudo apt-get install gperf
问题2
1号log
target thumb C++: libart <= out/target/product/generic/obj/SHARED_LIBRARIES/libart_intermediates/base/unix_file/fd_file_operator_out.cc
arm-linux-androideabi-g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
build/core/binary.mk:620: recipe for target 'out/target/product/generic/obj/SHARED_LIBRARIES/libart_intermediates/interpreter/interpreter_switch_impl.o' failed
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libart_intermediates/interpreter/interpreter_switch_impl.o] Error 4
make: *** Waiting for unfinished jobs....
build/core/binary.mk:620: recipe for target 'out/target/product/generic/obj/SHARED_LIBRARIES/libart_intermediates/check_jni.o' failed
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libart_intermediates/check_jni.o] Interrupt
build/core/binary.mk:620: recipe for target 'out/target/product/generic/obj/SHARED_LIBRARIES/libart_intermediates/debugger.o' failed
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libart_intermediates/debugger.o] Interrupt
make: *** wait: No child processes. Stop.
#### make failed to build some targets (57:56 (mm:ss)) ####
2号log
target C++: libart <= art/runtime/reference_table.cc
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
target C++: libart <= art/runtime/reflection.cc
target C++: libart <= art/runtime/runtime.cc
target C++: libart <= art/runtime/signal_catcher.cc
target C++: libart <= art/runtime/stack.cc
target C++: libart <= art/runtime/thread.cc
target C++: libart <= art/runtime/thread_list.cc
target C++: libart <= art/runtime/thread_pool.cc
target C++: libart <= art/runtime/throw_location.cc
target C++: libart <= art/runtime/trace.cc
target C++: libart <= art/runtime/transaction.cc
target C++: libart <= art/runtime/profiler.cc
target C++: libart <= art/runtime/fault_handler.cc
target C++: libart <= art/runtime/utf.cc
target C++: libart <= art/runtime/utils.cc
x86_64-linux-android-g++: internal compiler error: Killed (program cc1plus)
target C++: libart <= art/runtime/verifier/dex_gc_map.cc
target C++: libart <= art/runtime/verifier/instruction_flags.cc
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
x86_64-linux-android-g++: internal compiler error: Killed (program cc1plus)
build/core/binary.mk:620: recipe for target 'out/target/product/generic_x86/obj/SHARED_LIBRARIES/libart_intermediates/gc/heap.o' failed
make: *** [out/target/product/generic_x86/obj/SHARED_LIBRARIES/libart_intermediates/gc/heap.o] Error 4
make: *** Waiting for unfinished jobs....
Killed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
x86_64-linux-android-g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
x86_64-linux-android-g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
#### make failed to build some targets (39:48 (mm:ss)) ####
aosp@ubuntu:~/android-5.1$ x86_64-linux-android-g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
x86_64-linux-android-g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
1号log与2号log中都有信息aosp@ubuntu:~/android-5.1$ x86_64-linux-android-g++: internal compiler error: Killed (program cc1plus) 解决方案 设置交换空间大小
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
最好看一下交换空间是否挂载成功
sudo swapon --show
ubuntu设置交换空间具体看这里 https://juejin.cn/post/7235946041954484284#heading-0
像我这种萌新从来不投原创 看我这么卑微面子上点一个赞吧