Page 1 of 1

Build error : undefined reference to '__swbuf'

Posted: Sun Oct 26, 2014 6:26 pm
by ixpnu
Hi,
I get the same error when trying to build love-android on both windows and (x)ubuntu 14.01.1. What am I doing wrong?

This is the tail end of the output of ndk-build (ubuntu):

...
[armeabi] Compile thumb : SDL2_static <= SDL_android_main.c
[armeabi] StaticLibrary : libSDL2.a
[armeabi] SharedLibrary : liblove.so

[...] android-ndk/android-ndk-r10c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: jni/LuaJIT-2.0.1/android/armeabi/libluajit.a(lib_base.o): in function lj_cf_print:lib_base.c(.text+0x1ac): error: undefined reference to '__swbuf'

[...] android-ndk/android-ndk-r10c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: jni/LuaJIT-2.0.1/android/armeabi/libluajit.a(lib_base.o): in function lj_cf_print:lib_base.c(.text+0x2b4): error: undefined reference to '__swbuf'

[...] android-ndk/android-ndk-r10c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: jni/LuaJIT-2.0.1/android/armeabi/libluajit.a(lib_io.o): in function io_file_read:lib_io.c(.text+0x4f4): error: undefined reference to '__srget'

collect2: ld returned 1 exit status

make: *** [obj/local/armeabi/liblove.so] Error 1

Re: Build error : undefined reference to '__swbuf'

Posted: Sat Nov 15, 2014 1:26 pm
by Muris
I also bumped into exactly same problem when I was trying to compile the project, and cannot figure out why this happens.

Re: Build error : undefined reference to '__swbuf'

Posted: Sat Nov 15, 2014 9:07 pm
by miko
Muris wrote:I also bumped into exactly same problem when I was trying to compile the project, and cannot figure out why this happens.
https://groups.google.com/forum/#!topic ... su1HyYMwVc
Try downgrading android NDK

Re: Build error : undefined reference to '__swbuf'

Posted: Sat Nov 15, 2014 10:31 pm
by Muris
miko wrote:
Muris wrote:I also bumped into exactly same problem when I was trying to compile the project, and cannot figure out why this happens.
https://groups.google.com/forum/#!topic ... su1HyYMwVc
Try downgrading android NDK
Thank you, it was actually the version 10c that didn't work. I found version 10b for windows, and managed to compile love without any problems. Now I am not just sure if I should use
64bit: dl.google.com/android/ndk/android-ndk32-r10b-windows-x86_64.zip
or 32bit dl.google.com/android/ndk/android-ndk32-r10b-windows-x86.zip

It seems that regardless which nda i used (64/32bit), it seems to run at least on my android.

In case someone else tries to find other system older versions, this link at least works atm to browse old version of the site: https://web.archive.org/web/20140907152 ... index.html

At least for windows versions just changing 10 to 10b worked.