Page 1 of 2

What i must use to compile minetest??

Posted: Wed May 18, 2016 16:07
by azekill_DIABLO
pls answer to a noob ;)

Re: What i must use to compile minetest??

Posted: Wed May 18, 2016 16:18
by burli
Which OS? Windows? Linux? Which Distribution?

Re: What i must use to compile minetest??

Posted: Wed May 18, 2016 16:50
by necron099
When you download the source and extract it there is a README.txt file, and that should tell you what you need and how to get it if I'm not mistaken. Happy compiling :)

Re: What i must use to compile minetest??

Posted: Wed May 18, 2016 17:07
by azekill_DIABLO
ok thanks necron099

and burli i'm on windows (10 but that don't change that much)

Re: What i must use to compile minetest??

Posted: Wed May 18, 2016 17:37
by necron099
I'm using linux...don't know how to compile on windows, but hopefully you'll get it done :)

Re: What i must use to compile minetest??

Posted: Wed May 18, 2016 18:05
by ExeterDad
I am no help with Windows as we haven't owned it for years. But this link seems to do a good job outlining what the steps are. http://dev.minetest.net/Compiling_Minet ... on_Windows

Re: What i must use to compile minetest??

Posted: Thu May 19, 2016 10:00
by azekill_DIABLO
wow that a lot of heavy stuff

Re: What i must use to compile minetest??

Posted: Sat May 21, 2016 11:34
by cheapie
azekill_DIABLO wrote:wow that a lot of heavy stuff
And that's why most of us run Linux. It's a lot easier to compile it (for Linux or Windows) from there. It might even be worthwhile to set up a Linux VM and use the buildbot instead of compiling on Windows.

Re: What i must use to compile minetest??

Posted: Sat May 21, 2016 14:56
by azekill_DIABLO
...

Re: What i must use to compile minetest??

Posted: Sun May 22, 2016 14:16
by Krock
azekill_DIABLO wrote:...
Looks like the replies didn't answer your question, so I'll do this now.
The wiki page tells you what libraries you need in addition to the Visual Studio and CMake.
I compiled some libraries with MSVC 2010. You can use them to compile your game but I don't know if they work for 64-bit builds, so try the 32-bit first to make sure it works.

Un7zip the archive into your working directory and fill in the paths into cmake-gui like the dev wiki article says. To make sure you have selected the right file name, you can look at my setup here.

When you compiled the stuff, create a new directory where you can copypaste all the dll files and Minetest directories in.
Contact me on IRC if you have questions.

Re: What i must use to compile minetest??

Posted: Sun May 22, 2016 14:45
by azekill_DIABLO
thx :)

Re: What i must use to compile minetest??

Posted: Thu Mar 23, 2017 00:20
by mr_dean
azekill_DIABLO,

If you use Windows, then Microsoft Community Visual studio should work fine. Mac, I'm not sure, and from what I have seen here, you don't use Linux.

I don't even know if you even use this any more, but I'm just sayin.

On the bright side, You can use the most shiny Windows compiler there is 8D

Re: What i must use to compile minetest??

Posted: Thu Mar 23, 2017 18:15
by azekill_DIABLO
thank you! i totaly forgot this thread ;) 8D might be interesting!

Re: What i must use to compile minetest??

Posted: Sat Feb 02, 2019 02:50
by zaphraud
necron099 wrote:When you download the source and extract it there is a README.txt file, and that should tell you what you need and how to get it if I'm not mistaken. Happy compiling :)
I would like to approach the question from the other way..

Of those of you who use Linux, what distribution do you or others use to compile it with?

Ubuntu doesn't want to play along, and I'm not surprised considering Ubuntu installs with nearly everything missing by default. Ubuntu doesn't even install make (let along cmake) by default and it's all uphill after that. I've managed to get it to be a decent LAMP server but the writings on the wall, I should be using something else...

Re: What i must use to compile minetest??

Posted: Sat Feb 02, 2019 03:32
by Nathan.S
I use Linux Mint, there is really no reason why Ubuntu shouldn't work, just follow these instructions.
https://dev.minetest.net/Compiling_Minetest

Re: What i must use to compile minetest??

