[Debian / Ubuntu] 1-line script: install Minetest Git

User avatar
Lejo
Member
 
Posts: 405
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by Lejo » Sat Jan 14, 2017 19:41

I try it in Ubuntu 16.10 with the non-portable version this works perfect.

But on my server i can't update the server version to 0.4.15
 

User avatar
BBmine
Member
 
Posts: 3410
Joined: Sun Jul 12, 2015 22:51
Location: USA
IRC: BBmine
In-game: Baggins

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by BBmine » Fri Feb 24, 2017 02:21

I really want to add some customizations to my minetest because I don't have much experience with C++. This script won't work on Debian. I've seen things that work, but nothing yet that works that I can also change the source code and recompile. I think it has to do with there being missing libraries. I don't know how to fix this other than that it complains about how some library packages are not available. I don't know what to do about these packages. I miss Ubuntu. :(
 

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

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by Calinou » Sat Feb 25, 2017 16:39

BBmine wrote:I really want to add some customizations to my minetest because I don't have much experience with C++. This script won't work on Debian. I've seen things that work, but nothing yet that works that I can also change the source code and recompile. I think it has to do with there being missing libraries. I don't know how to fix this other than that it complains about how some library packages are not available. I don't know what to do about these packages. I miss Ubuntu. :(


Can you post the log of this command, when typed in the root directory of the Minetest Git clone?

Code: Select all
cmake .
 

User avatar
Lejo
Member
 
Posts: 405
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by Lejo » Tue May 16, 2017 18:57

My server has 16.04 and I tried since a long time to update the server to 0.4.15 , but it didn't work.
Does I have to update Ubuntu to make it work?
 

wilkgr76
Member
 
Posts: 831
Joined: Wed Feb 18, 2015 02:44
GitHub: wilkgr76

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by wilkgr76 » Mon May 22, 2017 03:35

From the first post:
NOTE: This script may not work immediately on Ubuntu 16.10. You may need to swap libpng and libjpeg for more recent versions, which have different package names. Consider the Minetest AppImage as a simpler way to run latest Minetest versions, that doesn't require root rights as well.
N/A
 

User avatar
Lejo
Member
 
Posts: 405
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo
 

wilkgr76
Member
 
Posts: 831
Joined: Wed Feb 18, 2015 02:44
GitHub: wilkgr76
 

User avatar
DoDoBirD
Member
 
Posts: 30
Joined: Fri Oct 21, 2016 23:33
 

User avatar
Inocudom
Member
 
Posts: 3009
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by Inocudom » Tue Jul 25, 2017 04:57

The scripts in the first post no longer work. They are too old and will probably never be updated.
My whole legacy is an abomination.
 

User avatar
Inocudom
Member
 
Posts: 3009
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by Inocudom » Sat Oct 21, 2017 00:57

Code: Select all
[ 57%] Building CXX object src/CMakeFiles/minetest.dir/util/srp.cpp.o
In file included from /usr/include/x86_64-linux-gnu/gmp.h:51:0,
                 from /home/derek/minetest/src/util/srp.cpp:46:
/usr/include/c++/4.9/cstddef:51:11: error: ‘::max_align_t’ has not been declared
   using ::max_align_t;
           ^
make[2]: *** [src/CMakeFiles/minetest.dir/util/srp.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/CMakeFiles/minetest.dir/all] Error 2
make: *** [all] Error 2
[  0%] Built target jsoncpp
-- *** Detected Git version 0.5.0-dev-c60abb2 ***
[  0%] Built target GenerateVersion
[  1%] Building CXX object src/CMakeFiles/minetest.dir/util/srp.cpp.o
In file included from /usr/include/x86_64-linux-gnu/gmp.h:51:0,
                 from /home/derek/minetest/src/util/srp.cpp:46:
/usr/include/c++/4.9/cstddef:51:11: error: ‘::max_align_t’ has not been declared
   using ::max_align_t;
           ^
make[2]: *** [src/CMakeFiles/minetest.dir/util/srp.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/minetest.dir/all] Error 2
make: *** [all] Error 2
The program 'minetest' is currently not installed. You can install it by typing:
sudo apt-get install minetest


