Page 1 of 1

redis not found

PostPosted: Fri Apr 25, 2014 09:56
by sosolal
I want to compile Minetest but it tells me redis isn't found. Where find redis?

Re: redis not found

PostPosted: Fri Apr 25, 2014 09:56
by PilzAdam
You don't need it. You most likely don't have a redis server anyway.

Re: redis not found

PostPosted: Fri Apr 25, 2014 10:46
by sosolal
But it tells me that :
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
-- *** Will build version 0.4.9-dev ***
-- IRRLICHT_SOURCE_DIR =
-- IRRLICHT_INCLUDE_DIR = /usr/local/include/irrlicht
-- IRRLICHT_LIBRARY = /usr/local/lib/libIrrlicht.a
CMake Error at CMakeLists.txt:174 (install):
  install FILES given no DESTINATION!


-- CURL_INCLUDE_DIR = /usr/include/curl
-- CURL_LIBRARY = /usr/lib/libcurl.dylib
-- CURL_DLL =
-- cURL support enabled
-- GetText disabled
-- Sound enabled
-- Found system sqlite3 header file in /usr/include
-- Found system sqlite3 library /usr/lib/libsqlite3.dylib
-- Using project jsoncpp library
-- LuaJIT library: LUA_LIBRARY-NOTFOUND
-- LuaJIT headers: LUA_INCLUDE_DIR-NOTFOUND
-- LuaJIT not found, using bundled Lua.
-- redis library: REDIS_LIBRARY-NOTFOUND
-- redis headers: REDIS_INCLUDE_DIR-NOTFOUND
-- redis not found!
-- Configuring incomplete, errors occurred!

That's because redis is not found!

Re: redis not found

PostPosted: Fri Apr 25, 2014 11:26
by Morn76
sosolal wrote:CMake Error at CMakeLists.txt:174 (install):
install FILES given no DESTINATION!


That is your problem. Which OS are you building on?

Re: redis not found

PostPosted: Fri Apr 25, 2014 11:35
by sosolal
Darwin 13.1.0 (via uname -rs)
I've Mac OS X Mavericks, but Mavericks 10.9.1 is fundamentally Darwin 13.1.10 which is fundamentally FreeBSD

Re: redis not found

PostPosted: Fri Apr 25, 2014 11:37
by PilzAdam
OS X doesn't work out of the box, search the forum for topics how to build on OS X.

Re: redis not found

PostPosted: Fri Apr 25, 2014 11:43
by Morn76
The gist of the two forum topics is:


Re: redis not found

PostPosted: Fri Apr 25, 2014 11:47
by Morn76
Maybe the error message could be a bit less dramatic though. "redis not found!" makes it sound like a grave problem. Get rid of the exclamation mark.

Re: redis not found

PostPosted: Fri Apr 25, 2014 12:19
by sosolal
And if I want to modify source code?

Re: redis not found

PostPosted: Fri Apr 25, 2014 12:28
by Morn76
sosolal wrote:And if I want to modify source code?


If you comment out "git checkout master --force" in make_mac.sh it should not overwrite your changes in minetest-git. Perhaps remove the patch command too if its error message bothers you.

And if you want to run MT on your own machine (with all dependencies installed), you can comment out the dylibbundler stuff too.

Re: redis not found

PostPosted: Fri Apr 25, 2014 12:46
by sosolal
But the script doesn't works. The "redis not found!" error is still here and I cannot open minetest.app.

Re: redis not found

PostPosted: Fri Apr 25, 2014 13:09
by Morn76
The redis message is not a problem. Redis is an optional feature.

Have you installed all required dependencies on your system?

Please post the complete output from the script so I can see where it fails.

Re: redis not found

PostPosted: Fri Apr 25, 2014 15:33
by joshburt
In order to get redis support working (on linux - which is does). I had to :

1. Setup and properly configure a redis server. Go do that first or find a hosted one you can use.

2. Build the c library used to link to during minetest compiling and runtime:
a. git clone and build this: https://github.com/redis/hiredis

3. Next I had to build Minetest with redis support enabled:
cmake . -DRUN_IN_PLACE=1 -DBUILD_CLIENT=0 -DUSE_REDIS=1 -DREDIS_LIBRARY=/home/josh/hiredis/libhiredis.so -DREDIS_INCLUDE_DIR=/home/josh/hiredis/

These options are the special sauce:
-DUSE_REDIS=1 -DREDIS_LIBRARY=/home/josh/hiredis/libhiredis.so -DREDIS_INCLUDE_DIR=/home/josh/hiredis/
(Where the REDIS library and directory are correctly updated for your environment).

4. Make the hiredis library available during runtime.
Afterwards I copied the libhiredis.so library to the base of the minetest directory and created a sym link for the version specified via an 'ldd' on the resultant minetestserver binary:
libhiredis.so.0.11 -> libhiredis.so

5. Configure minetestserver to use the redis server
Update the world data storage by updating the world.mt as follows:
backend = redis
redis_address = 192.16.0.38
redis_port = 6379
redis_hash = minetest_dev

(The port and hash are optional parameters). The backend and server portal are REQUIRED.

I then launch minetestserver normally (from the root minetest directory: ./bin/minetestserver). If you missed anything it core dumps on start-up. Otherwise it acts just like a normal server but block data is stored in redis. Pure awesome! This was the steps needed for redis support in Linux. Your milage will vary and depending on the platform you're building for you might need to perform additional steps.

Re: redis not found

PostPosted: Fri Apr 25, 2014 15:38
by sosolal
Why "on linux". that doesn't works with another kernel?

Re: redis not found

PostPosted: Fri Apr 25, 2014 15:42
by joshburt
sosolal wrote:Why "on linux". that doesn't works with another kernel?



The server should compile just fine with redis support on any platform. :) I only tested Linux though since that's how I deploy back-end (server).

Re: redis not found

PostPosted: Fri Apr 25, 2014 17:44
by sfan5
joshburt wrote:In order to get redis support working (on linux - which is does). I had to :

1. Setup and properly configure a redis server. Go do that first or find a hosted one you can use.

2. Build the c libra
...
acts just like a normal server but block data is stored in redis. Pure awesome! This was the steps needed for redis support in Linux. Your milage will vary and depending on the platform you're building for you might need to perform additional steps.

You just perfectly summed up the content of http://dev.minetest.net/CMake_Options#Redis and http://wiki.minetest.net/Database_backends#Redis.

Re: redis not found

PostPosted: Fri Apr 25, 2014 22:11
by joshburt
Awesome! I totally just dug around in the source code of the commit to figure it out. :P I just created a wiki account so I can add some additional content to the working documentation. Thanks!

Re: redis not found

PostPosted: Sat Apr 26, 2014 09:37
by sosolal
joshburt wrote:The server should compile just fine with redis support on any platform. :) I only tested Linux though since that's how I deploy back-end (server).

Yes, but why just precise the kernel? The commands to type have nothing to do with the kernel.

Re: redis not found

PostPosted: Sat Apr 26, 2014 11:35
by sfan5
sosolal wrote:
joshburt wrote:The server should compile just fine with redis support on any platform. :) I only tested Linux though since that's how I deploy back-end (server).

Yes, but why just precise the kernel? The commands to type have nothing to do with the kernel.

I agree.
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
ls /proc

That command has nothing to do with Linux.
sarcasm

Re: redis not found

PostPosted: Tue Apr 29, 2014 00:37
by philipbenr
I have had problems with not being able to compile with redis... I gave up. I am pretty sure there was something wrong with the laptop/My outdated OS. It was old and had some weird bugs with it...