Minetest on Rasbpberry Pi

Ivà
Member
Posts: 115
Joined: Sun Feb 22, 2015 07:11
GitHub: melzua
IRC: melzua
In-game: melzua
Location: Catalonia

Re: Minetest on Rasbpberry Pi

by Ivà » Post

4aiman wrote:I've tried to compile the latest MT last night, but sadly it didn't finish even half of it when I came up.
Uhmmmm... 4aiman I compile the git MT server on my RPi 1 in about 90 minutes. I don't use any special trick to do it and my RPI 1 is only slightly overclocked (800 MHz).

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: Minetest on Rasbpberry Pi

by 4aiman » Post

Try performing a "clean" compilation and see the difference.

BTW, if you're able to do what is needed, then it would be cool to share your way of doing it and free me from performing useless activity ;)

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: Minetest on Rasbpberry Pi

by 4aiman » Post

@Amicadi

You need to either build OGLES Irrlicht or supply a egl header and library.
The first way worked for me. (Haven't try the second way at all.)

Anyway, you'll need to install libgl-mesa-x11-dev (look through this thread to find the exact name - it's not that long)
I
Then search for header and libs in /opt/vc/include and use those to build the client.


PS: This
http://dev.minetest.net/CMake_Options wrote:OpenGL ES
EGL_INCLUDE_DIR - directory that contains egl.h
EGL_LIBRARY - path to libEGL.a/libEGL.so
OPENGLES2_INCLUDE_DIR - directory that contains gl2.h
OPENGLES2_LIBRARY - path to libGLESv2.a/libGLESv2.so
doesn't work without ENABLE_GLES=1

Amicadi
Member
Posts: 13
Joined: Fri Sep 04, 2015 00:40

Re: Minetest on Rasbpberry Pi

by Amicadi » Post

4aiman wrote:@Amicadi

You need to either build OGLES Irrlicht or supply a egl header and library.
The first way worked for me. (Haven't try the second way at all.)

Anyway, you'll need to install libgl-mesa-x11-dev (look through this thread to find the exact name - it's not that long)
I
Then search for header and libs in /opt/vc/include and use those to build the client.


PS: This
http://dev.minetest.net/CMake_Options wrote:OpenGL ES
EGL_INCLUDE_DIR - directory that contains egl.h
EGL_LIBRARY - path to libEGL.a/libEGL.so
OPENGLES2_INCLUDE_DIR - directory that contains gl2.h
OPENGLES2_LIBRARY - path to libGLESv2.a/libGLESv2.so
doesn't work without ENABLE_GLES=1
Yes at raspbian2015-05-05:

Code: Select all

pi@pi ~ $ apt-cache search libgl mesa x11
libgl1-mesa-dev - free implementation of the OpenGL API -- GLX development files
libgl1-mesa-dri - free implementation of the OpenGL API -- DRI modules
libgl1-mesa-dri-dbg - Debugging symbols for the Mesa DRI modules
libgl1-mesa-dri-experimental - free implementation of the OpenGL API -- Extra DRI modules
libgl1-mesa-dri-experimental-dbg - Debugging symbols for the experimental Mesa DRI modules
libgl1-mesa-glx - free implementation of the OpenGL API -- GLX runtime
libgl1-mesa-glx-dbg - Debugging symbols for the Mesa GLX runtime
libgl1-mesa-swx11 - free implementation of the OpenGL API -- runtime
libgl1-mesa-swx11-dbg - free implementation of the OpenGL API -- debugging symbols
libgl1-mesa-swx11-dev - free implementation of the OpenGL API -- development files
I was missing libgl1-mesa-swx11-dev, in its place i had libgl1-mesa-dev:

Code: Select all

dpkg: libgl1-mesa-dev: dependency problems, but removing anyway as you requested:
 libglu1-mesa-dev depends on libgl1-mesa-dev | libgl-dev; however:
  Package libgl1-mesa-dev is to be removed.
  Package libgl-dev is not installed.
  Package libgl1-mesa-dev which provides libgl-dev is to be removed.
 libglu1-mesa-dev depends on libgl1-mesa-dev | libgl-dev; however:
  Package libgl1-mesa-dev is to be removed.
  Package libgl-dev is not installed.
  Package libgl1-mesa-dev which provides libgl-dev is to be removed.
