adhitya1978 / Samsung-hardware-ril

Precompile standalone NDK
3 stars 0 forks source link

Error on recompile #1

Open mbairaq opened 3 years ago

mbairaq commented 3 years ago

I try to recompile the code but there are some errors: [arm64-v8a] Install : android.hardware.radio@1.0.so => libs/arm64-v8a/android.hardware.radio@1.0.so [arm64-v8a] Install : libbacktrace.so => libs/arm64-v8a/libbacktrace.so [arm64-v8a] Install : libbase.so => libs/arm64-v8a/libbase.so [arm64-v8a] Install : libbinder.so => libs/arm64-v8a/libbinder.so [arm64-v8a] Install : libc.so => libs/arm64-v8a/libc.so [arm64-v8a] Install : libc++.so => libs/arm64-v8a/libc++.so [arm64-v8a] Install : libcutils.so => libs/arm64-v8a/libcutils.so [arm64-v8a] Install : libdl.so => libs/arm64-v8a/libdl.so [arm64-v8a] Install : libexpat.so => libs/arm64-v8a/libexpat.so [arm64-v8a] Install : libhardware_legacy.so => libs/arm64-v8a/libhardware_legacy.so [arm64-v8a] Install : liblog.so => libs/arm64-v8a/liblog.so [arm64-v8a] Install : libm.so => libs/arm64-v8a/libm.so [arm64-v8a] Install : libnetutils.so => libs/arm64-v8a/libnetutils.so [arm64-v8a] Install : libril.so => libs/arm64-v8a/libril.so [arm64-v8a] Compile : rild <= rild.c In file included from E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/rild.c:18: In file included from E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/include\telephony/rild.h:27: E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/include\cutils/log.h:539:5: error: redefinition of enumerator 'LOG_ID_MAIN' LOG_ID_MAIN = 0, ^ J:/Android/Sdk/ndk/17.2.4988734/build//../sysroot/usr/include\android/log.h:184:3: note: previous definition is here LOG_ID_MAIN = 0, ^ In file included from E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/rild.c:18: In file included from E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/include\telephony/rild.h:27: E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/include\cutils/log.h:540:5: error: redefinition of enumerator 'LOG_ID_RADIO' LOG_ID_RADIO = 1, ^ J:/Android/Sdk/ndk/17.2.4988734/build//../sysroot/usr/include\android/log.h:185:3: note: previous definition is here LOG_ID_RADIO = 1, ^ In file included from E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/rild.c:18: In file included from E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/include\telephony/rild.h:27: E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/include\cutils/log.h:541:5: error: redefinition of enumerator 'LOG_ID_EVENTS' LOG_ID_EVENTS = 2, ^ J:/Android/Sdk/ndk/17.2.4988734/build//../sysroot/usr/include\android/log.h:186:3: note: previous definition is here LOG_ID_EVENTS = 2, ^ In file included from E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/rild.c:18: In file included from E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/include\telephony/rild.h:27: E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/include\cutils/log.h:542:5: error: redefinition of enumerator 'LOG_ID_SYSTEM' LOG_ID_SYSTEM = 3, ^ J:/Android/Sdk/ndk/17.2.4988734/build//../sysroot/usr/include\android/log.h:187:3: note: previous definition is here LOG_ID_SYSTEM = 3, ^ In file included from E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/rild.c:18: In file included from E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/include\telephony/rild.h:27: E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/include\cutils/log.h:544:5: error: redefinition of enumerator 'LOG_ID_MAX' LOG_ID_MAX ^ J:/Android/Sdk/ndk/17.2.4988734/build//../sysroot/usr/include\android/log.h:193:3: note: previous definition is here LOG_ID_MAX ^ In file included from E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/rild.c:18: In file included from E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/include\telephony/rild.h:27: E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/include\cutils/log.h:545:3: error: typedef redefinition with different types ('enum log_id_t' vs 'enum log_id') } log_id_t; ^ J:/Android/Sdk/ndk/17.2.4988734/build//../sysroot/usr/include\android/log.h:194:3: note: previous definition is here } log_id_t; ^ E:/RIL/Samsung-hardware-ril-master/Samsung-hardware-ril-master/rild/rild.c:328:11: error: implicit declaration of function 'ntohl' is invalid in C99 [-Werror,-Wimplicit-function-declaration] len = ntohl(((uint32_t )p_begin)); ^ 7 errors generated. make: *** [E:\RIL\Samsung-hardware-ril-master\Samsung-hardware-ril-master\rild/obj/local/arm64-v8a/objs/rild/rild.o] Error 1

adhitya1978 commented 3 years ago

please take a noted the error is redefinition. u need to use correct NDK or disable which line redefinition.

mbairaq commented 3 years ago

please take a noted the error is redefinition. u need to use correct NDK or disable which line redefinition.

Thanks @adhitya1978 to replay. I tried to compile it with different NDK in windows and in LINUX but still the same problem. Thanks to help me to disable redefinition.

mstox commented 2 months ago

please take a noted the error is redefinition. u need to use correct NDK or disable which line redefinition.

hello thank you for post whitch ver of ndk i have same issu thank's