You can run Minetest again by typing "minetest" in a terminal or selecting it in an applications menu.
You can install mods in ~/.minetest/mods, too.

The scripts create this error (the ones in the first post of this topic.) I used to be able to compile Minetest on Linux Mint using these scripts. What happened?

Thanks to the kind folks in irc, I came to the conclusion that I needed to update my cmake, clang, and gcc installations. However, getting Linux Mint 17.3 to actually use the newly installed gcc version proved to be a pain. Luckily, I came across the following instructions on the internet after using DuckDuckGo:
https://askubuntu.com/questions/26498/choose-gcc-and-g-version
Thanks to those instructions, Calinou's compiling scripts no longer give any fatal errors and are now able to compile Minetest 0.5 Dev.
My whole legacy is an abomination.
 

User avatar
Akahyperion
Member
 
Posts: 17
Joined: Mon Dec 12, 2016 18:57
Location: Grenoble, France
IRC: Akahyperion
In-game: Akahyperion

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by Akahyperion » Thu Nov 16, 2017 11:16

Hi everyone.
Just for knowledge, this script still works fine for me on my Ubuntu 16.04.3 LTS.
 

User avatar
BBmine
Member
 
Posts: 3410
Joined: Sun Jul 12, 2015 22:51
Location: USA
IRC: BBmine
In-game: Baggins

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by BBmine » Thu Dec 14, 2017 13:40

Compile is failing.
Code: Select all
-- *** Will build version 0.5.0-dev ***
-- Detecting GMP from system failed.
-- Using bundled mini-gmp library.
-- Using bundled JSONCPP library.
-- Using LuaJIT provided by system.
-- cURL support enabled.
-- GetText enabled; locales found: be;ca;cs;da;de;dv;eo;es;et;fr;he;hu;id;it;ja;jbo;ko;ky;lt;ms;nb;nl;pl;pt;pt_BR;ro;ru;sl;sr_Cyrl;sv;sw;tr;uk;zh_CN;zh_TW
-- Sound enabled.
-- Freetype enabled.
-- ncurses console enabled.
-- Could NOT find PostgreSQL (missing: PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR)
-- PostgreSQL not found!
-- LevelDB backend enabled.
-- Redis not found!
-- SpatialIndex not found!
-- Locale blacklist applied; Locales used: ca;cs;da;de;dv;eo;es;et;fr;hu;id;it;ja;jbo;lt;ms;nb;nl;pl;pt;pt_BR;ro;ru;sl;sr_Cyrl;sv;sw;tr;uk
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/git/minetest
[  1%] Built target gmp
[  1%] Built target jsoncpp
[  1%] mo update
[  1%] Built target translations
-- *** Detected Git version 0.5.0-dev-2d9f0d34 ***
[  1%] Built target GenerateVersion
Scanning dependencies of target minetest
[  1%] Building CXX object src/CMakeFiles/minetest.dir/client/render/interlaced.cpp.o
[  1%] Building CXX object src/CMakeFiles/minetest.dir/client/clientlauncher.cpp.o
[  1%] Building CXX object src/CMakeFiles/minetest.dir/client/render/core.cpp.o
[  1%] Building CXX object src/CMakeFiles/minetest.dir/client/render/stereo.cpp.o
[  1%] Building CXX object src/CMakeFiles/minetest.dir/client/renderingengine.cpp.o
[  1%] Building CXX object src/CMakeFiles/minetest.dir/database/database-files.cpp.o
[  1%] Building CXX object src/CMakeFiles/minetest.dir/database/database-leveldb.cpp.o
[  1%] Building CXX object src/CMakeFiles/minetest.dir/database/database-postgresql.cpp.o
[  1%] Building CXX object src/CMakeFiles/minetest.dir/database/database-redis.cpp.o
[  1%] Building CXX object src/CMakeFiles/minetest.dir/database/database-sqlite3.cpp.o
[  1%] Building CXX object src/CMakeFiles/minetest.dir/gui/guiChatConsole.cpp.o
[  1%] Building CXX object src/CMakeFiles/minetest.dir/gui/guiEngine.cpp.o
In file included from /home/user/git/minetest/src/script/scripting_mainmenu.h:22:0,
                 from /home/user/git/minetest/src/gui/guiEngine.cpp:25:
