[Kindle Fire Android Development] markolino631:
hey! I have an errors when compile cm9:

target thumb C++: libmemalloc <= hardware/qcom/display/libgralloc/pmem_bestfit_alloc.cpp
target thumb C++: libmemalloc <= hardware/qcom/display/libgralloc/alloc_controller.cpp
In file included from hardware/qcom/display/libgralloc/pmem_bestfit_alloc.cpp:20:
hardware/qcom/display/libgralloc/pmem_bestfit_alloc.h:95: error: 'gralloc' has not been declared
hardware/qcom/display/libgralloc/pmem_bestfit_alloc.h:95: error: expected '{' before 'Allocator'
hardware/qcom/display/libgralloc/pmem_bestfit_alloc.h:96: error: expected initializer before '}' token
hardware/qcom/display/libgralloc/pmem_bestfit_alloc.h:96: error: expected declaration before '}' token
make: *** [out/target/product/alessi/obj/SHARED_LIBRARIES/libmemalloc_intermediates/pmem_bestfit_alloc.o] Errore 1
make: *** Attesa per i processi non terminati....
hardware/qcom/display/libgralloc/alloc_controller.cpp:81: error: 'IAllocController' was not declared in this scope
hardware/qcom/display/libgralloc/alloc_controller.cpp:81: error: template argument 1 is invalid
hardware/qcom/display/libgralloc/alloc_controller.cpp:81: error: 'IAllocController' has not been declared
hardware/qcom/display/libgralloc/alloc_controller.cpp:81: error: invalid type in declaration before '=' token
hardware/qcom/display/libgralloc/alloc_controller.cpp:82: error: 'IAllocController' was not declared in this scope
hardware/qcom/display/libgralloc/alloc_controller.cpp:82: error: template argument 1 is invalid
hardware/qcom/display/libgralloc/alloc_controller.cpp:82: error: 'IAllocController' has not been declared
hardware/qcom/display/libgralloc/alloc_controller.cpp: In function 'int getInstance(bool)':
hardware/qcom/display/libgralloc/alloc_controller.cpp:84: warning: NULL used in arithmetic
hardware/qcom/display/libgralloc/alloc_controller.cpp:89: error: expected type-specifier before 'PmemAshmemController'
hardware/qcom/display/libgralloc/alloc_controller.cpp:89: error: invalid conversion from 'int*' to 'int'
hardware/qcom/display/libgralloc/alloc_controller.cpp:89: error: expected ';' before 'PmemAshmemController'
hardware/qcom/display/libgralloc/alloc_controller.cpp:91: error: expected type-specifier before 'PmemKernelController'
hardware/qcom/display/libgralloc/alloc_controller.cpp:91: error: invalid conversion from 'int*' to 'int'
hardware/qcom/display/libgralloc/alloc_controller.cpp:91: error: expected ';' before 'PmemKernelController'
hardware/qcom/display/libgralloc/alloc_controller.cpp: At global scope:
hardware/qcom/display/libgralloc/alloc_controller.cpp:182: error: 'PmemKernelController' has not been declared
hardware/qcom/display/libgralloc/alloc_controller.cpp:182: error: ISO C++ forbids declaration of 'PmemKernelController' with no type
hardware/qcom/display/libgralloc/alloc_controller.cpp: In function 'int PmemKernelController()':
hardware/qcom/display/libgralloc/alloc_controller.cpp:184: error: 'mPmemAdspAlloc' was not declared in this scope
hardware/qcom/display/libgralloc/alloc_controller.cpp:184: error: expected type-specifier before 'PmemKernelAlloc'
hardware/qcom/display/libgralloc/alloc_controller.cpp:184: error: expected ';' before 'PmemKernelAlloc'
hardware/qcom/display/libgralloc/alloc_controller.cpp:187: error: no return statement in function returning non-void
hardware/qcom/display/libgralloc/alloc_controller.cpp: At global scope:
hardware/qcom/display/libgralloc/alloc_controller.cpp:189: error: expected constructor, destructor, or type conversion before '::' token
hardware/qcom/display/libgralloc/alloc_controller.cpp:193: error: 'PmemKernelController' is not a class or namespace
hardware/qcom/display/libgralloc/alloc_controller.cpp: In function 'int allocate(gralloc::alloc_data&, int, int)':
hardware/qcom/display/libgralloc/alloc_controller.cpp:210: error: expected type-specifier before 'PmemKernelAlloc'
hardware/qcom/display/libgralloc/alloc_controller.cpp:210: error: expected ';' before 'PmemKernelAlloc'
hardware/qcom/display/libgralloc/alloc_controller.cpp:222: error: 'mPmemAdspAlloc' was not declared in this scope
hardware/qcom/display/libgralloc/alloc_controller.cpp: At global scope:
hardware/qcom/display/libgralloc/alloc_controller.cpp:227: error: 'PmemKernelController' is not a class or namespace
hardware/qcom/display/libgralloc/alloc_controller.cpp: In function 'android::sp<gralloc::IMemAlloc> getAllocator(int)':
hardware/qcom/display/libgralloc/alloc_controller.cpp:231: error: 'mPmemAdspAlloc' was not declared in this scope
hardware/qcom/display/libgralloc/alloc_controller.cpp: At global scope:
hardware/qcom/display/libgralloc/alloc_controller.cpp:242: error: 'PmemAshmemController' has not been declared
hardware/qcom/display/libgralloc/alloc_controller.cpp:242: error: ISO C++ forbids declaration of 'PmemAshmemController' with no type
hardware/qcom/display/libgralloc/alloc_controller.cpp: In function 'int PmemAshmemController()':
hardware/qcom/display/libgralloc/alloc_controller.cpp:244: error: 'mPmemUserspaceAlloc' was not declared in this scope
hardware/qcom/display/libgralloc/alloc_controller.cpp:244: error: expected type-specifier before 'PmemUserspaceAlloc'
hardware/qcom/display/libgralloc/alloc_controller.cpp:244: error: expected ';' before 'PmemUserspaceAlloc'
hardware/qcom/display/libgralloc/alloc_controller.cpp:245: error: 'mAshmemAlloc' was not declared in this scope
hardware/qcom/display/libgralloc/alloc_controller.cpp:246: error: 'mPmemKernelCtrl' was not declared in this scope
hardware/qcom/display/libgralloc/alloc_controller.cpp:246: error: expected type-specifier before 'PmemKernelController'
hardware/qcom/display/libgralloc/alloc_controller.cpp:246: error: expected ';' before 'PmemKernelController'
hardware/qcom/display/libgralloc/alloc_controller.cpp:247: error: no return statement in function returning non-void
hardware/qcom/display/libgralloc/alloc_controller.cpp: At global scope:
hardware/qcom/display/libgralloc/alloc_controller.cpp:249: error: expected constructor, destructor, or type conversion before '::' token
hardware/qcom/display/libgralloc/alloc_controller.cpp:253: error: 'PmemAshmemController' is not a class or namespace
hardware/qcom/display/libgralloc/alloc_controller.cpp: In function 'int allocate(gralloc::alloc_data&, int, int)':
hardware/qcom/display/libgralloc/alloc_controller.cpp:253: error: redefinition of 'int allocate(gralloc::alloc_data&, int, int)'
hardware/qcom/display/libgralloc/alloc_controller.cpp:193: error: 'int allocate(gralloc::alloc_data&, int, int)' previously defined here
hardware/qcom/display/libgralloc/alloc_controller.cpp:268: error: 'mPmemKernelCtrl' was not declared in this scope
hardware/qcom/display/libgralloc/alloc_controller.cpp:277: error: 'mAshmemAlloc' was not declared in this scope
hardware/qcom/display/libgralloc/alloc_controller.cpp:289: error: 'mPmemUserspaceAlloc' was not declared in this scope
hardware/qcom/display/libgralloc/alloc_controller.cpp:296: error: 'mAshmemAlloc' was not declared in this scope
hardware/qcom/display/libgralloc/alloc_controller.cpp: At global scope:
hardware/qcom/display/libgralloc/alloc_controller.cpp:306: error: 'PmemAshmemController' is not a class or namespace
hardware/qcom/display/libgralloc/alloc_controller.cpp: In function 'android::sp<gralloc::IMemAlloc> getAllocator(int)':
hardware/qcom/display/libgralloc/alloc_controller.cpp:306: error: redefinition of 'android::sp<gralloc::IMemAlloc> getAllocator(int)'
hardware/qcom/display/libgralloc/alloc_controller.cpp:227: error: 'android::sp<gralloc::IMemAlloc> getAllocator(int)' previously defined here
hardware/qcom/display/libgralloc/alloc_controller.cpp:310: error: 'mPmemUserspaceAlloc' was not declared in this scope
hardware/qcom/display/libgralloc/alloc_controller.cpp:312: error: 'mPmemKernelCtrl' was not declared in this scope
hardware/qcom/display/libgralloc/alloc_controller.cpp:314: error: 'mAshmemAlloc' was not declared in this scope
In file included from frameworks/base/include/utils/RefBase.h:27,
from hardware/qcom/display/libgralloc/alloc_controller.cpp:31:
frameworks/base/include/utils/StrongPointer.h: In member function 'android::sp<T>& android::sp<T>::operator=(U*) [with U = int, T = gralloc::IMemAlloc]':
hardware/qcom/display/libgralloc/alloc_controller.cpp:210: instantiated from here
frameworks/base/include/utils/StrongPointer.h:185: error: cannot convert 'int*' to 'gralloc::IMemAlloc*' in assignment

how to fix it?