Difference between revisions of "Compiling Luanti"

From Minetest Developer Wiki
Jump to navigation Jump to search
(Clearly separate between official and unofficial instructions)
(→‎GNU/Linux: rename to Luanti)
 
Line 13: Line 13:
 
=== GNU/Linux ===
 
=== GNU/Linux ===
  
[http://forum.minetest.net/viewtopic.php?f=3&t=3837 One-line script for installing/compiling Minetest Git, for Debian / Ubuntu / Mint]
+
[http://forum.minetest.net/viewtopic.php?f=3&t=3837 One-line script for installing/compiling Luanti Git, for Debian / Ubuntu / Mint]
  
 
=== Windows ===
 
=== Windows ===

Latest revision as of 17:55, 28 October 2024

This page is about how to compile Luanti yourself.

Official compilation instructions

We strongly recommend you read the Luanti README file. It covers most of the important platforms.

Unofficial compilation instructions

The community has written several unofficial guides to compile Luanti on unusual or rare platforms. Proceed only if the README was not enough.

Tread carefully from this point on.

GNU/Linux

One-line script for installing/compiling Luanti Git, for Debian / Ubuntu / Mint

Windows

For compiling Luanti on Windows using MSYS2, see Compiling on Windows using MSYS2.

For compiling Luanti on Windows using MSVC, see the Luanti README.

Cross-compilation

To compile a win32 version of Luanti in Linux with MinGW you can use the build script in utils/buildbot/buildwin32.sh.

To compile a win64 version of Luanti in Linux with MinGW you can use the build script in utils/buildbot/buildwin64.sh.

If you have errors during cross compilation related to std::thread and std::mutex, this is due to mingw-w64 being incorrectly configured for cross compilation.

To fix the errors, use the command:

For 64-bit builds: sudo update-alternatives --config x86_64-w64-mingw32-g++

For 32-bit Ubuntu Builds: sudo update-alternatives --config i686-w64-mingw32-g++

For 32-bit Debian Builds: sudo update-alternatives --config i586-w64-mingw32-g++

When provided with a prompt for which version to select, please choose "posix". Then retry the buildwin32.sh or buildwin64.sh