[espeak-ng:master] new issue: problem to build in android #github


espeak-ng@groups.io Integration <espeak-ng@...>
 

[espeak-ng:master] New Issue Created by hoseinAzdmlki:
#839 problem to build in android

hi I got this grate error when I want to build ndk for generating .so libs could you help me in this case ?! `In file included from C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:31: C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/../../src/include\espeak/speak_lib.h:1:1: error: expected identifier or '(' ../espeak-ng/speak_lib.h ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:72:39: warning: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Wimplicit-function-declaration] wchar_t *utf32 = (wchar_t *)malloc((strlen(utf8) + 1) * sizeof(wchar_t)); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:72:39: note: include the header or explicitly provide a declaration for 'strlen' C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:108:26: error: unknown type name 'espeak_EVENT' espeak_EVENT *events) { ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:133:5: error: use of undeclared identifier 'ANDROID_LOG_ERROR' LOGE("Failed to get the environment using GetEnv()"); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/include\Log.h:24:39: note: expanded from macro 'LOGE' #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, VA_ARGS) ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:143:14: error: use of undeclared identifier 'ANDROID_LOG_VERBOSE' if (DEBUG) LOGV("%s", FUNCTION); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/include\Log.h:22:39: note: expanded from macro 'LOGV' #define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, VA_ARGS) ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:152:14: error: use of undeclared identifier 'ANDROID_LOG_VERBOSE' if (DEBUG) LOGV("%s [env=%p, object=%p]", FUNCTION, env, object); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/include\Log.h:22:39: note: expanded from macro 'LOGV' #define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, VA_ARGS) ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:156:14: error: use of undeclared identifier 'ANDROID_LOG_VERBOSE' if (DEBUG) LOGV("Initializing with path %s", c_path); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/include\Log.h:22:39: note: expanded from macro 'LOGV' #define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, VA_ARGS) ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:157:20: warning: implicit declaration of function 'espeak_Initialize' is invalid in C99 [-Wimplicit-function-declaration] int sampleRate = espeak_Initialize(AUDIO_OUTPUT_SYNCHRONOUS, BUFFER_SIZE_IN_MILLISECONDS, c_path, 0); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:157:38: error: use of undeclared identifier 'AUDIO_OUTPUT_SYNCHRONOUS' int sampleRate = espeak_Initialize(AUDIO_OUTPUT_SYNCHRONOUS, BUFFER_SIZE_IN_MILLISECONDS, c_path, 0); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:167:14: error: use of undeclared identifier 'ANDROID_LOG_VERBOSE' if (DEBUG) LOGV("%s", FUNCTION); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/include\Log.h:22:39: note: expanded from macro 'LOGV' #define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, VA_ARGS) ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:168:36: warning: implicit declaration of function 'espeak_Info' is invalid in C99 [-Wimplicit-function-declaration] return (*env)->NewStringUTF(env, espeak_Info(NULL)); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:168:36: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Wint-conversion] return (*env)->NewStringUTF(env, espeak_Info(NULL)); ^~~~~~~~~~~~~~~~~ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:174:14: error: use of undeclared identifier 'ANDROID_LOG_VERBOSE' if (DEBUG) LOGV("%s", FUNCTION); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/include\Log.h:22:39: note: expanded from macro 'LOGV' #define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, VA_ARGS) ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:176:9: error: unknown type name 'espeak_VOICE' const espeak_VOICE **voices = espeak_ListVoices(NULL); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:176:33: warning: implicit declaration of function 'espeak_ListVoices' is invalid in C99 [-Wimplicit-function-declaration] const espeak_VOICE **voices = espeak_ListVoices(NULL); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:187:9: error: unknown type name 'espeak_VOICE' const espeak_VOICE *v; ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:216:14: error: use of undeclared identifier 'ANDROID_LOG_VERBOSE' if (DEBUG) LOGV("%s(name=%s)", FUNCTION, c_name); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/include\Log.h:22:39: note: expanded from macro 'LOGV' #define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, VA_ARGS) ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:218:9: error: unknown type name 'espeak_ERROR' const espeak_ERROR result = espeak_SetVoiceByName(c_name); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:218:31: warning: implicit declaration of function 'espeak_SetVoiceByName' is invalid in C99 [-Wimplicit-function-declaration] const espeak_ERROR result = espeak_SetVoiceByName(c_name); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:224:29: error: use of undeclared identifier 'ANDROID_LOG_ERROR' case EE_INTERNAL_ERROR: LOGE("espeak_SetVoiceByName: internal error."); break; ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/include\Log.h:24:39: note: expanded from macro 'LOGE' #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, VA_ARGS) ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:225:29: error: use of undeclared identifier 'ANDROID_LOG_ERROR' case EE_BUFFER_FULL: LOGE("espeak_SetVoiceByName: buffer full."); break; ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/include\Log.h:24:39: note: expanded from macro 'LOGE' #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, VA_ARGS) ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:226:29: error: use of undeclared identifier 'ANDROID_LOG_ERROR' case EE_NOT_FOUND: LOGE("espeak_SetVoiceByName: not found."); break; ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/include\Log.h:24:39: note: expanded from macro 'LOGE' #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, VA_ARGS) ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:237:14: error: use of undeclared identifier 'ANDROID_LOG_VERBOSE' if (DEBUG) LOGV("%s(language=%s, gender=%d, age=%d)", FUNCTION, c_language, gender, age); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/include\Log.h:22:39: note: expanded from macro 'LOGV' #define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, VA_ARGS) ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:239:3: error: use of undeclared identifier 'espeak_VOICE' espeak_VOICE voice_select; ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:240:3: warning: implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned long)' [-Wimplicit-function-declaration] memset(&voice_select, 0, sizeof(espeak_VOICE)); ^ C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:240:3: note: include the header or explicitly provide a declaration for 'memset' C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/jni/jni/eSpeakService.c:240:35: error: use of undeclared identifier 'espeak_VOICE' memset(&voice_select, 0, sizeof(espeak_VOICE)); ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 7 warnings and 20 errors generated. make: *** [C:/Users/Man/AppData/Local/Android/Sdk/ndk/21.0.6113669/build//../build/core/build-binary.mk:476: C:/Users/Man/Desktop/espeak-ng-1.49.1/espeak-ng-1.49.1/android/obj/local/arm64-v8a/objs/ttsespeak/jni /eSpeakService.o] Error 1

`

Join espeak-ng@groups.io to automatically receive all group messages.