/home/user/git/minetest/src/script/cpp_api/s_base.h:29:10: fatal error: lua.h: No such file or directory
 #include <lua.h>
          ^~~~~~~
compilation terminated.
src/CMakeFiles/minetest.dir/build.make:590: recipe for target 'src/CMakeFiles/minetest.dir/gui/guiEngine.cpp.o' failed
make[2]: *** [src/CMakeFiles/minetest.dir/gui/guiEngine.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:229: recipe for target 'src/CMakeFiles/minetest.dir/all' failed
make[1]: *** [src/CMakeFiles/minetest.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2


This is the script:
Code: Select all
#su -c 'apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libleveldb1v5 libfreetype6-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev'
su -c 'apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev'
cd
cd git
git clone https://github.com/minetest/minetest.git
cd minetest
git pull --all
cd games
git clone https://github.com/minetest/minetest_game.git
git pull --all
cd ..
#cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1
cmake . -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1
make -j$(nproc)
su -c 'make install'
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"

Commented out lines are older; their uncommented counterparts are the up-to-date lines from the first post of this topic (Slightly edited because of compatibility).
I am running Debian 9.
 

User avatar
Enrikoo
Member
 
Posts: 379
Joined: Thu Nov 16, 2017 18:18
Location: Germany
GitHub: Enrikoo
IRC: Enrico - Enricoo - Enrlco
In-game: Enrico - Enriko
 

ShadMOrdre
Member
 
Posts: 113
Joined: Mon Dec 29, 2014 08:07
Location: USA
In-game: shadmordre

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by ShadMOrdre » Mon Jan 01, 2018 05:03

Thanks to BBmine:

The following works on Lubuntu 17.10. It is modified from BBmine's above script for Debian. Specifically:
1. Changed su to sudo
2. Removed single quotes on same lines surround apt-get....
3. Removed commented lines.

Here is a working script.

Code: Select all
sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev
cd
cd git
git clone https://github.com/minetest/minetest.git
cd minetest
git pull --all
cd games
git clone https://github.com/minetest/minetest_game.git
git pull --all
cd ..
cmake . -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1
make -j$(nproc)
sudo -c make install
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"


Must be ran from terminal using: (Unless someone can show us how to make the ./bin/minetest icon executable from desktop. Hint hint....
Code: Select all
./bin/minetest
My other virtual world is an Opensimulator.
 

User avatar
BBmine
Member
 
Posts: 3410
Joined: Sun Jul 12, 2015 22:51
Location: USA
IRC: BBmine
In-game: Baggins

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by BBmine » Fri Jan 26, 2018 20:14

@ShadMOrdre I thought my script was just a Debianification of the one in the first post. Or did I change something else too?

--

I used the script to install Minetest on my computers. However, on one of them, I want to uninstall the one installed with this script and use the official release from the packaging system. How would I uninstall it?
 

ShadMOrdre
Member
 
Posts: 113
Joined: Mon Dec 29, 2014 08:07
Location: USA
In-game: shadmordre

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by ShadMOrdre » Sat Jan 27, 2018 03:24

BBMine,

Apparently, you did add a couple of things. git pull -all, twice, and sudo -c make install. I'm just glad it works, because I can use an installed 0.4.16 minetest stable, and yet, run a portable version of minetest 0.5.0dev. I likes alot!!!

Calinou's original version: (Just for readability, I've added the line endings.)

Code: Select all
sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev
cd
git clone https://github.com/minetest/minetest.git
cd minetest/games
git clone https://github.com/minetest/minetest_game.git
cd ..
cmake . -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1
make -j$(nproc)
cd ../bin
./minetest
echo -e "\n\n\e[1;33mYou can run Minetest again by double-clicking \"minetest\" in the \"bin\" folder of the \"minetest\" folder in your home folder.\nYou can install mods in ~/minetest/mods, too.\e[0m"


Your version for Debian:
Code: Select all
#su -c 'apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libleveldb1v5 libfreetype6-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev'
su -c 'apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev'
cd
cd git
git clone https://github.com/minetest/minetest.git
cd minetest
git pull --all
cd games
git clone https://github.com/minetest/minetest_game.git
git pull --all
cd ..
#cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1
cmake . -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1
make -j$(nproc)
su -c 'make install'
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"


My version, for Lubuntu 17.10:
Code: Select all
sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev
cd
cd git
git clone https://github.com/minetest/minetest.git
cd minetest
git pull --all
cd games
git clone https://github.com/minetest/minetest_game.git
git pull --all
cd ..
cmake . -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1
make -j$(nproc)
sudo -c make install
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"


Again, thanks for the fix!

Hope this helps others.
My other virtual world is an Opensimulator.
 

User avatar
BBmine
Member
 
Posts: 3410
Joined: Sun Jul 12, 2015 22:51
Location: USA
IRC: BBmine
In-game: Baggins

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by BBmine » Sat Jan 27, 2018 18:12

@ShadMOrdre Oh yeah, my git pull --all allows for updating it. And you're welcome :D
 

User avatar
poikilos
Member
 
Posts: 39
Joined: Thu Feb 18, 2016 13:45
GitHub: poikilos
In-game: Abiyahh

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by poikilos » Wed Feb 21, 2018 19:05

Install only server (ONLY server dependencies to my knowledge), system-wide (/usr/local), with all database backends, on Ubuntu Server (tested on 17.10 Artful)--multi-line script for readability
Code: Select all
#remove non-git version first:
sudo apt update
echo "This script compiles AND installs minetestserver (NOT run-in-place, but rather system-wide) with leveldb, redis, and defaults postgresql, doxygen, sqlite3"
echo
echo
echo "If you want to install the client on your server (not recommended), change -DBUILD_CLIENT=FALSE to -DBUILD_CLIENT=TRUE before continuing this script."
echo "Removing the non-git (packaged) version first (Press Ctrl C  to cancel)..."
sleep 1
echo "3..."
sleep 1
echo "2..."
sleep 1
echo "1..."
sleep 1
echo
sudo apt remove minetest-server
sudo apt remove minetest

sudo apt install libncurses5-dev libgettextpo-dev doxygen libspatialindex-dev libpq-dev postgresql-server-dev-all
# added libpq-dev postgresql-server-dev-all (or specific version) are BOTH needed for PostgreSQL development as per https://stackoverflow.com/questions/13920383/findpostgresql-cmake-wont-work-on-ubuntu
# if you skip the above, the below says missing: GetText, Curses, ncurses, Redis, SpatialIndex, Doxygen
sudo apt install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev
cd
if [ ! -d "Downloads" ]; then
   mkdir Downloads
fi
if [ -d minetest ]; then
  echo "ERROR: Nothing done since 'minetest' already exists in `pwd`--delete it before cloning, or run the included update script to update."
  exit 1
fi
git clone https://github.com/minetest/minetest.git
git pull --all  # see https://forum.minetest.net/viewtopic.php?f=42&t=3837&start=125#p306449
cd minetest/games
git clone https://github.com/minetest/minetest_game.git
git pull --all
cd ..
# heavily modified from forum url above due to hints from AUR files obtained via git clone https://aur.archlinux.org/minetest-git-leveldb.git
echo "ENABLE_CURSES enables server-side terminal via --terminal option"
cmake . -DENABLE_GETTEXT=on -DENABLE_CURSES=on -DENABLE_FREETYPE=on -DENABLE_LEVELDB=on -DENABLE_CURL=on -DENABLE_GETTEXT=on -DENABLE_REDIS=on -DENABLE_POSTGRESQL=on -DBUILD_SERVER=on -DBUILD_CLIENT=off -DRUN_IN_PLACE=off -DCMAKE_BUILD_TYPE=Release
# NOTE: as long as -DRUN_IN_PLACE=off, above installs correctly without -DCMAKE_INSTALL_PREFIX=/usr which for some reason is used by https://aur.archlinux.org/minetest-git.git
#  -DCMAKE_BUILD_TYPE=Release as per https://aur.archlinux.org/minetest-git.git
make -j$(nproc)
sudo make install
if [ -f "`command -v update-desktop-database`" ]; then
  echo "updating desktop database as per https://aur.archlinux.org/minetest-git.git"
  update-desktop-database &>/dev/null && update-desktop-database -q
fi
if [ -f "`command -v gtk-update-icon-cache`" ]; then
  echo "updating gtk icon cache as per https://aur.archlinux.org/minetest-git.git"
  gtk-update-icon-cache   &>/dev/null && gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
fi
# minetest;
echo -e "\n\n\e[1;33mYou can run Minetest Server by typing \"minetestserver\" in a terminal, but using mtsenliven.py is recommended instead and keeps a config file for what world and subgame you want via minetestinfo.py.\e[0m"
echo "The only known uninstall method is:"
echo "sudo xargs rm < install_manifest.txt"
echo "# as per http://irc.minetest.net/minetest/2015-08-06"
# based on https://forum.minetest.net/viewtopic.php?f=42&t=3837 (below)
# sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev; cd; git clone https://github.com/minetest/minetest.git; cd minetest/games; git clone https://github.com/minetest/minetest_game.git; cd ..; cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1; make -j$(nproc); sudo make install; minetest; 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"

 

User avatar
poikilos
Member
 
Posts: 39
Joined: Thu Feb 18, 2016 13:45
GitHub: poikilos
In-game: Abiyahh

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by poikilos » Thu Feb 22, 2018 15:29

More info for compiling minetest+minetestserver on Fedora
benrob0329 wrote:Nvm, figured it out!

Code: Select all
sudo dnf install -y gcc-c++ irrlicht-devel gettext freetype cmake bzip2-devel libpng libjpeg-turbo libXxf86vm mesa-libGLU libsqlite3x-devel libogg-devel libvorbis-devel openal-devel curl-devel luajit-devel lua-devel leveldb-devel ncurses-devel redis hiredis-devel gmp-devel; cd; git clone https://github.com/minetest/minetest.git; cd minetest/games; git clone https://github.com/minetest/minetest_game.git; cd ..; cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1; make -j$(nproc); sudo make install; minetest; 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"

I had to add
Code: Select all
freetype-devel
(that must have already been on your system; also it is supposedly optional but mine had make error and I'm not sure why you wouldn't want it).
To avoid all other cmake not found messages that could prevent enables (I'm not sure what happens if you don't have spatialindex-devel), also install
Code: Select all
spatialindex-devel postgresql-devel doxygen

(then you can add cmake option
Code: Select all
-DENABLE_POSTGRESQL=1
)
Also, you installed redis but did not enable it, so you can add cmake option
Code: Select all
 -DENABLE_REDIS=1

resulting in the following (tested on Fedora 27; builds minetest+minetestserver):
Code: Select all
sudo dnf install -y gcc-c++ freetype-devel spatialindex-devel postgresql-devel doxygen irrlicht-devel gettext freetype cmake bzip2-devel libpng libjpeg-turbo libXxf86vm mesa-libGLU libsqlite3x-devel libogg-devel libvorbis-devel openal-devel curl-devel luajit-devel lua-devel leveldb-devel ncurses-devel redis hiredis-devel gmp-devel; cd; git clone https://github.com/minetest/minetest.git; cd minetest/games; git clone https://github.com/minetest/minetest_game.git; cd ..; cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1 -DENABLE_REDIS=1 -DENABLE_POSTGRESQL=1; make -j$(nproc); sudo make install; minetest; 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"

Here are some tweaks (this is not entirely recommended since Minetest may not be tested with your distro's version, but supposedly this sometimes fixes jsoncpp compile errors): To circumvent the bundled libraries you can install
Code: Select all
jsoncpp-devel luajit-devel
then add cmake option
Code: Select all
-DENABLE_SYSTEM_JSONCPP=1
and if it still uses bundled luajit you can add
Code: Select all
-DLUA_INCLUDE_DIR=/usr/include/luajit-2.1
 

User avatar
Stix
Member
 
Posts: 1116
Joined: Fri Aug 04, 2017 14:19
Location: USA
IRC: Stix + Stix_
In-game: Stix

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by Stix » Sat Apr 28, 2018 20:00

I tried the script and got these errors, pliz help!:

terminal wrote:0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
fatal: destination path 'minetest' already exists and is not an empty directory.
fatal: destination path 'minetest_game' already exists and is not an empty directory.
-- *** Will build version 0.5.0-dev ***
-- Detecting GMP from system failed.
-- Using bundled mini-gmp library.
-- Using bundled JSONCPP library.
-- Using LuaJIT provided by system.
CMake Error at CMakeLists.txt:215 (message):
Insufficient gcc version, found 4.8.4. Version 4.9 or higher is required.


-- Configuring incomplete, errors occurred!
See also "/home/douglas/minetest/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.
Loaded texture: /usr/share/minetest/textures/base/pack/blank.png
Loaded texture: /usr/share/minetest/textures/base/pack/server_flags_favorite.png
Loaded texture: /usr/share/minetest/textures/base/pack/server_ping_4.png
Loaded texture: /usr/share/minetest/textures/base/pack/server_ping_3.png
Loaded texture: /usr/share/minetest/textures/base/pack/server_ping_2.png
Loaded texture: /usr/share/minetest/textures/base/pack/server_ping_1.png
Loaded texture: /usr/share/minetest/textures/base/pack/server_flags_creative.png
Loaded texture: /usr/share/minetest/textures/base/pack/server_flags_damage.png
Loaded texture: /usr/share/minetest/textures/base/pack/server_flags_pvp.png
Quit message received.


You can run Minetest again by typing "minetest" in a terminal or selecting it in an applications menu.
You can install mods in ~/.minetest/mods, too.
Ignore this.
Need to know something? "Google it" --GreenDimond
Next release of your favorite game? "Bugfixes" --Wuzzy
[OLD]The new Minetest-offtopic can be found here: https://minetestoftopic.createaforum.com/index.php
 

dawgdoc
Member
 
Posts: 207
Joined: Mon Feb 27, 2017 01:10
GitHub: dawgdoc

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by dawgdoc » Mon Apr 30, 2018 03:42

Stix wrote:I tried the script and got these errors, pliz help!:

terminal wrote:fatal: destination path 'minetest' already exists and is not an empty directory.
fatal: destination path 'minetest_game' already exists and is not an empty directory.

Insufficient gcc version, found 4.8.4. Version 4.9 or higher is required.

I think those are the three important lines. It seems the build process is finding your currently installed version at the locations it wants to use. AND, you need to upgrade gcc to at least 4.9. I am running LinuxMint 18.x and checking the software repositories I see that versions from 4.7 to 6.0 are available. If you are not on at lease 4.9, upgrading to that or greater may solve a one problem. The location may be corrected by changing your starting point from your home directory to something like /home/douglas/MT5 and let it build a new MT here ( /home/douglas/MT5/minetest) instead of /home/douglas/minetest.
 

User avatar
Lejo
Member
 
Posts: 405
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo
 

User avatar
Lejo
Member
 
Posts: 405
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo
 

User avatar
Krock
Developer
 
Posts: 4057
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: [Debian / Ubuntu] 1-line script: install Minetest Git

by Krock » Sat May 19, 2018 15:18

Lejo wrote:Any idea?


Code: Select all
git clone -b backport-0.4 https://github.com/minetest/minetest.git --depth 100
cd minetest
cmake .
make -j3
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
Lejo
Member
 
Posts: 405
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo
 

PreviousNext

Return to Builds



Who is online

Users browsing this forum: No registered users and 1 guest