make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libdvm_intermediates/native/dalvik_system_Zygote.

来源:互联网 发布:淘宝最靠谱的玉器店 编辑:程序博客网 时间:2024/05/14 21:19

I started getting this error while compiling CyanogenMod 9 (Android 4.0.x) last week:

dalvik/vm/native/dalvik_system_Zygote.cpp: In function ‘int setrlimitsFromArray(ArrayObject*)’:dalvik/vm/native/dalvik_system_Zygote.cpp:199:19: error: aggregate ‘setrlimitsFromArray(ArrayObject*)::rlimit rlim’ has incomplete type and cannot be defined     struct rlimit rlim;                   ^dalvik/vm/native/dalvik_system_Zygote.cpp:222:43: error: ‘setrlimit’ was not declared in this scope         err = setrlimit(contents[0], &rlim);                                           ^make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libdvm_intermediates/native/dalvik_system_Zygote.o] Error 1make: *** Waiting for unfinished jobs....

I’m not sure if it’s due to a recent Arch Linux change or what, but it seems the fix is simply to add #include <sys/resource.h>to dalvik/vm/native/dalvik_system_Zygote.cpp. Here’s a diff:

diff --git a/vm/native/dalvik_system_Zygote.cpp b/vm/native/dalvik_system_Zygote.cppindex 8224656..f4102e8 100644--- a/vm/native/dalvik_system_Zygote.cpp+++ b/vm/native/dalvik_system_Zygote.cpp@@ -19,6 +19,7 @@  */ #include "Dalvik.h" #include "native/InternalNativePriv.h"+#include <sys/resource.h>  #include  #if (__GNUC__ == 4 && __GNUC_MINOR__ == 7)转载:http://www.google.com.hk/search?newwindow=1&safe=strict&client=aff-cs-360se&hs=Ixi&q=make%3A+***+%5Bout%2Fhost%2Flinux-x86%2Fobj%2FSHARED_LIBRARIES%2Flibdvm_intermediates%2Fnative%2Fdalvik_system_Zygote.o%5D+Error+1+&oq=make%3A+***+%5Bout%2Fhost%2Flinux-x86%2Fobj%2FSHARED_LIBRARIES%2Flibdvm_intermediates%2Fnative%2Fdalvik_system_Zygote.o%5D+Error+1+&gs_l=serp.12...42925.42925.0.44067.1.1.0.0.0.0.0.0..0.0....0...1c.1.21.serp.nMmPV-H4QQo
原创粉丝点击