Posted: Sun Feb 03, 2019 01:34
by zaphraud
Nathan.S wrote:I use Linux Mint, there is really no reason why Ubuntu shouldn't work, just follow these instructions.
https://dev.minetest.net/Compiling_Minetest
...it dies at installing the dependencies. Don't know why this Ubuntu is FUBAR, but it just is. Oh well.

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libcurl4-openssl-dev' instead of 'libcurl3-dev'
Package libpng12-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libpng12-dev' has no installation candidate
I see garbage like that a lot with this install and I'm 99% sure its Ubuntu's GUI garbage conflicting with the way apt normally handles things. It has a very annoying graphic update thing that pops up at the worst of times.

Re: What i must use to compile minetest??

Posted: Sun Feb 03, 2019 01:36
by zaphraud
I took libpng12-dev out of the list of apt-gets just to see if I could get the rest. Nope.

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libcurl4-openssl-dev' instead of 'libcurl3-dev'
cmake is already the newest version (3.10.2-1ubuntu2).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 build-essential : Depends: dpkg-dev (>= 1.17.11) but it is not going to be installed
 libcurl4-openssl-dev : Depends: libcurl4 (= 7.58.0-2ubuntu3) but 7.58.0-2ubuntu3.5 is to be installed
 libfreetype6-dev : Depends: libpng-dev but it is not going to be installed
 libgl1-mesa-dev : Depends: mesa-common-dev (= 18.0.0~rc5-1ubuntu1) but it is not going to be installed
                   Depends: libglvnd-dev but it is not going to be installed
                   Depends: libx11-dev but it is not going to be installed
                   Depends: libx11-xcb-dev but it is not going to be installed
                   Depends: libxdamage-dev but it is not going to be installed
                   Depends: libxext-dev but it is not going to be installed
                   Depends: libxfixes-dev but it is not going to be installed
 libjpeg8-dev : Depends: libjpeg-turbo8-dev (>= 1.1.90+svn722-1ubuntu6) but it is not going to be installed
 libxxf86vm-dev : Depends: libx11-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Re: What i must use to compile minetest??

Posted: Sun Feb 03, 2019 01:38
by zaphraud
Can't even get the first one on the list.
Because UBUNTU.

Code: Select all

zaphraud@friendly:~$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 build-essential : Depends: dpkg-dev (>= 1.17.11) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Re: What i must use to compile minetest??

Posted: Sun Feb 03, 2019 03:54
by random_geek
zaphraud wrote:Can't even get the first one on the list.
Because UBUNTU.
I don't have a lot of experience with these kinds of problems, but you could try "sudo apt-get update", "sudo apt-get upgrade", and then "sudo apt-get install -f". If it still doesn't work, try restarting the computer. If it still doesn't work then, paste your errors here again. Sorry I'm not much help. :P

Re: What i must use to compile minetest??

Posted: Sun Feb 03, 2019 04:02
by luk3yx
zaphraud wrote:Can't even get the first one on the list.
Because UBUNTU.

Code: Select all

zaphraud@friendly:~$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 build-essential : Depends: dpkg-dev (>= 1.17.11) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Although it may seem like it, I doubt a lot of this is actually Ubuntu's fault and could easily be fixed

Before doing any other apt or apt-get commands, you should fix any broken packages with the following command (also mentioned in another post):

Code: Select all

sudo apt install -f
Why do you want to spend time compiling Minetest when you can install the latest version with a few commands? You can nicely install and upgrade Minetest without compiling by either using the official PPA or my snap.

To install via the PPA:

Code: Select all

sudo add-apt-repository -y ppa:minetestdevs/stable && sudo apt update && sudo apt install minetest -y
To install my snap:

Stable (currently 0.4):

Code: Select all

sudo snap install minetest-luk3yx
Recent development (currently 5.0) builds:

Code: Select all

sudo snap install minetest-luk3yx-dev
If that doesn't work, you can always blame Ubuntu and go posting on the forums about how bad Ubuntu is.

Re: What i must use to compile minetest??

Posted: Wed Feb 06, 2019 15:43
by trungus
HI Guys

This is the first time I can contribute to something in this amazing project.

There is a nice trick to easy compile in any Debian-derivative distro, I'll put every command with a short explanation,

1-Update package list, if you don't do this you could get error like "package XXXX could not be installed" because you have the filename of an old packave. The -y option say "yes" to every question automatically.

Code: Select all

sudo apt-get update -y
2-Install most of the dependencies

Code: Select all

