My Installation process on fedora 18

Anatole_F44
New member
 
Posts: 2
Joined: Wed Jan 29, 2014 08:50

My Installation process on fedora 18

by Anatole_F44 » Sat Feb 22, 2014 09:55

Hello,

It's my first post into this forum, so some few words to introduced myself. I'm not a video gamer, I used to compiled minestest since version 4.1 for for my son and my daughter on linux fedora (18 at this time).
For the last release the compilation process was a little bit more complicated than the other time. The problems are around LuaJIT and the availability for two irrlicht release on my computer.

First a description of the running system.
- Linux l3.11.10-100.fc18.x86_64 #1 SMP x86_64
- For irrlicht engine, two version are present
* /usr/include/irrlicht // 1.7.3
* /usr/include/irrlicht18
- luajit is not present in fedora repository then a local installation is done.

Here all my stuff to make minetest compiled on my computer. In one hand, I hope this could help other people to solve some problems during installation. In the other hand I hope give enough clues to help developer to make this step easy for everyone

My installation process is done with several script and hand made modifications :

First installation for LuaJIT
====================

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
echo "Download LuaJIT"

cd minetest-minetest-*

#git clone http://luajit.org/git/luajit-2.0.git

echo "Compilation locale"

cd luajit-2.0
set LuaJIT_path = `pwd`
echo "pwd = " $LuaJIT_path

mkdir lj2

echo "* make"
make PREFIX=$LuaJIT_path/lj2/

echo "* make install"
make install PREFIX=$LuaJIT_path/lj2/


Second minetest archives download
=========================
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
echo "Download source, extract (this is the URL to the latest of source repository, which might not work at all times):"
wget https://github.com/minetest/minetest/tarball/master -O master.tar.gz
tar xf master.tar.gz
cd minetest-minetest-*

echo "Download common (needed for minetest_game and some others)"
cd games/
wget https://github.com/minetest/common/tarball/master -O common.tar.gz
tar xf common.tar.gz
mv minetest-common-* common


echo "Download minetest_game (otherwise only the "Minimal development test" game is available)"

wget https://github.com/minetest/minetest_game/tarball/master -O minetest_game.tar.gz
tar xf minetest_game.tar.gz
mv minetest-minetest_game-* minetest_game
cd ..



Third minetest compilation
====================

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
echo "Build a version that runs directly from the source directory:"
cd minetest-minetest-*
cmake . -DRUN_IN_PLACE=1
make -j2


Fourth adding some adjustment in CmakeCache.txt
======================================
a) the path for LuaJIT

somthing like this :

//Disable non-ansi features.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
LUA_ANSI:BOOL=ON
N
//Path to a file.
LUA_INCLUDE_DIR:PATH=/REAL-PATH/lj2/include/luajit-2.0

//Path to a library.
LUA_LIBRARY:FILEPATH=/REAL-PATH/lj2/lib/libluajit-5.1.so


b) Same thing for irrlicht18

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
//Path to a file.
IRRLICHT_INCLUDE_DIR:PATH=/usr/include/irrlicht18

//Path to a library.
IRRLICHT_LIBRARY:FILEPATH=/usr/lib64/libIrrlicht18.so



Fifth adding some adjustement in src/game.cpp

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
//#if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 8)
        services->setPixelShaderConstant("normalTexture" , (irr::f32*)&layer1, 1);
        services->setPixelShaderConstant("useNormalmap" , (irr::f32*)&layer2, 1);
//#else
//        services->setPixelShaderConstant("normalTexture" , (irr::s32*)&layer1, 1);
//        services->setPixelShaderConstant("useNormalmap" , (irr::s32*)&layer2, 1);
//#endif


Finaly run an other time the compilation script
==================================

Verry last script for mods
==================
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
echo "Download mod fireworks"
cd minetest-minetest-*
cd mods

wget https://dl.dropbox.com/u/82668184/fireworks%20V0.3.zip -O fireworks_V0.3.zip
unzip fireworks_V0.3.zip

echo "Download mod SpaceInvader"
git clone https://github.com/B-Laurent/Minetest_SpaceInvader.git  SpaceInvader
mv SpaceInvader/spaceinvaders spaceinvaders
rm -r -f SpaceInvader



If you need more information be free to ask, i will give an answer. And thank to all of you for this great game.

And this is probably, something for an other post. During april, we have science ant technology days and i'm tinking about doing something with minetest and 3D printer of children. Is possible to export in STL format a part of a map ?
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Sat Feb 22, 2014 13:23

You should pass options like IRRLICHT_LIBRARY to cmake using -DIRRLICHT_LIBRARY=<value>.
Also modifying CMakeCache.txt and src/game.cpp without running make afterwards does not have any effect.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Neon
Member
 
Posts: 119
Joined: Thu Aug 15, 2013 02:03
In-game: Neon

