Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't compile on mips #4

Closed
umito opened this issue Jul 28, 2014 · 5 comments
Closed

can't compile on mips #4

umito opened this issue Jul 28, 2014 · 5 comments

Comments

@umito
Copy link

umito commented Jul 28, 2014

[mips] Compile        : NativeSampler <= coffeecatch.c
jni/coffeecatch/coffeecatch.c:79:58: error: 'SIGSTKFLT' undeclared here (not in a function)
jni/coffeecatch/coffeecatch.c: In function 'coffeecatch_get_pc_from_ucontext':
jni/coffeecatch/coffeecatch.c:1011:2: error: #error "Architecture is unknown, please report me!"
make.exe: *** [obj/local/mips/objs/NativeSampler/coffeecatch/coffeecatch.o] Error 1

armeabi works perfectly, but when it comes to the mips part, it won't compile.
Using android-ndk-r9d-windows-x86_64

@umito
Copy link
Author

umito commented Jul 28, 2014

Also, below android 2.2 (or possibly 2.3) sigaltstack is not available and causes loadLibrary to fail. I tested this on emulator and device. Is there a minimum Android version that is supported?

@xroche
Copy link
Owner

xroche commented Jul 29, 2014

Normally 2.2 should be fine!

@xroche
Copy link
Owner

xroche commented Jul 29, 2014

Can you test MIPS now ? Issue with "Architecture is unknown" should be fixed by ae35ddb

@umito
Copy link
Author

umito commented Jul 29, 2014

It compiles perfectly now on MIPS and catches the error and provides a somewhat proper stacktrace.

I don't know if it is just the emulator, the native stacktrace is not very detailed here, it doesn't show the native method names. Is this is a limitation of MIPS or just the emulator?

Anyway thanks for the fix!

`07-29 17:33:18.333: A/libc(1539): Fatal signal 11 (SIGSEGV) at 0x00000018 (code=1), thread 1558 (Thread-72)
07-29 17:33:18.333: W/dalvikvm(1539): threadid=10: thread exiting with uncaught exception (group=0xb4eea288)
07-29 17:33:18.333: E/AndroidRuntime(1539): FATAL EXCEPTION: Thread-72
07-29 17:33:18.333: E/AndroidRuntime(1539): java.lang.Error: signal 11 (Address not mapped to object) at address 0x18 [at libcoffeedJNI.so:0x2deb (_Z4playP7_JNIEnvP7_jclassxixx+0x8b)]
07-29 17:33:18.333: E/AndroidRuntime(1539):     at nativesampler.NativeSampler.play(Native Method)
07-29 17:33:18.333: E/AndroidRuntime(1539):     at nativesampler.NativeSampler.play(NativeSampler.java:213)
[..]
07-29 17:33:18.333: E/AndroidRuntime(1539): Caused by: java.lang.Error: signal 11 (Address not mapped to object) at address 0x18 [at libcoffeedJNI.so:0x2deb (_Z4playP7_JNIEnvP7_jclassxixx+0x8b)]
07-29 17:33:18.333: E/AndroidRuntime(1539):     at data.data.umito_android_minipiano_pro.lib.libcoffeedJNI_so.0x2deb(Native Method)
07-29 17:33:18.333: E/AndroidRuntime(1539):     at system.lib.libc_so.0x1400(Native Method)
07-29 17:33:18.333: E/AndroidRuntime(1539):     at data.data.umito_android_minipiano_pro.lib.libNativeSampler_so.0x35d0(Native Method)
07-29 17:33:18.333: E/AndroidRuntime(1539):     at <unknown>.0x20247489(Native Method)

@xroche
Copy link
Owner

xroche commented Jul 29, 2014

Unfortunately there is no simple way to get the function name directly.

However, you can easily get it using addr2line:

PATH_TO_ANDROID_SDK/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-addr2line -C -f -e libNativeSampler.so 0x35d0

(replace PATH_TO_ANDROID_SDK by correct path and use proper architecture, of course)

EDIT: with Android >= 4.1.1, you should get the function names (libcorkscrew is used by coffeecatch, if available)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants