Compiling Minetest on Raspberry PI

Compiling Minetest on Raspberry PI

Postby DoyleChris » Thu Jan 03, 2019 1:46 am

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
DoyleChris
Member
 
Posts: 224
Joined: Sat Jul 25, 2015 7:54 pm
In-game: DoyleChris

Re: Compiling Minetest on Raspberry PI

Postby wziard » Thu Jan 03, 2019 11:14 am

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.
wziard
Member
 
Posts: 129
Joined: Mon Oct 29, 2018 7:12 pm

Re: Compiling Minetest on Raspberry PI

Postby DoyleChris » Thu Jan 03, 2019 1:07 pm

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.
DoyleChris
Member
 
Posts: 224
Joined: Sat Jul 25, 2015 7:54 pm
In-game: DoyleChris

Re: Compiling Minetest on Raspberry PI

Postby wziard » Thu Jan 03, 2019 2:48 pm

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.
wziard
Member
 
Posts: 129
Joined: Mon Oct 29, 2018 7:12 pm

Re: Compiling Minetest on Raspberry PI

Postby DoyleChris » Thu Jan 03, 2019 4:13 pm

Please
DoyleChris
Member
 
Posts: 224
Joined: Sat Jul 25, 2015 7:54 pm
In-game: DoyleChris

Re: Compiling Minetest on Raspberry PI

Postby wziard » Thu Jan 03, 2019 4:21 pm

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.
wziard
Member
 
Posts: 129
Joined: Mon Oct 29, 2018 7:12 pm

Re: Compiling Minetest on Raspberry PI

Postby DoyleChris » Thu Jan 03, 2019 4:27 pm

Ill run raspbian in command line only or another os from command line.
DoyleChris
Member
 
Posts: 224
Joined: Sat Jul 25, 2015 7:54 pm
In-game: DoyleChris

Re: Compiling Minetest on Raspberry PI

Postby wziard » Thu Jan 03, 2019 7:56 pm

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.
wziard
Member
 
Posts: 129
Joined: Mon Oct 29, 2018 7:12 pm

Re: Compiling Minetest on Raspberry PI

Postby DoyleChris » Thu Jan 03, 2019 8:34 pm

i just want to run a server thats it.
DoyleChris
Member
 
Posts: 224
Joined: Sat Jul 25, 2015 7:54 pm
In-game: DoyleChris

Re: Compiling Minetest on Raspberry PI

Postby wziard » Thu Jan 03, 2019 11:09 pm

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.
wziard
Member
 
Posts: 129
Joined: Mon Oct 29, 2018 7:12 pm

Re: Compiling Minetest on Raspberry PI

Postby DoyleChris » Fri Jan 04, 2019 2:19 am

DoyleChris
Member
 
Posts: 224
Joined: Sat Jul 25, 2015 7:54 pm
In-game: DoyleChris

Re: Compiling Minetest on Raspberry PI

Postby wziard » Sat Mar 30, 2019 7:06 pm

Some additional info on the client settings to get playable framerates:

- set all quality settings as low as possible (no antialias, no texturefilter, no shaders)
- set view distance to 20 or so. (It's less bad than it sounds)
advanced settings:
graphics->basic->enable_vbo disabled
graphics->basic->leaves_style simple
client->advanced->mapblock_limit 1000 <===========this is the most important setting. If you get hangs because the pi runs out of memory, lower this setting.
wziard
Member
 
Posts: 129
Joined: Mon Oct 29, 2018 7:12 pm



Return to Problems



Who is online

Users browsing this forum: Google Bot [Bot] and 0 guests