[Android Q&A, Help & Troubleshooting] v6ser:
I'm trying to compile ICS Android Open Kang Project for an ARMv6 device,

But when all is almost ended I get a copybit.cpp error.

Firstly, this is my copybit.cpp:

http://pastebin.com/jhpBdSbC

And these are the errors I'm getting:

target thumb C++: copybit.galaxy5 <= device/samsung/galaxy5/libcopybit/copybit.cpp
device/samsung/galaxy5/libcopybit/copybit.cpp:87: warning: missing initializer for member 'hw_module_t::dso'
device/samsung/galaxy5/libcopybit/copybit.cpp:87: warning: missing initializer for member 'hw_module_t::reserved'
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'int msm_copybit(copybit_context_t*, const void*)':
device/samsung/galaxy5/libcopybit/copybit.cpp:208: warning: comparison between signed and unsigned integer expressions
device/samsung/galaxy5/libcopybit/copybit.cpp:209: warning: format '%08lx' expects type 'long unsigned int', but argument 19 has type 'unsigned int'
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'int stretch_copybit(copybit_device_t*, const copybit_image_t*, const copybit_image_t*, const copybit_rect_t*, const copybit_rect_t*, const copybit_region_t*)':

device/samsung/galaxy5/libcopybit/copybit.cpp:360: warning: comparison between signed and unsigned integer expressions
device/samsung/galaxy5/libcopybit/copybit.cpp:361: warning: comparison between signed and unsigned integer expressions
device/samsung/galaxy5/libcopybit/copybit.cpp:382: error: 'PRIV_FLAGS_DO_NOT_FLUSH' is not a member of 'private_handle_t'
device/samsung/galaxy5/libcopybit/copybit.cpp:383: error: 'MDP_BLIT_NON_CACHED' was not declared in this scope
device/samsung/galaxy5/libcopybit/copybit.cpp: At global scope:
device/samsung/galaxy5/libcopybit/copybit.cpp:539: error: redefinition of 'struct copybit_context_t'
device/samsung/galaxy5/libcopybit/copybit.cpp:56: error: previous definition of 'struct copybit_context_t'
device/samsung/galaxy5/libcopybit/copybit.cpp:553: error: redefinition of 'hw_module_methods_t copybit_module_methods'
device/samsung/galaxy5/libcopybit/copybit.cpp:70: error: 'hw_module_methods_t copybit_module_methods' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp:560: error: redefinition of 'copybit_module_t HMI'
device/samsung/galaxy5/libcopybit/copybit.cpp:77: error: 'copybit_module_t HMI' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'int min(int, int)':
device/samsung/galaxy5/libcopybit/copybit.cpp:575: error: redefinition of 'int min(int, int)'
device/samsung/galaxy5/libcopybit/copybit.cpp:92: error: 'int min(int, int)' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'int max(int, int)':
device/samsung/galaxy5/libcopybit/copybit.cpp:580: error: redefinition of 'int max(int, int)'
device/samsung/galaxy5/libcopybit/copybit.cpp:97: error: 'int max(int, int)' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'void MULDIV(uint32_t*, uint32_t*, int, int)':
device/samsung/galaxy5/libcopybit/copybit.cpp:585: error: redefinition of 'void MULDIV(uint32_t*, uint32_t*, int, int)'
device/samsung/galaxy5/libcopybit/copybit.cpp:102: error: 'void MULDIV(uint32_t*, uint32_t*, int, int)' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'void intersect(copybit_rect_t*, const copybit_rect_t*, const copybit_rect_t*)':
device/samsung/galaxy5/libcopybit/copybit.cpp:593: error: redefinition of 'void intersect(copybit_rect_t*, const copybit_rect_t*, const copybit_rect_t*)'
device/samsung/galaxy5/libcopybit/copybit.cpp:110: error: 'void intersect(copybit_rect_t*, const copybit_rect_t*, const copybit_rect_t*)' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'int get_format(int)':
device/samsung/galaxy5/libcopybit/copybit.cpp:603: error: redefinition of 'int get_format(int)'
device/samsung/galaxy5/libcopybit/copybit.cpp:120: error: 'int get_format(int)' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'void set_image(mdp_img*, const copybit_image_t*)':
device/samsung/galaxy5/libcopybit/copybit.cpp:617: error: redefinition of 'void set_image(mdp_img*, const copybit_image_t*)'
device/samsung/galaxy5/libcopybit/copybit.cpp:134: error: 'void set_image(mdp_img*, const copybit_image_t*)' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'void set_rects(copybit_context_t*, mdp_blit_req*, const copybit_rect_t*, const copybit_rect_t*, const copybit_rect_t*)':
device/samsung/galaxy5/libcopybit/copybit.cpp:631: error: redefinition of 'void set_rects(copybit_context_t*, mdp_blit_req*, const copybit_rect_t*, const copybit_rect_t*, const copybit_rect_t*)'
device/samsung/galaxy5/libcopybit/copybit.cpp:148: error: 'void set_rects(copybit_context_t*, mdp_blit_req*, const copybit_rect_t*, const copybit_rect_t*, const copybit_rect_t*)' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'void set_infos(copybit_context_t*, mdp_blit_req*, int)':
device/samsung/galaxy5/libcopybit/copybit.cpp:671: error: redefinition of 'void set_infos(copybit_context_t*, mdp_blit_req*, int)'
device/samsung/galaxy5/libcopybit/copybit.cpp:188: error: 'void set_infos(copybit_context_t*, mdp_blit_req*, int)' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'int msm_copybit(copybit_context_t*, const void*)':
device/samsung/galaxy5/libcopybit/copybit.cpp:681: error: redefinition of 'int msm_copybit(copybit_context_t*, const void*)'
device/samsung/galaxy5/libcopybit/copybit.cpp:198: error: 'int msm_copybit(copybit_context_t*, const void*)' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp:691: warning: comparison between signed and unsigned integer expressions
device/samsung/galaxy5/libcopybit/copybit.cpp:692: warning: format '%08lx' expects type 'long unsigned int', but argument 19 has type 'unsigned int'
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'int set_parameter_copybit(copybit_device_t*, int, int)':
device/samsung/galaxy5/libcopybit/copybit.cpp:722: error: redefinition of 'int set_parameter_copybit(copybit_device_t*, int, int)'
device/samsung/galaxy5/libcopybit/copybit.cpp:239: error: 'int set_parameter_copybit(copybit_device_t*, int, int)' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'int get(copybit_device_t*, int)':
device/samsung/galaxy5/libcopybit/copybit.cpp:788: error: redefinition of 'int get(copybit_device_t*, int)'
device/samsung/galaxy5/libcopybit/copybit.cpp:305: error: 'int get(copybit_device_t*, int)' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'int stretch_copybit(copybit_device_t*, const copybit_image_t*, const copybit_image_t*, const copybit_rect_t*, const copybit_rect_t*, const copybit_region_t*)':
device/samsung/galaxy5/libcopybit/copybit.cpp:816: error: redefinition of 'int stretch_copybit(copybit_device_t*, const copybit_image_t*, const copybit_image_t*, const copybit_rect_t*, const copybit_rect_t*, const copybit_region_t*)'
device/samsung/galaxy5/libcopybit/copybit.cpp:333: error: 'int stretch_copybit(copybit_device_t*, const copybit_image_t*, const copybit_image_t*, const copybit_rect_t*, const copybit_rect_t*, const copybit_region_t*)' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp:843: warning: comparison between signed and unsigned integer expressions
device/samsung/galaxy5/libcopybit/copybit.cpp:844: warning: comparison between signed and unsigned integer expressions
device/samsung/galaxy5/libcopybit/copybit.cpp:865: error: 'PRIV_FLAGS_DO_NOT_FLUSH' is not a member of 'private_handle_t'
device/samsung/galaxy5/libcopybit/copybit.cpp:866: error: 'MDP_BLIT_NON_CACHED' was not declared in this scope
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'int blit_copybit(copybit_device_t*, const copybit_image_t*, const copybit_image_t*, const copybit_region_t*)':
device/samsung/galaxy5/libcopybit/copybit.cpp:894: error: redefinition of 'int blit_copybit(copybit_device_t*, const copybit_image_t*, const copybit_image_t*, const copybit_region_t*)'
device/samsung/galaxy5/libcopybit/copybit.cpp:411: error: 'int blit_copybit(copybit_device_t*, const copybit_image_t*, const copybit_image_t*, const copybit_region_t*)' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'int close_copybit(hw_device_t*)':
device/samsung/galaxy5/libcopybit/copybit.cpp:908: error: redefinition of 'int close_copybit(hw_device_t*)'
device/samsung/galaxy5/libcopybit/copybit.cpp:425: error: 'int close_copybit(hw_device_t*)' previously defined here
device/samsung/galaxy5/libcopybit/copybit.cpp: In function 'int open_copybit(const hw_module_t*, const char*, hw_device_t**)':
device/samsung/galaxy5/libcopybit/copybit.cpp:919: error: redefinition of 'int open_copybit(const hw_module_t*, const char*, hw_device_t**)'
device/samsung/galaxy5/libcopybit/copybit.cpp:436: error: 'int open_copybit(const hw_module_t*, const char*, hw_device_t**)' previously defined here
make: *** [out/target/product/galaxy5/obj/SHARED_LIBRARIES/copybit.galaxy5_intermediates/copybit.o] Error 1

Any tip is appreciated, thanks.