by Neon » Sat Feb 22, 2014 18:14

My Fedora17 script is probably still relevant. Granted that we've gone up a minor revision since that post. The URLs are likely to be easy to modify.
Last edited by Neon on Sat Feb 22, 2014 18:15, edited 1 time in total.
 

Anatole_F44
New member
 
Posts: 2
Joined: Wed Jan 29, 2014 08:50

by Anatole_F44 » Sun Feb 23, 2014 12:30

Hi,

thanks for help.

Now the minetest compilation script looks like :

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
echo "Build a version that runs directly from the source directory:"
cd minetest-minetest-*
set LuaJIT_path = `pwd`"/luajit-2.0/lj2"
echo "LuaJIT_path  = " $LuaJIT_path

cmake . -DRUN_IN_PLACE=1  \
    -DIRRLICHT_INCLUDE_DIR=/usr/include/irrlicht18 \
    -DIRRLICHT_LIBRARY=/usr/lib64/libIrrlicht18.so \
    -DLUA_ANSI=ON \
    -DLUA_INCLUDE_DIR=$LuaJIT_path"/include/luajit-2.0" \
    -DLUA_LIBRARY=$LuaJIT_path"/lib/libluajit-5.1.so"


make -j2


Which gives a good CmakeCache.txt.


But during compilation the foolowing error occurs :

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
[ 67%] Building CXX object src/CMakeFiles/minetest.dir/game.cpp.o                                                                                         
/datatux/Laurent/Game/Minetest_049-ter/minetest-minetest-3da5669/src/game.cpp: In member function ‘virtual void GameGlobalShaderConstantSetter::onSetConstants(irr::video::IMaterialRendererServices*, bool)’:
/datatux/Laurent/Game/Minetest_049-ter/minetest-minetest-3da5669/src/game.cpp:828:75: erreur: no matching function for call to ‘irr::video::IMaterialRendererServices::setPixelShaderConstant(const char [14], irr::s32*, int)’
/datatux/Laurent/Game/Minetest_049-ter/minetest-minetest-3da5669/src/game.cpp:828:75: note: candidates are:
In file included from /datatux/Laurent/Game/Minetest_049-ter/minetest-minetest-3da5669/src/game.cpp:27:0:
/usr/include/irrlicht18/IMaterialRendererServices.h:84:15: note: virtual bool irr::video::IMaterialRendererServices::setPixelShaderConstant(const c8*, const f32*, int)
/usr/include/irrlicht18/IMaterialRendererServices.h:84:15: note:   no known conversion for argument 2 from ‘irr::s32* {aka int*}’ to ‘const f32* {aka const float*}’
/usr/include/irrlicht18/IMaterialRendererServices.h:92:15: note: virtual void irr::video::IMaterialRendererServices::setPixelShaderConstant(const f32*, irr::s32, irr::s32)
/usr/include/irrlicht18/IMaterialRendererServices.h:92:15: note:   no known conversion for argument 1 from ‘const char [14]’ to ‘const f32* {aka const float*}’
/datatux/Laurent/Game/Minetest_049-ter/minetest-minetest-3da5669/src/game.cpp:829:74: erreur: no matching function for call to ‘irr::video::IMaterialRendererServices::setPixelShaderConstant(const char [13], irr::s32*, int)’
/datatux/Laurent/Game/Minetest_049-ter/minetest-minetest-3da5669/src/game.cpp:829:74: note: candidates are:
In file included from /datatux/Laurent/Game/Minetest_049-ter/minetest-minetest-3da5669/src/game.cpp:27:0:
/usr/include/irrlicht18/IMaterialRendererServices.h:84:15: note: virtual bool irr::video::IMaterialRendererServices::setPixelShaderConstant(const c8*, const f32*, int)
/usr/include/irrlicht18/IMaterialRendererServices.h:84:15: note:   no known conversion for argument 2 from ‘irr::s32* {aka int*}’ to ‘const f32* {aka const float*}’
/usr/include/irrlicht18/IMaterialRendererServices.h:92:15: note: virtual void irr::video::IMaterialRendererServices::setPixelShaderConstant(const f32*, irr::s32, irr::s32)
/usr/include/irrlicht18/IMaterialRendererServices.h:92:15: note:   no known conversion for argument 1 from ‘const char [13]’ to ‘const f32* {aka const float*}’
[ 67%] Building CXX object src/CMakeFiles/minetestserver.dir/nameidmapping.cpp.o
make[2]: *** [src/CMakeFiles/minetest.dir/game.cpp.o] Erreur 1
make[1]: *** [src/CMakeFiles/minetest.dir/all] Erreur 2
make[1]: *** Attente des tâches non terminées....


../..

Linking CXX executable ../bin/minetestserver
[ 76%] Built target minetestserver
make: *** [all] Erreur 2


The manual modification of src/game.cpp makes the compilation run correctly.
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 10 guests

cron