redis not found

Post Reply
sosolal
Member
Posts: 14
Joined: Fri Apr 25, 2014 09:43
GitHub: sosolal
IRC: sosolal
In-game: sosolal

redis not found

by sosolal » Post

I want to compile Minetest but it tells me redis isn't found. Where find redis?

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

Re: redis not found

by PilzAdam » Post

You don't need it. You most likely don't have a redis server anyway.

sosolal
Member
Posts: 14
Joined: Fri Apr 25, 2014 09:43
GitHub: sosolal
IRC: sosolal
In-game: sosolal

Re: redis not found

by sosolal » Post

But it tells me that :

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!

Morn76
Member
Posts: 659
Joined: Sun Feb 16, 2014 19:45

Re: redis not found

by Morn76 » Post

sosolal wrote: CMake Error at CMakeLists.txt:174 (install):
install FILES given no DESTINATION!
That is your problem. Which OS are you building on?

sosolal
Member
Posts: 14
Joined: Fri Apr 25, 2014 09:43
GitHub: sosolal
IRC: sosolal
In-game: sosolal

Re: redis not found

by sosolal » Post

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

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

Re: redis not found

by PilzAdam » Post

OS X doesn't work out of the box, search the forum for topics how to build on OS X.

Morn76
Member
Posts: 659
Joined: Sun Feb 16, 2014 19:45

Re: redis not found

by Morn76 » Post

The gist of the two forum topics is:

Morn76
Member
Posts: 659
Joined: Sun Feb 16, 2014 19:45

Re: redis not found

by Morn76 » Post

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.

sosolal
Member
Posts: 14
Joined: Fri Apr 25, 2014 09:43
GitHub: sosolal
IRC: sosolal
In-game: sosolal

Re: redis not found

by sosolal » Post

And if I want to modify source code?

Morn76
Member
Posts: 659
Joined: Sun Feb 16, 2014 19:45

Re: redis not found

by Morn76 » Post

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.

sosolal
Member
Posts: 14
Joined: Fri Apr 25, 2014 09:43
GitHub: sosolal
IRC: sosolal
In-game: sosolal

Re: redis not found

by sosolal » Post

But the script doesn't works. The "redis not found!" error is still here and I cannot open minetest.app.

Morn76
Member
Posts: 659
Joined: Sun Feb 16, 2014 19:45

Re: redis not found

by Morn76 » Post

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.

joshburt
New member
Posts: 5
Joined: Wed Apr 23, 2014 23:48
GitHub: joshburt

Re: redis not found

by joshburt » Post

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.

sosolal
Member
Posts: 14
Joined: Fri Apr 25, 2014 09:43
GitHub: sosolal
IRC: sosolal
In-game: sosolal

Re: redis not found

by sosolal » Post

Why "on linux". that doesn't works with another kernel?

joshburt
New member
Posts: 5
Joined: Wed Apr 23, 2014 23:48
GitHub: joshburt

Re: redis not found

by joshburt » Post

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).

sfan5
Moderator
Posts: 4127
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

Re: redis not found

by sfan5 » Post

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.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

joshburt
New member
Posts: 5
Joined: Wed Apr 23, 2014 23:48
GitHub: joshburt

Re: redis not found

by joshburt » Post

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!

sosolal
Member
Posts: 14
Joined: Fri Apr 25, 2014 09:43
GitHub: sosolal
IRC: sosolal
In-game: sosolal

Re: redis not found

by sosolal » Post

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.

sfan5
Moderator
Posts: 4127
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

Re: redis not found

by sfan5 » Post

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.

Code: Select all

ls /proc
That command has nothing to do with Linux.
sarcasm
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
philipbenr
Member
Posts: 1897
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
Location: United States

Re: redis not found

by philipbenr » Post

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...

Post Reply