(Reading database ... 92051 files and directories currently installed.)
Removing libgl1-mesa-dev ...
After that, sudo apt-get install libgl1-mesa-swx11-dev and recompiling the whole thing with best hopes :-)
Last edited by Amicadi on Wed Sep 09, 2015 12:06, edited 1 time in total.

Ivà
Member
Posts: 115
Joined: Sun Feb 22, 2015 07:11
GitHub: melzua
IRC: melzua
In-game: melzua
Location: Catalonia

Re: Minetest on Rasbpberry Pi

by Ivà » Post

4aiman wrote:Try performing a "clean" compilation and see the difference.

BTW, if you're able to do what is needed, then it would be cool to share your way of doing it and free me from performing useless activity ;)
As I said before I don't do any special trick, just git clone, cmake and make. Note that I said that I'm only compiling the server, not irrlicht or opengl or something else.

Dartmouth
Member
Posts: 121
Joined: Sat Dec 06, 2014 14:39

Re: Minetest on Rasbpberry Pi

by Dartmouth » Post

Compiling the server took me less than half an hour on the quadcore RPi2...

Amicadi
Member
Posts: 13
Joined: Fri Sep 04, 2015 00:40

Re: Minetest on Rasbpberry Pi

by Amicadi » Post

@4aiman Thank for your help

