Compiling Minetest on Raspberry PI

Post Reply
DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Compiling Minetest on Raspberry PI

by DoyleChris » Post

I have come across this error when trying to compile Minetest on Raspberry PI for PI

Code: Select all

In file included from /home/pi/minetest/src/irrlicht_changes/CGUITTFont.cpp:34:0:
/home/pi/minetest/src/irrlicht_changes/CGUITTFont.h:35:22: fatal error: ft2build.h: No such file or directory
 #include <ft2build.h>
                      ^
compilation terminated.
src/CMakeFiles/minetest.dir/build.make:1694: recipe for target 'src/CMakeFiles/minetest.dir/irrlicht_changes/CGUITTFont.cpp.o' failed
make[2]: *** [src/CMakeFiles/minetest.dir/irrlicht_changes/CGUITTFont.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:307: recipe for target 'src/CMakeFiles/minetest.dir/all' failed
make[1]: *** [src/CMakeFiles/minetest.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
I was using the steps from here https://dev.minetest.net/Compiling_Minetest

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

Re: Compiling Minetest on Raspberry PI

by wziard » Post

I'm not sure if those instructions are up to date. Did the first command report any errors?

ft2build.h is from freetype I think. start your favourite package manager and install the freetype dev package. It *should* have been installed with the first instruction from that link, but if it gave any errors maybe the current raspbian uses a different freetype version.

I succeeded in compiling minetest on a raspberry pi just last week (a rPI3) so it *is* possible, don't despair :-).

I'll see if I can get a list of installed dev packages from my rPI.

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Compiling Minetest on Raspberry PI

by DoyleChris » Post

I was working with Nathan.s last night to get a version running and try it out. If it works we where going to put it on the forum.

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

Re: Compiling Minetest on Raspberry PI

by wziard » Post

DoyleChris wrote:I was working with Nathan.s last night to get a version running and try it out. If it works we where going to put it on the forum.
On a raspberry pi 3B+ it works quite well if you don't install too many mods. You need to enable the hardware 3d and give it maximum video memory with raspi-config.
Furthermore it seems to work a bit better with VBO off, probably because the VBO takes up more video memory.
You should turn down the resolution if you have a high res monitor. 1024x768 works here.
You should set the Mapblock limit to 1000 or you'll get lockups as the raspi starts swapping.
Turn off all fancy stuff.

This leads to a reasonably solid 15 fps, which is enough for my children to declare the game 'working' and chase me away from the rPI, so I didn't do more tweaking.


If you'd like exact steps, I'm probably going to do another rPI tomorrow and I could keep track of all the steps I take.

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Compiling Minetest on Raspberry PI

by DoyleChris » Post

Please

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

Re: Compiling Minetest on Raspberry PI

by wziard » Post

DoyleChris wrote:Please
Ok, If I get around to it I'll keep track of my steps from a virgin raspbian image to a working minetest.

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Compiling Minetest on Raspberry PI

by DoyleChris » Post

Ill run raspbian in command line only or another os from command line.

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

Re: Compiling Minetest on Raspberry PI

by wziard » Post

DoyleChris wrote:Ill run raspbian in command line only or another os from command line.
To run a minetest client, you'll need something graphical though. On Raspbian the 3d accleration is only available through X.

A server can do text-mode only.

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Compiling Minetest on Raspberry PI

by DoyleChris » Post

i just want to run a server thats it.

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

Re: Compiling Minetest on Raspberry PI

by wziard » Post

Oh, ok server only.

I just did the steps to get a client running. I'll post them here anyway. I'll look into a pure text-mode recepy for server only tomorrow.

How to get minetest (client) running on a rasPI 3B+, raspbian.

This howto is meant to run a client with playable framerates. You can of course also use it to just install a server,
but that would probably be a simpler process where you can leave lots of steps out.

-Update your raspbian to the latest version:

Code: Select all

sudo apt update
	sudo apt dist-upgrade
use the raspi-config utility (sudo raspi-config) and change the following settings:

Code: Select all

	boot options -> DESKtoP/CLI -> Desktop (or Desktop autologin)
	advanced options -> expand filesystem (not really needed for minetest, but when you're here anyway it can't hurt)
	advanced options ->  memory split -> 256 MB
	advanced options -> GL Driver -> Fake KMS
tweak these two depending on the monitor you use. don't go too much higher than 1024x768, use pixel doubling if your monitor can't go so low

Code: Select all

	advanced options -> resolution
	advanced options -> pixel doubling
I had a weird bug where, when using pixel doubling the mouse was drawn with it's x/y coordinates halved.


reboot the pi

install some stuff

Code: Select all

	apt install libsqlite3-dev libleveldb-dev libirrlicht-dev libgl1-mesa-dev cmake git build-essential  libopenal-dev libvorbis-dev libcurl4-gnutls-dev libluajit-5.1-dev gettext libgettextpo-dev libpng-dev libjpeg-dev libbz2-dev libspatialindex-dev
(install all dependencies)


Get Minetest

Code: Select all

git clone https://github.com/minetest/minetest
build Minetest

Code: Select all

	cd minetest
	cmake .
	make -j1
wait quite some time .... ignoring some warnings

run bin/minetest

if you want to run local games or a server you need to clone minetest_game into the games subdir as well


N.B.

-The list of stuff to install might be 'overcomplete', as I didn't actually install everything in one go. I just did cmake . and then checked the cmake output to see what packages to install, repeating these steps till cmake ended without errors. I'm not sure if you need gettext or libgettextpo or both for example.
-Don't try to run make with more jobs in parallel. the rPI will run out of memory and hang/swap.

To build just the server you still need the irrlicht headers. You can either download the irrlicht sources and point cmake to where the headers are, or just install all the dev packages above. The last step takes up a bit more space, but is a lot more convenient. Instead of cmake . use cmake -DBUILD_CLIENT=0 -DBUILD_SERVER=1 . . I didn't yet do this last step, so it's untested :-)

Tomorrow I'll follow up with what minetest settings to tweak to get reasonable performance.

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Compiling Minetest on Raspberry PI

by DoyleChris » Post


Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests