phhusson/Superuser

I got undefined reference to 'atexit' when build arm?

Opened this issue · 4 comments

hello, when i build Superuser as instraction, i got this error:

ndk-build
[x86] Install                :su => libs/x86/su
[armeabi] Executable  :su
jni/su/su.c:1001: error: undefined reference to 'atexit'
external/jemalloc/src/jemalloc.c:707: error: undefined reference to 'atexit'
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi/su] Error 1

I look it on google,stack overflow,etc. but i got noting useful,please help me.

Maybe your ndk version is error ,you can build it in R 10 ,but i do not find placehold in the lib.

placeholder is in stableL branch

ehem commented

I'm seeing this with the 12b NDK. I'd prefer to go with the 12b NDK due to aarch64 (ARM-64) support.

With the later versions of the NDK it is defaulting to using clang instead of GCC. They've also moved their issue tracker onto GitHub (https://github.com/android-ndk/ndk/issues)

Speaking of which, you're certain hooking into app_process32 will work on 64-bit devices?

ehem commented

Bit more searching and I found: android/ndk#132

Apparently static builds got broken in r12 of the NDK, either we have to wait for r13 or find the r11 NDK for building.