Irrlicht-ogl-es (from http://svn.code.sf.net/p/irrlicht/code/branches/ogl-es/ ) is compiled with:

#define _IRR_COMPILE_WITH_OPENGL_
#define _IRR_COMPILE_WITH_OGLES1_
#define _IRR_COMPILE_WITH_OGLES2_
#define _IRR_COMPILE_WITH_EGL_MANAGER_
#define _IRR_COMPILE_WITH_GLX_MANAGER_
#define _IRR_COMPILE_WITH_X11_DEVICE_

make clean && make

Minetest is compiled as:

make clean
cmake . -DRUN_IN_PLACE=TRUE -DENABLE_GLES=1 -DEGL_INCLUDE_DIR=/opt/vc/include/EGL -DEGL_LIBRARY=/usr/lib/arm-linux-gnueabihf/libEGL.so -DOPENGLES2_INCLUDE_DIR=/opt/vc/include/GLES2 -DOPENGLES2_LIBRARY=/usr/lib/arm-linux-gnueabihf/libGLESv2.so -DFREETYPE_INCLUDE_DIR_freetype2=/usr/include/freetype2 -DFREETYPE_INCLUDE_DIR_ft2build=/usr/include/freetype2 -DFREETYPE_LIBRARY=/usr/lib/arm-linux-gnueabihf/libfreetype.a -DIRRLICHT_INCLUDE_DIR=/home/pi/irrlicht/ogl-es/include -DIRRLICHT_LIBRARY=/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a
make -j 4

In the system are installed these packages:

libegl1-mesa-dev - free implementation of the EGL API -- development files
libgegl-dev - Generic Graphics Library (development files)
libgles2-mesa-dev - free implementation of the OpenGL|ES 2.x API -- development files
libgl1-mesa-swx11-dev - free implementation of the OpenGL API -- development files


still, getting these errors at linking time:

Code: Select all

Linking CXX executable ../bin/minetest
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(COGLESDriver.o): In function `irr::video::COGLES1Driver::drawVertexPrimitiveList2d3d(void const*, unsigned int, void const*, unsigned int, irr::video::E_VERTEX_TYPE, irr::scene::E_PRIMITIVE_TYPE, irr::video::E_INDEX_TYPE, bool)':
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESDriver.cpp:773: undefined reference to `glPointSizePointerOES'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(COGLESDriver.o): In function `irr::video::COGLES1Driver::uploadClipPlane(unsigned int)':
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESDriver.cpp:3098: undefined reference to `glClipPlanef'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(COGLESExtensionHandler.o): In function `irr::video::COGLES1ExtensionHandler::initExtensions(irr::video::COGLES1Driver*, bool)':
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESExtensionHandler.cpp:248: undefined reference to `eglGetProcAddress'
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESExtensionHandler.cpp:249: undefined reference to `eglGetProcAddress'
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESExtensionHandler.cpp:250: undefined reference to `eglGetProcAddress'
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESExtensionHandler.cpp:251: undefined reference to `eglGetProcAddress'
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESExtensionHandler.cpp:255: undefined reference to `eglGetProcAddress'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(COGLESExtensionHandler.o):/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESExtensionHandler.cpp:259: more undefined references to `eglGetProcAddress' follow
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(COGLES2Driver.o): In function `irr::video::COGLES2Driver::testEGLError()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLES2Driver.cpp:1663: undefined reference to `eglGetError'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::initialize(irr::SIrrlichtCreationParameters const&, irr::video::SExposedVideoData const&)':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:48: undefined reference to `eglGetDisplay'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:66: undefined reference to `eglInitialize'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::terminate()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:88: undefined reference to `eglMakeCurrent'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:90: undefined reference to `eglTerminate'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::generateSurface()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:160: undefined reference to `eglChooseConfig'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:249: undefined reference to `eglCreateWindowSurface'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:252: undefined reference to `eglCreateWindowSurface'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:259: undefined reference to `eglBindAPI'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:263: undefined reference to `eglSwapInterval'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::destroySurface()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:274: undefined reference to `eglMakeCurrent'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:276: undefined reference to `eglDestroySurface'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::generateContext()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:310: undefined reference to `eglCreateContext'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::destroyContext()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:329: undefined reference to `eglMakeCurrent'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:330: undefined reference to `eglDestroyContext'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::activateContext(irr::video::SExposedVideoData const&)':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:337: undefined reference to `eglMakeCurrent'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::swapBuffers()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:354: undefined reference to `eglSwapBuffers'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::testEGLError()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:360: undefined reference to `eglGetError'
collect2: ld returned 1 exit status
src/CMakeFiles/minetest.dir/build.make:4827: recipe for target 'bin/minetest' failed
make[2]: *** [bin/minetest] Error 1
CMakeFiles/Makefile2:136: recipe for target 'src/CMakeFiles/minetest.dir/all' failed
make[1]: *** [src/CMakeFiles/minetest.dir/all] Error 2
Makefile:133: recipe for target 'all' failed
make: *** [all] Error 2

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: Minetest on Rasbpberry Pi

by 4aiman » Post

@Ivà (may I call you just "Iva"? I don't have "à" in my kb layouts)
Well, I'm compiling the entire Minetest - client and server :)
Haven't tried to build server only.


@Amicadi
I'm still away from my RPi but I'm using a virtual RPi to build MT at the very moment.
Once I'm done, I'll share the *.img files I use as well as the tutorial on how to setup a virtual Pi.

Gotta go now...

Amicadi
Member
Posts: 13
Joined: Fri Sep 04, 2015 00:40

Re: Minetest on Rasbpberry Pi

by Amicadi » Post

Continuing with Minetest compilation with OpenGL ES support.

Minetest linking is done by the command at /home/pi/minetest/src/CMakeFiles/minetest.dir/link.txt

Code: Select all

/usr/bin/c++   -DNDEBUG -Wall   -ffast-math -Wall -pipe -funroll-loops -O3 -fomit-frame-pointer  ...Long list of object files... ../bin/minetest -rdynamic -lz /home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a -lGLU -lGL -lX11 -lXext -ljpeg -lbz2 -lpng -lz -lX11 -lXext -lopenal -lvorbisfile -lvorbis -logg -lsqlite3 lua/build/liblua.a -lgmp json/libjsoncpp.a -lGLESv2 -lX11 -lXext -lGLESv2 -lrt -lpthread -ldl -lXxf86vm -lcurl -Wl,-Bstatic -lfreetype cguittfont/libcguittfont.a -Wl,-Bdynamic -ljpeg -lbz2 -lpng -lopenal -lvorbisfile -lvorbis -logg -lsqlite3 -lgmp -lrt -lpthread -ldl -lXxf86vm -lcurl /home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a -lz -Wl,-Bstatic -lfreetype -Wl,-Bdynamic
Here there is somethings missing. As seen, Irrlicht is linked without -lGLESv2 or -lEGL flags and -L/opt/vc/lib is not there which seem to be mandatory according to https://www.raspberrypi.org/forums/view ... 3&p=259277

so, I changed the linking command for:

Code: Select all

/usr/bin/c++   -DNDEBUG -Wall   -ffast-math -Wall -pipe -funroll-loops -O3 -fomit-frame-pointer  ...Long list of object files... ../bin/minetest -rdynamic -lz /home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a -lGLU -lGL -lGLESv2 -lEGL -lX11 -lXext -ljpeg -lbz2 -lpng -lz -lX11 -L/opt/vc/lib -lXext -lopenal -lvorbisfile -lvorbis -logg -lsqlite3 lua/build/liblua.a -lgmp json/libjsoncpp.a -lGLESv2 -lEGL -lX11 -lXext -lrt -lpthread -ldl -lXxf86vm -lcurl -Wl,-Bstatic -lfreetype cguittfont/libcguittfont.a -Wl,-Bdynamic -ljpeg -lbz2 -lpng -lopenal -lvorbisfile -lvorbis -logg -lsqlite3 -lgmp -lrt -lpthread -ldl -lXxf86vm -lcurl /home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a -lz -Wl,-Bstatic -lfreetype -Wl,-Bdynamic
And then I executed the whole command. I succeed linking and I got minetest binary at /home/pi/minetest/bin

I add the line:

Code: Select all

video_driver = ogles2
to minetest.conf and I execute minetest who complains about the shaders location. So, I copied irrlicht media folder (which contains the shaders) to /home/pi and executed it again getting:

Automatically selecting world at [/home/pi/minetest/bin/../worlds/world]
ERROR[Main]: Irrlicht: Bad Display ----> EGL_BAD_DISPLAY
Floating point exception

Am I getting any closer? :-)

Amicadi
Member
Posts: 13
Joined: Fri Sep 04, 2015 00:40

Re: Minetest on Rasbpberry Pi

by Amicadi » Post

I Compiled Irrlich with loglevel set to verbose, and added debug_log_level = 4 to minetest.conf

at first try:

Code: Select all

INFO[Main]: logfile = debug.txt
VERBOSE[Main]: httpfetch_init: parallel_limit=8
INFO[Main]: Message locale is now set to: LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.UTF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=en_GB.UTF-8;LC_ADDRESS=en_GB.UTF-8;LC_TELEPHONE=en_GB.UTF-8;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=en_GB.UTF-8
VERBOSE[Main]: Determining world path
INFO[Main]: Searching worlds...
INFO[Main]:   In /home/pi/minetest/bin/../worlds: 
INFO[Main]: world 
INFO[Main]: 1 found.
Automatically selecting world at [/home/pi/minetest/bin/../worlds/world]
VERBOSE[Main]: Determining gameid/gamespec
INFO[Main]: Using world gameid [minetest]
INFO[Main]: Using commanded world path [/home/pi/minetest/bin/../worlds/world]
INFO[Main]: Irrlicht: Irrlicht Engine version 1.9.0
INFO[Main]: Irrlicht: Linux 4.1.6-v7+ #810 SMP PREEMPT Tue Aug 18 15:32:12 BST 2015 armv7l
INFO[Main]: Irrlicht: Creating X window...
INFO[Main]: Irrlicht: Using plain X visual
VERBOSE[Main]: Irrlicht: Visual chosen: : 33
INFO[Main]: Irrlicht: Could not get EGL display.
ERROR[Main]: Irrlicht: Bad Display
INFO[Main]: Irrlicht: Could not make EGL context current.
INFO[Main]: Irrlicht: Using renderer: 
So, I made some changes at CEGLManager.cpp (initialize function):

Code: Select all

#elif defined(_IRR_COMPILE_WITH_X11_DEVICE_)
        EglWindow = (NativeWindowType)Data.OpenGLLinux.X11Window;
--      EglDisplay = eglGetDisplay((NativeDisplayType)Data.OpenGLLinux.X11Display);
++      //EglDisplay = eglGetDisplay((NativeDisplayType)Data.OpenGLLinux.X11Display);
++      EglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
Then eglInitialize was sucessful, but then I got this log:

Code: Select all

....
INFO[Main]: Irrlicht: Irrlicht Engine version 1.9.0
INFO[Main]: Irrlicht: Linux 4.1.6-v7+ #810 SMP PREEMPT Tue Aug 18 15:32:12 BST 2015 armv7l
INFO[Main]: Irrlicht: Creating X window...
INFO[Main]: Irrlicht: Using plain X visual
VERBOSE[Main]: Irrlicht: Visual chosen: : 33
INFO[Main]: Irrlicht: EGL version: 1.400000
Segmentation fault -- at COGLES2Driver::COGLES2Driver --> ContextManager->generateSurface()
so I changed CEGLManager::generateSurface() function:

Code: Select all

-- #ifdef EGL_VERSION_1_3
++ // #ifdef EGL_VERSION_1_3
                EGL_RENDERABLE_TYPE, EglOpenGLBIT,
-- #endif
++ //#endif
After this modification, I got:

Code: Select all

....
INFO[Main]: Irrlicht: Irrlicht Engine version 1.9.0
INFO[Main]: Irrlicht: Linux 4.1.6-v7+ #810 SMP PREEMPT Tue Aug 18 15:32:12 BST 2015 armv7l
INFO[Main]: Irrlicht: Creating X window...
INFO[Main]: Irrlicht: Using plain X visual
VERBOSE[Main]: Irrlicht: Visual chosen: : 33
INFO[Main]: Irrlicht: EGL version: 1.400000
INFO[Main]: Irrlicht: Could not get config for EGL display.
Floating point exception 
I guess that Irrlicht ogl-es needs some more code for EGL 1.4 to work in other devices than ANDROID_DEVICE. Irrlicht ogl-es 1.9.0 is in alpha version, so, who knows... :-)

