phhusson / Superuser

Keeping koush's Superuser fresh
GNU General Public License v3.0
423 stars 50 forks source link

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

Open takboo opened 8 years ago

takboo commented 8 years ago

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.

wangyunpeng1992 commented 8 years ago

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

phhusson commented 8 years ago

placeholder is in stableL branch

ehem commented 8 years ago

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 8 years ago

Bit more searching and I found: android-ndk/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.