Page 1 of 1

Compiling on GNU/Linux

PostPosted: Wed Mar 16, 2016 12:39
by Philani
Hi the, i'm user Linux Zorin and i have downloaded the Ubuntu / Linux Mint (PPA) package. I have installed all the dependencies, as well as git right down to $ cmake . -DRUN_IN_PLACE=TRUE now i am not sure because my next 2 steps are
philani@sithembile-HP-620:~/minetest/minetest-master$ make -j <number of processors>
bash: syntax error near unexpected token `newline'
philani@sithembile-HP-620:~/minetest/minetest-master$ ./bin/minetest
bash: ./bin/minetest: No such file or directory

Please help and
Note: please explain step by step even to the small details, don't assume i know what you talking about.

Thank you

Re: Compiling on GNU/Linux

PostPosted: Wed Mar 16, 2016 13:33
by Calinou
Type make -j$(nproc) if you want make to use all CPU cores, without having to know the number of threads available. Of course, make without any arguments works too, but will be slower.

Re: Compiling on GNU/Linux

PostPosted: Wed Mar 16, 2016 15:51
by Wuzzy
make -j <number of processors>

You were not supposed to enter this command literally. The “<number of processors>” was a placeholder. You are supposed to replaced it by the number of processor cores you have. This will be used to speed up compilation by using multiple processor cores at once (if you have such a processor). Calinou already told you what to do, so I don't repeat it. If the make command is done without error messages, you can continue normally; so the “./bin/minetest” command should work.

Background information: The “$(nproc)” will simply insert the number of processor cores into your command line. You could also write “make -j2” if you know you have 2 processor cores. If you want to know your number of processor cores, you can also just type in “nproc” into the console.

Calinou: Luckily, the nproc command is part of the coreutils package, so it is safe to assume for GNU/Linux systems. Maybe we should just update the part of the documentation and write what you have suggested.