User avatar
Laser0073
Member
Posts: 59
Joined: Fri Jun 03, 2016 01:26
GitHub: Laser0073
In-game: Laser0073

Re: Minetest on Rasbpberry Pi

by Laser0073 » Post

I ran a server on the Model B 512MB, and tested it...works, but i got tons of lag. :( Not tested it on any later models of the pi.
i5 6500 OC @3.5GHz, EVGA GTX 960 4GB, 8GB DDR4, ASROCK Pro4S, 128GB.SSD, MT 0.4.17, Linux Mint 18.3 (Ubuntu 16.04)
OwOOOg9CphnceB30eUFX6BOCW8W3jT4i

jdonald
New member
Posts: 1
Joined: Tue Nov 21, 2017 16:08
GitHub: jdonald

Re: Minetest on Rasbpberry Pi

by jdonald » Post

For others attempting to run Irrlicht/Minetest with brcmEGL/brcmGLES on the Pi, I have posted code and instructions in this thread on the Raspberry Pi forums.

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: Minetest on Rasbpberry Pi

by Miniontoby » Post

How can I upgrade Minetest to 5.0(.0 or .1) ?
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
Jhalman
Member
Posts: 15
Joined: Sat Sep 29, 2018 13:51
IRC: Jhalman
In-game: Jhalman

Re: Minetest on Rasbpberry Pi

by Jhalman » Post

Miniontoby wrote:How can I upgrade Minetest to 5.0(.0 or .1) ?
You could Compile MT direct from MT's download See page below
https://dev.minetest.net/Compiling_Minetest

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: Minetest on Rasbpberry Pi

by Miniontoby » Post

Jhalman wrote:
Miniontoby wrote:How can I upgrade Minetest to 5.0(.0 or .1) ?
You could Compile MT direct from MT's download See page below
https://dev.minetest.net/Compiling_Minetest
That don't working by me. Do you have an other solution?
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
doyousketch2
Member
Posts: 115
Joined: Tue Feb 05, 2013 16:06
GitHub: doyousketch2
In-game: Sketch2
Location: Ohio
Contact:

Re: Minetest on Rasbpberry Pi

by doyousketch2 » Post

Notes on how to compile Irrlicht w/ GLES2 -- https://git.io/fjVo4

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: Minetest on Rasbpberry Pi

by runs » Post

I sucessfully compile and run a Minetest Server in a Raspberry Pi 4 with Raspbian x64. With the forked Irrlicht from Minetest too.

1. The dependencies are (only 'libjpeg62-turbo-dev' is different from the standard set):

Code: Select all

sudo apt-get install git g++ make cmake build-essential libjpeg62-turbo-dev libpng-dev zlib1g-dev libopengl-dev libglx-dev libgl1-mesa-dev libx11-dev libxxf86vm-dev libvorbis-dev libopenal-dev libsqlite3-dev libzstd-dev libluajit-5.1-dev libjsoncpp-dev libgmp-dev libcurl4-gnutls-dev libfreetype6-dev
2. Download Minetest Irrlicht from here:
https://github.com/minetest/irrlicht
Direct ZIP Link

And put it (decompress) in the dir:
'minetest/lib/irrlichtmt'

3. Compile Irlicht, this is, open a Linux terminal on the dir and execute the following two commands:

Code: Select all

cmake .
make NDEBUG=1 -j $(nproc)
4. Put this script in the Minetest directory and execute, or execute the independent commands on a Linux terminal:

Code: Select all

cmake . -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1 -DBUILD_SERVER=1 -DIRRLICHT_LIBRARY=irrlicht/lib/Linux/libIrrlichtMt.a -DIRRLICHT_INCLUDE_DIR=irrlicht/include
make -j$(nproc)
echo -e "\n\n\e[1;33mYou can run Minetest again by typing \"minetest\" in a terminal or selecting it in an applications menu.\nYou can install mods in ~/.minetest/mods, too.\e[0m"
5. Run the server with this script in the Minetest directory (change mygame & myworld to match your own):

Code: Select all

#!/bin/bash

while true
do
	 ./bin/minetestserver --gameid mygame --worldname myworld
	sleep 10
done
Last edited by runs on Tue Mar 08, 2022 23:15, edited 6 times in total.

crlyttle
Member
Posts: 64
Joined: Tue Jun 29, 2021 19:28
In-game: crl

Re: Minetest on Rasbpberry Pi

by crlyttle » Post

Hello,
When I use snap to download minetest I get version 5.3, but version 5.4 is needed.
When using "runs" methods above minetestserver 5.4 builds and runs fine on all my systems. Using the default from README.md builds clients on my laptops and desktops.
However when I try 5.4 on my Pi400 the following runtime errors occur:
X Error of failed request: GLXBadFBConfig
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 0 ()
Serial number of failed request: 500
Current serial number in output stream: 500
Has anyone gotten a 5.4 client to run on the Pi400?
Thanks

c56
Member
Posts: 307
Joined: Wed Apr 21, 2021 03:05
GitHub: tigercoding56
In-game: bm5 or bemo5 also sell_her_on55

Re: Minetest on Rasbpberry Pi

by c56 » Post

yes but because i use archlinuxarm its now 5.50
also to get 5.4 building it from source code should work
this is a signature not a place to post messages also if i could change my username i would change it to sell_her_on55

crlyttle
Member
Posts: 64
Joined: Tue Jun 29, 2021 19:28
In-game: crl

Re: Minetest on Rasbpberry Pi

by crlyttle » Post

Thanks. I've been using Pi OS 64bit and Ubuntu.
Any help on building archlinuxarm to run Minetest 5.4 or 5.5? It seems there are lots of options.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: Minetest on Rasbpberry Pi

by runs » Post

crlyttle wrote:
Sun Mar 06, 2022 14:04
Thanks. I've been using Pi OS 64bit and Ubuntu.
Any help on building archlinuxarm to run Minetest 5.4 or 5.5? It seems there are lots of options.
why do not you use Raspian?
did you compile Irlitch firstly?
try to put this on a terminal:

Code: Select all

export MESA_GL_VERSION_OVERRIDE=4.5

Klaustrophob
New member
Posts: 7
Joined: Tue Mar 08, 2022 08:58

Re: Minetest on Rasbpberry Pi

by Klaustrophob » Post

Hi runs and all the other minetesters ;)