sudo apt-get build-dep minetest
The "build-dep" command instruct to apt to get every package needed to compile a given package, you need the source repos for run this command, in general they are active by default, the only exception I know is Deepin OS, you need to activate by hand on it.
3-Additional dependencies (optionals)
3.1-Luajit

Code: Select all

sudo apt-get install libluajit* luajit
3.2-Ncurse for "minetestserver --terminal" support

Code: Select all

sudo apt-get install libncurses5 libncurses5-dev libncursesw5 libncursesw5-dev
3.3- Ccmake -> this is not a compile dependencies but is a nice addon to switch the cmake options with a ncurse based UI.

Code: Select all

sudo apt-get install cmake-curses-gui
3.4 - git

Code: Select all

sudo apt-get install git
4- Get the source code (this is extracted from the github Readme), you will get the 0.5-dev source code.

Code: Select all

git clone --depth 1 https://github.com/minetest/minetest.git
cd minetest
git clone --depth 1 https://github.com/minetest/minetest_game.git games/minetest_game
4.1 (Optional) if you want the to compile the 0.4.17.1 (or any other), you need to do this, you need to run this command twice, the first in the minetest directory and the second in the game/minetest_game directory

Code: Select all

git fetch --tags
git checkout tags/0.4.17.1 
From here you can follow the with on github.

I hope this help somebody.

Best Regards
Trungus

Re: What i must use to compile minetest??

Posted: Mon Feb 11, 2019 22:59
by zaphraud
random_geek wrote:
zaphraud wrote:Can't even get the first one on the list.
Because UBUNTU.
I don't have a lot of experience with these kinds of problems, but you could try "sudo apt-get update", "sudo apt-get upgrade", and then "sudo apt-get install -f". If it still doesn't work, try restarting the computer. If it still doesn't work then, paste your errors here again. Sorry I'm not much help. :P
Yeah that's what I'm used to for other debian stuff. Turns out that confuses ubuntu's graphic based update system, which needed to catch up. It's compiling now. With lots of interesting warnings, like:

Code: Select all

/home/zaphraud/Games/minetest-master/lib/lua/src/ltablib.c: In function ‘addfield’:
/home/zaphraud/Games/minetest-master/lib/lua/src/ltablib.c:137:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   if (!lua_isstring(L, -1))
   ^~
/home/zaphraud/Games/minetest-master/lib/lua/src/ltablib.c:140:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
     luaL_addvalue(b);
There's more than one warning about a botched if statement in there.. g++ wasn't that helpful before. Heh.

Re: What i must use to compile minetest??

Posted: Mon Feb 11, 2019 23:01
by zaphraud
43% and still chugging thru it... compiling on a celeron laptop. But hey it runs for twelve hours and doesn't make any fan noise and is smol. Just not a very fast compiler.
45% now...

Re: What i must use to compile minetest??

Posted: Mon Feb 11, 2019 23:02
by luk3yx
zaphraud wrote:
random_geek wrote:
zaphraud wrote:Can't even get the first one on the list.
Because UBUNTU.
I don't have a lot of experience with these kinds of problems, but you could try "sudo apt-get update", "sudo apt-get upgrade", and then "sudo apt-get install -f". If it still doesn't work, try restarting the computer. If it still doesn't work then, paste your errors here again. Sorry I'm not much help. :P
Yeah that's what I'm used to for other debian stuff. Turns out that confuses ubuntu's graphic based update system, which needed to catch up. It's compiling now. With lots of interesting warnings, like:

Code: Select all

/home/zaphraud/Games/minetest-master/lib/lua/src/ltablib.c: In function ‘addfield’:
/home/zaphraud/Games/minetest-master/lib/lua/src/ltablib.c:137:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   if (!lua_isstring(L, -1))
   ^~
/home/zaphraud/Games/minetest-master/lib/lua/src/ltablib.c:140:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
     luaL_addvalue(b);
There's more than one warning about a botched if statement in there.. g++ wasn't that helpful before. Heh.
There are indeed warnings when compiling MT, this is normal, however there aren't (or at least shouldn't) be any errors.

Ubuntu's "graphics based update system" uses apt (or an apt library) internally, it should never "lag behind" what you see in the terminal.

Re: What i must use to compile minetest??

Posted: Mon Feb 11, 2019 23:04
by zaphraud
If they aren't bugs, then the code isn't using proper indenting. That's essentially what its complaining about. Which is kind of lol, like its a professor or something.