## [SOLVED] Error when trying to compile LÖVE-Android

A project to port LÖVE to Android handhelds
gomez
Citizen
Posts: 65
Joined: Mon Feb 18, 2013 12:23 am
Location: Sao Luís, Brazil

### [SOLVED] Error when trying to compile LÖVE-Android

Hey everyone,
I tried to compile the LÖVE-Android, following in the steps of the tutorial proposed in the repository (this one: https://bitbucket.org/MartinFelis/love- ... id_-_Linux) and i've got error in the compilation process.
I pasted the error here: http://pastebin.com/Qfd0V8j6
How do i solve this error ?
Last edited by gomez on Wed Jul 15, 2015 1:15 am, edited 1 time in total.
Hey dude
Do you want to protect earth from an apocalypse ? Me too o/
Check my new game here: viewtopic.php?f=5&t=81001

airstruck
Party member
Posts: 650
Joined: Thu Jun 04, 2015 7:11 pm
Location: Not being time thief.

### Re: Error when trying to compile LÖVE-Android

I think you need C++11, try updating gcc/g++

gomez
Citizen
Posts: 65
Joined: Mon Feb 18, 2013 12:23 am
Location: Sao Luís, Brazil

### Re: Error when trying to compile LÖVE-Android

time thief wrote:I think you need C++11, try updating gcc/g++
I'm using GCC 4.9..
I changed a variable in Application.mk file and then it went further. But I still can't compile T-T
New error: http://pastebin.com/ZBp39Lq3

Last edited by gomez on Wed Jul 15, 2015 1:16 am, edited 1 time in total.
Hey dude
Do you want to protect earth from an apocalypse ? Me too o/
Check my new game here: viewtopic.php?f=5&t=81001

bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

### Re: Error when trying to compile LÖVE-Android

gomez wrote: I'm using GCC 4.9..

Code: Select all

/home/ricardo/bin/android-ndk-r9c/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/hashtable.h:1329: error: undefined reference to 'std::__detail::_Prime_rehash_policy::_M_need_rehash(unsigned int, unsigned int, unsigned int) const'
That suggests you're using gcc 4.8 for your ndk builds. Note that the ndk compiler does not necessarily match up with your system compiler.

As for the problem at hand, when you changed your compiler flags, did you first clean the build directory? These kinds of errors may be caused by switching the configuration mid-compile.

gomez
Citizen
Posts: 65
Joined: Mon Feb 18, 2013 12:23 am
Location: Sao Luís, Brazil

### Re: Error when trying to compile LÖVE-Android

bartbes wrote:
gomez wrote: I'm using GCC 4.9..

Code: Select all

/home/ricardo/bin/android-ndk-r9c/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/hashtable.h:1329: error: undefined reference to 'std::__detail::_Prime_rehash_policy::_M_need_rehash(unsigned int, unsigned int, unsigned int) const'
That suggests you're using gcc 4.8 for your ndk builds. Note that the ndk compiler does not necessarily match up with your system compiler.

As for the problem at hand, when you changed your compiler flags, did you first clean the build directory? These kinds of errors may be caused by switching the configuration mid-compile.
when I pasted the error in pastebin I realized that he was using 4.8 version of gcc.. my mistake T-T
However, gcc 4.8 is compatible with C ++ 11. (I guess)

every time I try to compile again I run 'ndk-build clean' command.. so i guess that it's not the problem
I tried clang instead of gcc, but it returns a bug in the build process.
I have also tried another version of android ndk. The proposal by the tutorial is 9c, which is what's giving this error. I also tested with the 10e, the latest, and returns the same error :/
(from what I've already googled, the error is related to my environment, which is weird because I did exactly what was written in the tutorial)

Hey dude
Do you want to protect earth from an apocalypse ? Me too o/
Check my new game here: viewtopic.php?f=5&t=81001

fysx
Citizen
Posts: 97
Joined: Mon Jan 30, 2012 8:36 pm
Contact:

### Re: Error when trying to compile LÖVE-Android

Hrm... I'm using NDK R10d and GCC 4.8 at the moment without any problems. Maybe you have incompatible environment variables for the NDK?
Bird thing: @fysxdotorg Blog thing: fysx.org

gomez
Citizen
Posts: 65
Joined: Mon Feb 18, 2013 12:23 am
Location: Sao Luís, Brazil

### Re: Error when trying to compile LÖVE-Android

HOLY CRAP
(excuse the expression, but i'm really really happy )

For some reason the standard compiler of my system was the clang instead of gcc, and when I tried to compile with the ndk-build, it mingled gcc and clang. WHOA, what a mess
but beyond that, I needed to add a variable to Application.mk, in the 'jni' folder:

Code: Select all

NDK_TOOLCHAIN_VERSION := 4.8

So, thank you guys, you are awesome
Hey dude
Do you want to protect earth from an apocalypse ? Me too o/
Check my new game here: viewtopic.php?f=5&t=81001

fysx
Citizen
Posts: 97
Joined: Mon Jan 30, 2012 8:36 pm
Contact:

### Re: [SOLVED] Error when trying to compile LÖVE-Android

Thanks for the feedback. Just committed a change that enforces gcc 4.8 from now on.
Bird thing: @fysxdotorg Blog thing: fysx.org

### Who is online

Users browsing this forum: No registered users and 4 guests