Skip to content

Instantly share code, notes, and snippets.

@alanorth
Created July 22, 2012 07:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanorth/3158845 to your computer and use it in GitHub Desktop.
Save alanorth/3158845 to your computer and use it in GitHub Desktop.
host C: libdvm <= dalvik/vm/native/dalvik_system_Zygote.c
In file included from dalvik/vm/Dalvik.h:87:0,
from dalvik/vm/native/dalvik_system_Zygote.c:20:
dalvik/vm/oo/ObjectInlines.h: In function ‘dvmSetObjectArrayElement’:
dalvik/vm/oo/ObjectInlines.h:29:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
dalvik/vm/native/dalvik_system_Zygote.c: In function ‘setgroupsIntarray’:
dalvik/vm/native/dalvik_system_Zygote.c:171:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
dalvik/vm/native/dalvik_system_Zygote.c: In function ‘setrlimitsFromArray’:
dalvik/vm/native/dalvik_system_Zygote.c:191:19: error: storage size of ‘rlim’ isn’t known
dalvik/vm/native/dalvik_system_Zygote.c:199:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
dalvik/vm/native/dalvik_system_Zygote.c:203:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
dalvik/vm/native/dalvik_system_Zygote.c:214:9: warning: implicit declaration of function ‘setrlimit’ [-Wimplicit-function-declaration]
dalvik/vm/native/dalvik_system_Zygote.c:191:19: warning: unused variable ‘rlim’ [-Wunused-variable]
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libdvm_intermediates/native/dalvik_system_Zygote.o] Error 1
@phiexz
Copy link

phiexz commented Aug 16, 2012

i also have this error on my archlinux. how do you fix this error??
is it related to gcc & glibc?? because archlinux gcc version is 4.7.1.
but when i compile from ubuntu 10.04, i dont have this error

@xryoshi
Copy link

xryoshi commented Sep 14, 2012

@phiexz

me too, im using archlinux with gcc 4.7.x maybe we can insert another CFLAGS ? :confused

@lucatib
Copy link

lucatib commented Dec 31, 2012

at the top of file dalvik_system_Zygote.c
add

include <sys/resource.h>

@ungalcrys
Copy link

thanks lucatib. it worked :) i tried building android on my fedora 18 with gcc 4.7.2 and it solved the problem
well.. it passed me to my next error..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment