Build error : undefined reference to '__swbuf'

A project to port LÖVE to Android handhelds
Locked
ixpnu
Prole
Posts: 4
Joined: Mon Apr 02, 2012 1:56 pm

Build error : undefined reference to '__swbuf'

Post 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
Muris
Party member
Posts: 131
Joined: Fri May 23, 2014 9:18 am

Re: Build error : undefined reference to '__swbuf'

Post by Muris »

I also bumped into exactly same problem when I was trying to compile the project, and cannot figure out why this happens.
User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: Build error : undefined reference to '__swbuf'

Post 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
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
Muris
Party member
Posts: 131
Joined: Fri May 23, 2014 9:18 am

Re: Build error : undefined reference to '__swbuf'

Post 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.
Locked

Who is online

Users browsing this forum: No registered users and 0 guests