I am trying to build the most recent 5.5 build of Minetest for armfh / RaspbianLegacy (32bit) as flatpak doesn´t work (outdated) and Appimage is sadly non-existent. ;(

Could someone please provide info on how to build it from scratch for armfh ? I guess it should be close to the solution you (runs) provided for server before - but as I am a linux n00b I didn´t manage to compile it properly.

There was an old build method mentioned in this thread at https://forums.raspberrypi.com/viewtopic.php?t=290416

But it does not seem to work anymore as irrlicht seems to have changes which breaks this ;( I got an old dev version 5.5 running on RaspberryOS but the script does not work anymore ;(

This is the script from the thread mentioned above.

Code: Select all

( echo ZZZZ Updating Apt-Get Repository List ; sudo apt-get update ; echo ZZZZ Installing Dependencies ; sudo apt -y install g++ make libc6-dev libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev ; echo ZZZZ Cloning Minetest Source ; git clone --depth 1 https://github.com/minetest/minetest.git ; echo ZZZZ Cloning Source of Minetests Fork of Irrlicht ; git clone https://github.com/minetest/irrlicht ; echo ZZZZ Entering Irrlicht Source dir ; cd irrlicht ; echo ZZZZ Generating Minetests Fork of Irrlicht Build Files ; cmake . -DBUILD_SHARED_LIBS=ON ; echo ZZZZ Compiling Minetests Fork of Irrlicht ; make -j$(nproc) ; echo ZZZZ Navigating to Parent Dir ; cd .. ; echo ZZZZ Navigating to Minetest Source Dir ; cd minetest ; echo ZZZZ Generating Minetest Build Files ; cmake . -DRUN_IN_PLACE=TRUE -DIRRLICHT_LIBRARY=../irrlicht/lib/Linux/libIrrlichtMt.so -DIRRLICHT_INCLUDE_DIR=../irrlicht/include/ ; echo ZZZZ Compiling Minetest ; make -j$(nproc) ; echo ZZZZ Cleaning up apt installs ; sudo apt clean ; echo ZZZZ Cleaning up apt-get installs ; sudo apt-get clean ; echo ZZZZ Launching Minetest ; /home/$USER/minetest/bin/minetest ) > Minetest_install_output.txt
Any help would be appreciated - our pupils would love to use the most recent version of minetest for their lessons on our Raspi systems here.

Thanks a lot for this great community.

crlyttle
Member
Posts: 64
Joined: Tue Jun 29, 2021 19:28
In-game: crl

Re: Minetest on Rasbpberry Pi

by crlyttle » Post

I've not tried RaspbianLegacy yet. But, thanks to runs et al, I've got it to run just fine on the other 32 and 64 bit Pi OS images from rpi-imager. For school work I have Minetest, LibreOffice, and Calibre as primary tools.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: Minetest on Rasbpberry Pi

by runs » Post

Klaustrophob wrote:
Tue Mar 08, 2022 09:14
Hi runs and all the other minetesters ;)

I am trying to build the most recent 5.5 build of Minetest for armfh / RaspbianLegacy (32bit) as flatpak doesn´t work (outdated) and Appimage is sadly non-existent. ;(

Could someone please provide info on how to build it from scratch for armfh ? I guess it should be close to the solution you (runs) provided for server before - but as I am a linux n00b I didn´t manage to compile it properly.

There was an old build method mentioned in this thread at https://forums.raspberrypi.com/viewtopic.php?t=290416

But it does not seem to work anymore as irrlicht seems to have changes which breaks this ;( I got an old dev version 5.5 running on RaspberryOS but the script does not work anymore ;(

This is the script from the thread mentioned above.

Code: Select all

( echo ZZZZ Updating Apt-Get Repository List ; sudo apt-get update ; echo ZZZZ Installing Dependencies ; sudo apt -y install g++ make libc6-dev libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev ; echo ZZZZ Cloning Minetest Source ; git clone --depth 1 https://github.com/minetest/minetest.git ; echo ZZZZ Cloning Source of Minetests Fork of Irrlicht ; git clone https://github.com/minetest/irrlicht ; echo ZZZZ Entering Irrlicht Source dir ; cd irrlicht ; echo ZZZZ Generating Minetests Fork of Irrlicht Build Files ; cmake . -DBUILD_SHARED_LIBS=ON ; echo ZZZZ Compiling Minetests Fork of Irrlicht ; make -j$(nproc) ; echo ZZZZ Navigating to Parent Dir ; cd .. ; echo ZZZZ Navigating to Minetest Source Dir ; cd minetest ; echo ZZZZ Generating Minetest Build Files ; cmake . -DRUN_IN_PLACE=TRUE -DIRRLICHT_LIBRARY=../irrlicht/lib/Linux/libIrrlichtMt.so -DIRRLICHT_INCLUDE_DIR=../irrlicht/include/ ; echo ZZZZ Compiling Minetest ; make -j$(nproc) ; echo ZZZZ Cleaning up apt installs ; sudo apt clean ; echo ZZZZ Cleaning up apt-get installs ; sudo apt-get clean ; echo ZZZZ Launching Minetest ; /home/$USER/minetest/bin/minetest ) > Minetest_install_output.txt
Any help would be appreciated - our pupils would love to use the most recent version of minetest for their lessons on our Raspi systems here.

Thanks a lot for this great community.
The old method does not wotk for 5.5. Try to follow my steps and put here the errors/problems you'd get.

1. Get the Minetest Irlitch:

https://github.com/minetest/irrlicht

Put on: minetest/lib/irrlichtmt and compile it.

Klaustrophob
New member
Posts: 7
Joined: Tue Mar 08, 2022 08:58

Re: Minetest on Rasbpberry Pi

by Klaustrophob » Post

I set up a complete script in this new topic now:

Thank you! Your thread helped ;)

viewtopic.php?f=42&t=27864

For completeness:
  • Save the following code as file "compile_minetest.sh"

Code: Select all

echo ZZZZ Updating Apt-Get Repository List
apt-get update
echo ZZZZ Installing Dependencies
apt -y install g++ make libc6-dev libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
echo ZZZZ Cloning Minetest GIT
git clone --depth 1 https://github.com/minetest/minetest -b stable-5
echo ZZZZ Navigating to Minetest Source Dir
cd minetest
echo ZZZZ Cloning Source of Minetests Fork of Irrlicht
cd lib
wget https://github.com/minetest/irrlicht/archive/refs/tags/1.9.0mt4.zip
unzip 1.9.0mt4.zip
mv irrlicht-1.9.0mt4 irrlichtmt
rm 1.9.0mt4.zip
cd irrlichtmt/
cmake . -DBUILD_SHARED_LIBS=ON
make -j$(nproc)
cd ../..
echo ZZZZ Generating Minetest Build Files
cmake . -DRUN_IN_PLACE=TRUE -DIRRLICHT_LIBRARY=lib/Linux/libIrrlichtMt.so.1.9.0 -DIRRLICHT_INCLUDE_DIR=include/
echo ZZZZ Compiling Minetest
make -j$(nproc)
cd games
git clone https://github.com/minetest/minetest_game
cd ..
rm -rf .git .github CMakeFiles android cmake misc po src util .clang-format .clang-tidy .dockerignore .editorconfig .gitattributes .gitignore .gitlab-ci.yml .luacheckrc .mailmap AppImageBuilder.yml cmake_install.cmake CMakeCache.txt CMakeDoxyfile.in CMakeDoxygenDefaults.cmake CMakeLists.txt CPackConfig.cmake CPackSourceConfig.cmake Dockerfile LICENSE.txt Makefile
cd ..
chown -R pi:pi /minetest
  • put file into your homedir
  • start with

Code: Select all

sudo bash compile_minetest.sh
run with

Code: Select all

./minetest/bin/minetest

I guess it should also work on 64bit edition. Please report...

Rock the PI with Minetest \O/ - Have fun!

Post Reply

Who is online

Users browsing this forum: No registered users and 41 guests