coffeecatch icon indicating copy to clipboard operation
coffeecatch copied to clipboard

Redinition & Previous definition error: _libc_fpreg , struct _libc_fpreg, etc,.

Open shanmugpriyan306 opened this issue 6 years ago • 3 comments

When I try to Build project from terminal getting following error: ndk-build

C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:120:8: error: redefinition of '_libc_fpreg' struct _libc_fpreg { ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:174:8: note: previous definition is here struct _libc_fpreg { ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:126:8: error: redefinition of '_libc_fpstate' struct _libc_fpstate { ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:179:8: note: previous definition is here struct _libc_fpstate { ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:138:19: error: typedef redefinition with different types ('uint32_t' (aka 'unsigned int') vs 'int') typedef uint32_t greg_t; ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:171:13: note: previous definition is here typedef int greg_t; ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:145:3: error: typedef redefinition with different types ('struct mcontext_t' vs 'struct mcontext_t') } mcontext_t; ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:198:3: note: previous definition is here } mcontext_t; ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:148:3: error: redefinition of enumerator 'REG_GS' REG_GS = 0, ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:130:16: note: expanded from macro 'REG_GS' #define REG_GS REG_GS ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:129:3: note: previous definition is here REG_GS = 0, ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:149:3: error: redefinition of enumerator 'REG_FS' REG_FS, ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:132:16: note: expanded from macro 'REG_FS' #define REG_FS REG_FS ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:131:3: note: previous definition is here REG_FS, ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:150:3: error: redefinition of enumerator 'REG_ES' REG_ES, ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:134:16: note: expanded from macro 'REG_ES' #define REG_ES REG_ES ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:133:3: note: previous definition is here REG_ES, ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:151:3: error: redefinition of enumerator 'REG_DS' REG_DS, ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:136:16: note: expanded from macro 'REG_DS' #define REG_DS REG_DS ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:135:3: note: previous definition is here REG_DS, ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:152:3: error: redefinition of enumerator 'REG_EDI' REG_EDI, ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:138:17: note: expanded from macro 'REG_EDI' #define REG_EDI REG_EDI ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:137:3: note: previous definition is here REG_EDI, ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:153:3: error: redefinition of enumerator 'REG_ESI' REG_ESI, ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:140:17: note: expanded from macro 'REG_ESI' #define REG_ESI REG_ESI ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:139:3: note: previous definition is here REG_ESI, ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:154:3: error: redefinition of enumerator 'REG_EBP' REG_EBP, ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:142:17: note: expanded from macro 'REG_EBP' #define REG_EBP REG_EBP ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:141:3: note: previous definition is here REG_EBP, ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:155:3: error: redefinition of enumerator 'REG_ESP' REG_ESP, ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:144:17: note: expanded from macro 'REG_ESP' #define REG_ESP REG_ESP ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:143:3: note: previous definition is here REG_ESP, ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:156:3: error: redefinition of enumerator 'REG_EBX' REG_EBX, ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:146:17: note: expanded from macro 'REG_EBX' #define REG_EBX REG_EBX ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:145:3: note: previous definition is here REG_EBX, ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:157:3: error: redefinition of enumerator 'REG_EDX' REG_EDX, ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:148:17: note: expanded from macro 'REG_EDX' #define REG_EDX REG_EDX ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:147:3: note: previous definition is here REG_EDX, ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:158:3: error: redefinition of enumerator 'REG_ECX' REG_ECX, ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:150:17: note: expanded from macro 'REG_ECX' #define REG_ECX REG_ECX ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:149:3: note: previous definition is here REG_ECX, ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:159:3: error: redefinition of enumerator 'REG_EAX' REG_EAX, ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:152:17: note: expanded from macro 'REG_EAX' #define REG_EAX REG_EAX ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:151:3: note: previous definition is here REG_EAX, ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:160:3: error: redefinition of enumerator 'REG_TRAPNO' REG_TRAPNO, ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:154:20: note: expanded from macro 'REG_TRAPNO' #define REG_TRAPNO REG_TRAPNO ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:153:3: note: previous definition is here REG_TRAPNO, ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:161:3: error: redefinition of enumerator 'REG_ERR' REG_ERR, ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:156:17: note: expanded from macro 'REG_ERR' #define REG_ERR REG_ERR ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:155:3: note: previous definition is here REG_ERR, ^ C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/jni/externals/coffeecatch/coffeecatch.c:162:3: error: redefinition of enumerator 'REG_EIP' REG_EIP, ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:158:17: note: expanded from macro 'REG_EIP' #define REG_EIP REG_EIP ^ C:/Users/Admin/User1/Sdk/Sdk/ndk-bundle/build//../sysroot/usr/include\sys/ucontext.h:157:3: note: previous definition is here REG_EIP, ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make: *** [C:/Users/Admin/Desktop/test-isssu/testPlugin/testtestLibrary/obj/local/x86/objs/wfds/externals/coffeecatch/coffeecatch.o] Error 1

Let me know If anyother informaiton required

shanmugpriyan306 avatar Oct 01 '18 03:10 shanmugpriyan306

I meet too, don't know why.

Mintegral-official avatar May 08 '19 08:05 Mintegral-official

#MeTo :))) All is OK under NDK r9d, but the same problem under r16b. Seems like some libraries which coffee uses in dependencies already exists in r16b (and does not exist in r9d) and compiler reports about redefinition under r16d.

isabsent avatar May 21 '19 04:05 isabsent

Same here.

hajimehoshi avatar Oct 05 '19 16:10 hajimehoshi