arm64-v8a ndk build error:redefinition of 'struct user_regs_struct'

637 views
Skip to first unread message

sunshinec...@gmail.com

unread,
Oct 21, 2016, 2:52:27 AM10/21/16
to google-breakpad-discuss
i try to ndk-build breakpad.
but build failed.

here is error log : 

[arm64-v8a] Compile++      : bugeaseNDK <= main.cpp
In file included from d:\users\appdata\local\android\sdk\ndk-bundle
\platforms\android-21\arch-arm64\usr\include\sys\ucontext.h:33:0,
                 from d:\users\appdata\local\android\sdk\ndk-bundle
\platforms\android-21\arch-arm64\usr\include\signal.h:51,
                 from D:/Users/AppData/Local/Android/sdk/ndk-bundle
/build//../sources/cxx-stl/stlport/stlport/signal.h:28,
                 from projectname/src/main/jni/src/client/linux/handler/exception_handler.h:33,
                 from projectname/src/main/jni/main.cpp:5:
projectname/src/main/jni/
src/common/android/include/sys/user.h:68:8: error: redefinition of 'struct user_
regs_struct'
 struct user_regs_struct {
        ^
In file included from /src/main/jni/src/common/android/include/sys/user.h:51:0,
                 from d:\users\hzchanglimei\appdata\local\android\sdk\ndk-bundle
\platforms\android-21\arch-arm64\usr\include\sys\ucontext.h:33,
                 from d:\users\hzchanglimei\appdata\local\android\sdk\ndk-bundle
\platforms\android-21\arch-arm64\usr\include\signal.h:51,
                 from D:/Users/AppData/Local/Android/sdk/ndk-bundle
/build//../sources/cxx-stl/stlport/stlport/signal.h:28,
                 from /src/main/jni/src/client/linux/handler/exception_handler.h:33,
                 from /src/main/jni/main.cpp:5:
d:\users\appdata\local\android\sdk\ndk-bundle\platforms\android-21\
arch-arm64\usr\include\sys\user.h:235:8: error: previous definition of 'struct u
ser_regs_struct'
 struct user_regs_struct {
        ^
In file included from d:\users\appdata\local\android\sdk\ndk-bundle
\platforms\android-21\arch-arm64\usr\include\sys\ucontext.h:33:0,
                 from d:\users\hzchanglimei\appdata\local\android\sdk\ndk-bundle
\platforms\android-21\arch-arm64\usr\include\signal.h:51,
                 from D:/Users/AppData/Local/Android/sdk/ndk-bundle
/build//../sources/cxx-stl/stlport/stlport/signal.h:28,
                 from /src/main/jni/src/client/linux/handler/exception_handler.h:33,
                 from /src/main/jni/main.cpp:5:
D:/src/main/jni/src/common/android/include/sys/user.h:74:8: error: redefinition of 'struct user_
fpsimd_struct'
 struct user_fpsimd_struct {
        ^
In file included from /src/main/jni/src/common/android/include/sys/user.h:51:0,
                 from d:\users\hzchanglimei\appdata\local\android\sdk\ndk-bundle
\platforms\android-21\arch-arm64\usr\include\sys\ucontext.h:33,
                 from d:\users\appdata\local\android\sdk\ndk-bundle
\platforms\android-21\arch-arm64\usr\include\signal.h:51,
                 from D:/Users/AppData/Local/Android/sdk/ndk-bundle
/build//../sources/cxx-stl/stlport/stlport/signal.h:28,
                 from /src/main/jni/src/client/linux/handler/exception_handler.h:33,
                 from /src/main/jni/main.cpp:5:
d:\users\appdata\local\android\sdk\ndk-bundle\platforms\android-21\
arch-arm64\usr\include\sys\user.h:241:8: error: previous definition of 'struct u
ser_fpsimd_struct'
 struct user_fpsimd_struct {

        ^

Michael Truong

unread,
Nov 28, 2016, 5:22:27 PM11/28/16
to google-breakpad-discuss
I ran into this problem not too long ago. I resolved it because I was compiling on windows architecture while in a linux VM...in the end I just installed NDK for windows and compiled it with APP_STL := gnustl_static in my Applcaiton.mk.

gmoving

unread,
Nov 29, 2016, 5:36:35 AM11/29/16
to google-breakpad-discuss

hi,Michael, i did it as you say,using NDK installed at windows to compile it, but it did not work, the issue is still there, do you hava some other ideas? thanks a lot~

gmoving

unread,
Nov 29, 2016, 9:55:38 PM11/29/16
to google-breakpad-discuss
i solved this problem by delete the user.h file which located in path "breakpad\src\common\android\include\sys"!
Reply all
Reply to author
Forward
0 new messages