Android building error

User avatar
Mainpage
Member
 
Posts: 61
Joined: Fri Nov 13, 2015 01:12
GitHub: mainfolio
IRC: mainpage
In-game: mainpage

Android building error

by Mainpage » Thu Jun 09, 2016 21:00

So one day i found this on the wiki http://dev.minetest.net/Android and thought that building minetest for android actually was quite easy So i followed the instructions and installed ALOT of stuff such as, the android sdk and ndk, which took forever btw. Anyways when I finally reached the last step and entered the "make" command in the terminal I was greeted by this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
export NDEBUG=;                                                            \
export BUILD_TYPE=debug;                                                   \
make apk
make[1]: Entering directory '/home/hello/minetest/build/android'
changed timestamp for freetype detected building...
/bin/sh: 15: /ndk-build: not found
Makefile:402: recipe for target '/home/hello/minetest/build/android/deps/freetype2-android//Android/obj/local/armeabi-v7a/libfreetype2-static.a' failed
make[1]: *** [/home/hello/minetest/build/android/deps/freetype2-android//Android/obj/local/armeabi-v7a/libfreetype2-static.a] Error 1
make[1]: Leaving directory '/home/hello/minetest/build/android'
Makefile:157: recipe for target 'debug' failed
make: *** [debug] Error 2

:(
I think the problem is that it can't find the ndk, I can't figure out how to re-enter the path to the ndk (which I did do the first time, perhaps incorrectly.) And it looks like some file failed to build for some obscure reason that is beyond my comprehension. Anyways it would be great if someone could help me figure this stuff out for me, otherwise my few hours of work on this will all be moot.
Edit: I re-cloned the git and then ran the make command, it currently is building right now (It's taking forever).

Edit: done building, got this error
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
jni/../jni/src/guiFormSpecMenu.cpp:3034: error: undefined reference to 'JoystickController::handleEvent(irr::SEvent::SJoystickEvent const&)'
jni/src/game.h:106: error: undefined reference to 'JoystickController::JoystickController()'
jni/src/client/inputhandler.h:72: error: undefined reference to 'JoystickController::handleEvent(irr::SEvent::SJoystickEvent const&)'
jni/src/client/inputhandler.h:303: error: undefined reference to 'JoystickController::clear()'
jni/../jni/src/cguittfont/CGUITTFont.cpp:554: error: undefined reference to 'EnrichedString::getColors() const'
jni/../jni/src/cguittfont/CGUITTFont.cpp:583: error: undefined reference to 'EnrichedString::getString() const'
collect2: error: ld returned 1 exit status
/home/hello/Android/android-ndk-r11c/build/core/build-binary.mk:665: recipe for target 'obj/local/armeabi-v7a/libminetest.so' failed
make[2]: *** [obj/local/armeabi-v7a/libminetest.so] Error 1
make[2]: Leaving directory '/home/hello/minetest/build/android'
Makefile:755: recipe for target 'apk' failed
make[1]: *** [apk] Error 1
make[1]: Leaving directory '/home/hello/minetest/build/android'
Makefile:157: recipe for target 'debug' failed
make: *** [debug] Error 2
I eat baby seals
 

User avatar
Mainpage
Member
 
Posts: 61
Joined: Fri Nov 13, 2015 01:12
GitHub: mainfolio
IRC: mainpage
In-game: mainpage

Re: Android building error

by Mainpage » Fri Jun 10, 2016 13:04

Okay so today I tried re-building it using the same git clone files (or whatever their called) and got the following code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
export NDEBUG=;                                                            \
export BUILD_TYPE=debug;                                                   \
make apk
make[1]: Entering directory '/home/hello/minetest/build/android'
nothing to be done for freetype
nothing to be done for irrlicht
changed /home/hello/minetest/build/android/obj/local/armeabi-v7a/libandroid_native_app_glue.a
assets changed, refreshing...
make[2]: Entering directory '/home/hello/minetest/build/android'
make[2]: Leaving directory '/home/hello/minetest/build/android'
cp: cannot stat '/home/hello/minetest/games/minetest_game': No such file or directory
nothing to be done for iconv
nothing to be done for gmp
nothing to be done for openssl
nothing to be done for curl
nothing to be done for leveldb
nothing to be done for openal
nothing to be done for libogg/libvorbis
make[2]: Entering directory '/home/hello/minetest/build/android'
[armeabi-v7a] SharedLibrary  : libminetest.so
jni/../jni/src/guiEngine.cpp:156: error: undefined reference to 'EnrichedString::EnrichedString()'
jni/../jni/src/guiEngine.cpp:177: error: undefined reference to 'EnrichedString::EnrichedString(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, irr::video::SColor const&)'
jni/../jni/src/guiEngine.cpp:180: error: undefined reference to 'EnrichedString::c_str() const'
jni/../jni/src/guiEngine.cpp:585: error: undefined reference to 'EnrichedString::EnrichedString(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, irr::video::SColor const&)'
jni/../jni/src/guiEngine.cpp:593: error: undefined reference to 'EnrichedString::c_str() const'
jni/../jni/src/chat.cpp:256: error: undefined reference to 'EnrichedString::operator=(wchar_t const*)'
jni/../jni/src/chat.cpp:264: error: undefined reference to 'EnrichedString::operator=(wchar_t const*)'
jni/../jni/src/chat.cpp:270: error: undefined reference to 'EnrichedString::c_str() const'
jni/../jni/src/chat.cpp:307: error: undefined reference to 'EnrichedString::substr(unsigned int, unsigned int) const'
jni/../jni/src/chat.cpp:311: error: undefined reference to 'EnrichedString::substr(unsigned int, unsigned int) const'
jni/../jni/src/chat.cpp:339: error: undefined reference to 'EnrichedString::getString() const'
jni/../jni/src/chat.cpp:346: error: undefined reference to 'EnrichedString::substr(unsigned int, unsigned int) const'
jni/../jni/src/chat.cpp:732: error: undefined reference to 'EnrichedString::EnrichedString()'
jni/../jni/src/chat.cpp:737: error: undefined reference to 'EnrichedString::EnrichedString(wchar_t const*, irr::video::SColor const&)'
jni/../jni/src/chat.cpp:737: error: undefined reference to 'EnrichedString::operator+=(EnrichedString const&)'
jni/../jni/src/chat.cpp:739: error: undefined reference to 'EnrichedString::EnrichedString(wchar_t const*, irr::video::SColor const&)'
jni/../jni/src/chat.cpp:739: error: undefined reference to 'EnrichedString::operator+=(EnrichedString const&)'
jni/../jni/src/chat.cpp:740: error: undefined reference to 'EnrichedString::operator+=(EnrichedString const&)'
jni/../jni/src/chat.cpp:741: error: undefined reference to 'EnrichedString::EnrichedString(wchar_t const*, irr::video::SColor const&)'
jni/../jni/src/chat.cpp:741: error: undefined reference to 'EnrichedString::operator+=(EnrichedString const&)'
jni/../jni/src/chat.h:44: error: undefined reference to 'EnrichedString::EnrichedString(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, irr::video::SColor const&)'
jni/../jni/src/chat.h:44: error: undefined reference to 'EnrichedString::EnrichedString(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, irr::video::SColor const&)'
jni/../jni/src/chat.h:56: error: undefined reference to 'EnrichedString::EnrichedString()'
jni/../jni/src/game.cpp:1282: error: undefined reference to 'EnrichedString::c_str() const'
jni/../jni/src/game.cpp:3245: error: undefined reference to 'JoystickController::getAxisWithoutDead(JoystickAxis)'
jni/../jni/src/game.cpp:3247: error: undefined reference to 'JoystickController::getAxisWithoutDead(JoystickAxis)'
jni/../jni/src/game.cpp:3275: error: undefined reference to 'JoystickController::getAxisWithoutDead(JoystickAxis)'
jni/../jni/src/game.cpp:3276: error: undefined reference to 'JoystickController::getAxisWithoutDead(JoystickAxis)'
jni/../jni/src/irrlicht_changes/static_text.h:208: error: undefined reference to 'irr::gui::StaticText::StaticText(EnrichedString const&, bool, irr::gui::IGUIEnvironment*, irr::gui::IGUIElement*, int, irr::core::rect<int> const&, bool)'
jni/../jni/src/irrlicht_changes/static_text.h:221: error: undefined reference to 'irr::gui::StaticText::setText(EnrichedString const&)'
jni/../jni/src/irrlicht_changes/static_text.h:258: error: undefined reference to 'EnrichedString::EnrichedString(wchar_t const*, irr::video::SColor const&)'
jni/../jni/src/guiFormSpecMenu.cpp:3034: error: undefined reference to 'JoystickController::handleEvent(irr::SEvent::SJoystickEvent const&)'
jni/src/game.h:106: error: undefined reference to 'JoystickController::JoystickController()'
jni/src/client/inputhandler.h:72: error: undefined reference to 'JoystickController::handleEvent(irr::SEvent::SJoystickEvent const&)'
jni/src/client/inputhandler.h:303: error: undefined reference to 'JoystickController::clear()'
jni/../jni/src/cguittfont/CGUITTFont.cpp:554: error: undefined reference to 'EnrichedString::getColors() const'
jni/../jni/src/cguittfont/CGUITTFont.cpp:583: error: undefined reference to 'EnrichedString::getString() const'
collect2: error: ld returned 1 exit status
/home/hello/Android/android-ndk-r11c/build/core/build-binary.mk:665: recipe for target 'obj/local/armeabi-v7a/libminetest.so' failed
make[2]: *** [obj/local/armeabi-v7a/libminetest.so] Error 1
make[2]: Leaving directory '/home/hello/minetest/build/android'
Makefile:755: recipe for target 'apk' failed
make[1]: *** [apk] Error 1
make[1]: Leaving directory '/home/hello/minetest/build/android'
Makefile:157: recipe for target 'debug' failed
make: *** [debug] Error 2

It looks like the debug failed.
I eat baby seals
 

User avatar
Wayward_One
Member
 
Posts: 93
Joined: Tue Jun 10, 2014 18:44
GitHub: Wayward1
IRC: Wayward_One Wayward1
In-game: Wayward_One

Re: Android building error

by Wayward_One » Sun Jun 12, 2016 01:08

These two messages
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
jni/src/game.h:106: error: undefined reference to 'JoystickController::JoystickController()'
jni/../jni/src/guiEngine.cpp:156: error: undefined reference to 'EnrichedString::EnrichedString()'

were recently fixed in this commit; however, I'm not sure what could be causing this one:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
/home/hello/Android/android-ndk-r11c/build/core/build-binary.mk:665: recipe for target 'obj/local/armeabi-v7a/libminetest.so' failed
make[2]: *** [obj/local/armeabi-v7a/libminetest.so] Error 1
"When life becomes a play and I don't know the role I'm cast..."

Latest Minetest builds for Android
 

User avatar
Mainpage
Member
 
Posts: 61
Joined: Fri Nov 13, 2015 01:12
GitHub: mainfolio
IRC: mainpage
In-game: mainpage

Re: Android building error

by Mainpage » Mon Jun 13, 2016 13:40

Thanks, I updated my git, and It build successfully! Now I only have one question, which .apk is the one I use to install on a android phone and/or tablet, and what is it called? Again thanks for the help.
Edit: My build didn't work on my tab though I think it will work on other Android devices
I eat baby seals
 

User avatar
Mainpage
Member
 
Posts: 61
Joined: Fri Nov 13, 2015 01:12
GitHub: mainfolio
IRC: mainpage
In-game: mainpage

Re: Android building error

by Mainpage » Fri Jun 17, 2016 21:12

I found one apk that installs fine and all but it wasn't build with minetest_game help?
EDIT: Okay I checked and found out that the giut clone didn't have minetest_game in it. So I'll try to find it and rebuild it then see how that goes.
EDIT: I cloned the minetest game from git, put it in the minetest/games folder but got this while building it
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
find: ‘./Minetest/games/minetest_game/.git’: No such file or directory

am I supposed to put it in minetest/builds/android/games, even though that folder doesn't exist?
I eat baby seals
 

User avatar
Wayward_One
Member
 
Posts: 93
Joined: Tue Jun 10, 2014 18:44
GitHub: Wayward1
IRC: Wayward_One Wayward1
In-game: Wayward_One

Re: Android building error

by Wayward_One » Sat Jun 18, 2016 03:44

I get that error too, it's apparently harmless though as the apk still builds successfully with the _game.
FWIW, this is the script I use for fresh builds: http://paste.ubuntu.com/17272971/
And afterwards, I just
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
cd minetest; git pull; cd games/minetest_game; git pull
and then rebuild.

As for the two apks, according to http://stackoverflow.com/questions/22058210/why-unaligned-apk-is-needed, the aligned apk is preferred.

Also, about the problem running the apk, could you try posting the error (if any) from the debug.txt here or on GitHub?
"When life becomes a play and I don't know the role I'm cast..."

Latest Minetest builds for Android
 

User avatar
Mainpage
Member
 
Posts: 61
Joined: Fri Nov 13, 2015 01:12
GitHub: mainfolio
IRC: mainpage
In-game: mainpage

Re: Android building error

by Mainpage » Sat Jun 18, 2016 13:17

I'll re-build with your script and see how that goes. Anyways here is the error:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2016-06-14 15:18:48: ACTION[Server]: singleplayer joins game. List of players: singleplayer
2016-06-14 15:18:57: ERROR[Server]: An unhandled exception occurred: Failed to save block: attempt to write a readonly database
2016-06-14 15:18:57: ERROR[Server]: In thread e3a00000:
2016-06-14 15:18:57: ERROR[Server]: jni/../jni/src/server.cpp:73: virtual void* ServerThread::run(): A fatal error occured: Failed to save block: attempt to write a readonly database
2016-06-14 15:18:57: ERROR[Server]: Debug stacks:
2016-06-14 15:18:57: ERROR[Server]: DEBUG STACK FOR THREAD e37b3000:
2016-06-14 15:18:57: ERROR[Server]: #0  virtual void* UpdateThread::run()
2016-06-14 15:18:57: ERROR[Server]: DEBUG STACK FOR THREAD e37c0000:
2016-06-14 15:18:57: ERROR[Server]: #0  virtual void* EmergeThread::run()
2016-06-14 15:18:57: ERROR[Server]: DEBUG STACK FOR THREAD e37c3000:
2016-06-14 15:18:57: ERROR[Server]: #0  virtual void* UpdateThread::run()
2016-06-14 15:18:57: ERROR[Server]: DEBUG STACK FOR THREAD e3a00000:
2016-06-14 15:18:57: ERROR[Server]: #0  virtual void* ServerThread::run()
2016-06-14 15:18:57: ERROR[Server]: DEBUG STACK FOR THREAD f070d000:
2016-06-14 15:18:57: ERROR[Server]: #0  int main(int, char**)

Edit: Re-built with your build script and got the same error.
I eat baby seals
 


Return to Minetest Builds

Who is online

Users browsing this forum: No registered users and 2 guests

cron