Compiling on GNU/Linux

Post Reply
New member
Posts: 1
Joined: Mon Mar 14, 2016 20:45

Compiling on GNU/Linux

by Philani » Post

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

User avatar
Posts: 3164
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France

Re: Compiling on GNU/Linux

by Calinou » Post

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.

User avatar
Posts: 4082
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Compiling on GNU/Linux

by Wuzzy » Post

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.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest