Export to GitHub

redis - issue #34

Redis on Windows?


Posted on May 6, 2009 by Grumpy Cat

Has anyone ported redis to Windows?

Comment #1

Posted on May 6, 2009 by Grumpy Dog

It was reported to compile using Cygwin, but it will never get supported. Still the Cygwin build appears to be viable at least for a first look.

Comment #2

Posted on May 6, 2009 by Grumpy Cat

Thanks. I expected as much. Is there some particular aspect of the code that would be a problem porting to Windows?

Comment #3

Posted on Oct 12, 2009 by Happy Ox

Hi -- Has anyone compiled with mingw? I started this weekend, and there are a lot of errors from include files that I'd expect to work with most standard posix set-ups.

Is there a mailing list for redis?

Thanks, Will

Comment #4

Posted on Oct 26, 2009 by Swift Bird

I actually got redis building and running with Visual Studio this weekend. Took a couple hours.

I'm not sure if antirez has any interest in supporting this officially; he hasn't responded to my emails yet. If he doesn't, maybe I'll just post the code and executable somewhere, I guess, if anyone wants to mess with it.

Comment #5

Posted on Oct 26, 2009 by Grumpy Panda

Hi csbrooks6,

Please do share your VS-port of redis! I do have a virtual box running Ubuntu, and had been unable to make it accessible to "outside" of the host machine. And Dreamhost's shared hosting wouldn't allow me to run it as a daemon, as it eats way more memory than I pay for...

Thanks very much for your work! Keep it up!

Regards, James

Comment #6

Posted on Oct 26, 2009 by Grumpy Dog

Hello, I'm trying to consider the issue. Basically I want to know if there are real benefits in having a native port compared to Cygwin, because Redis works almost perfectly on Cygwin (just 2 tests to fix but I know what's wrong). So before to go for the #ifdefs solution there is to understand the real benefits.

Another issue is that Redis is free software, it's hard to imagine that VS is needed in order to compile it for Widows. Everything should work with free tools. Maybe it's possible to compile a VS project using just MSYS?

Comment #7

Posted on Oct 26, 2009 by Grumpy Cat

If you want a system that is compatible with the redis interface check out TSnosql on twistedstorage.sourceforge.net. I wrote a Python implementation of "redis" because I needed something easy to modify, runs on everything and supports redis. I used the redis test scripts to make sure it is compatible.

Comment #8

Posted on Nov 6, 2009 by Happy Lion

Hi antirez,

When I tried to compile with cygwin , there were few compilation errors/warnings such as the switch '-rdyanamic' was not recognized and so forth...

Attached is the screen shot of redis compilation.

platform: MS Windows XP Professional SP 3

Attachments

Comment #9

Posted on Nov 14, 2009 by Swift Kangaroo

I Have build ver 1.0.2 with cygwin under windows. It is hosted here, if somebody needs it: http://web.itpeople.ee/itamp-project/

Comment #10

Posted on Jan 6, 2010 by Swift Lion

Hi antirez,

I think it would be a good idea if you could provide up-to-date windows builds. Windows is an important development platform as many developers still develop on windows. It would be a lot easier for us to be able to run redis on our development machine without needing access to another *nix server or have a *nix instance running inside a VM.

I would think it would be a good idea to optimize for *nix servers but still have all the tests pass on windows.

Comment #11

Posted on Jan 14, 2010 by Happy Giraffe

Hello antirez,

I prefer a native Win32 build instead of a cygwin build, reasons below:

1) Licenses

The cygwin build redis will be covered by GPL license if I understand the cygwin license[1] correclty.

2) The cygwin dll sometimes is not reliable, maybe bias, it's based on my own experience.

Regarding the compiler, I think we have two choice at least: 1) Mingw 2) VC2008 express edition which is also a free software can be downloaded from MS site.

[1] http://www.cygwin.com/licensing.html

BR, Austin

Comment #12

Posted on Feb 3, 2010 by Grumpy Lion

Another vote for a native build using Visual Studio. As xu4wang mentioned the express editions are free:

http://www.microsoft.com/express/downloads/#2008-Visual-CPP http://www.microsoft.com/express/downloads/#2010-Visual-CPP

Cygwin is a pain to install and use on Windows -- imagine having to run something in WINE. MSYS is similarly painful and often broken - there is not even a currently supported installer for mingw (not to mention their website is completely offline while I post this: http://www.mingw.org , I get Than Girl everyone knows so well: http://i.nuseek.com/images/template/360x318/ist2_746781_female_student.jpg )

The platform differences can be neatly abstracted away, and have been by many projects so there are a lot of examples. As you can see by this thread, there would be many contributers willing to help, including myself.

Comment #13

Posted on Feb 22, 2010 by Happy Panda

I'm not sure this would influence anyone, but boy could I use this.

My project is multi-platform based on the same porting layer that Postgres uses for native MSVC compiling. And that is solid.

I am also using OpenMPI, which uses CMake builds to support MSVC native compilation. That seems to work pretty well, too. (Surprisingly.) And they support NSIS installers for your final code. Nice.

But I need a key value store as well.

MongoDB is multi-platform, but pulls in a lot of stuff I don't like to accomplish that. More stuff to install everywhere, and not so easy, either.

Redis looks better than MongoDB anyway, IMHO. I am hoping that Google will be open to native cross-platform on the Redis front.

If Postgres can do this native on Windows, so can Redis.

Comment #14

Posted on Feb 24, 2010 by Helpful Giraffe

Comment 9 by ribozz, Nov 13, 2009

Thank you! i successfully downloaded and runned your port to Windows.

However it'd be very nice to have native windows release. Or to have windows port synced with the official (having now 1.0.2 vs 1.2.0).

Comment #15

Posted on Feb 24, 2010 by Grumpy Horse

I'd like to see a Redis port for Windows as well. I'm gonna try to build it with VS. Anyways, there is the express version of visual studio which is a free download!

Comment #16

Posted on Feb 24, 2010 by Grumpy Cat

If you want a system API compatible with redis that runs under Windows, Linux or MacOS check out TSnosql - part of the Twisted Storage project. It is written in Python so it won't match the performance of redis, but it does "haul".

Comment #17

Posted on Mar 24, 2010 by Swift Lion

For anyone that needs it, I'm hosting windows builds of Redis using Cygwin at: http://code.google.com/p/servicestack/wiki/RedisWindowsDownload

Comment #18

Posted on Mar 31, 2010 by Helpful Wombat

I am curious if not that VMware is sponsoring development, if we'll see movement on a native version on Windows. I don't know VMware's goals with the project, but I'm pretty sure ESX is primarily used to deploy Windows guests and they might be interested in those customers deploying Windows being able to use redis as well.

I'd love to use redis in some Windows based projects, but could never tell customers to run/install redis under cygwin and especially if it wouldn't be supported.

Comment #19

Posted on Apr 27, 2010 by Swift Lion

I'm trying to build this wing mingw/gcc 3.4.5, but the compiler doesn't know what an fd_set is:

gcc version 3.4.5 (mingw-vista special r3) C:\Users\ericp\lab\db\redis-1.2.6>make gcc -c -std=c99 -pedantic -O2 -Wall -W -g -rdynamic -ggdb adlist.c gcc.exe: unrecognized option -rdynamic' gcc -c -std=c99 -pedantic -O2 -Wall -W -g -rdynamic -ggdb ae.c gcc.exe: unrecognized option-rdynamic' In file included from ae.c:51: ae_select.c:8: error: syntax error before "fd_set"

... errors cascade

Do I need to upgrade to gcc 4? Is there one in mingw somewhere?

Comment #20

Posted on May 17, 2010 by Massive Lion

Get outside the comfort zone and just work with linux. You can developing on Windows, while having access to a linux box. There are a bunch of alternatives, including running a free virtual pc or a cheap linux vps host (like linode or something).

Comment #21

Posted on Sep 25, 2010 by Helpful Ox

I was able to compile redis in windows 7 by using 'Subsystem for UNIX'. Not extensive test, but both the server and cli seems to be working. I'm not sure the windows without 'Subsytem for UNIX' able to run or not. This feature only available for 'Enterprise' or 'Ultimate' version of windows 7 and windows server 2008. There are older version for vista (not sure about xp). Few modification need to make for the src code like strtoll and wait3 which is not supported. Otherwise, compile successfully with some warning. Anyone mind to have a try?

Attachments

Comment #22

Posted on Sep 25, 2010 by Helpful Ox

I just notice that my binary only run in POSIX environment provided by the 'Subsystem for UNIX' from Windows 7. So, those windows without this feature not able to run it. For those who has enterprise or ultimate windows can turn on it(by default it is off).

Comment #23

Posted on Sep 27, 2010 by Swift Panda

@sgwong513: I've tried your package with WinXP (SP2 32bit) and Win2008 (R2 64bit). I installed 'Subsystem for UNIX' on both. redis-server.exe and redis-cli.exe both print no output to console. It gets a "Windows NT exception" and a core file is created (see attachment).

P.S.: Have you tested the performance with redis-benchmark? The cygwin based windows version seems to be 4-10 times slower than the linux version on the same hardware.

Attachments

Comment #24

Posted on Sep 27, 2010 by Grumpy Giraffe

The cygwin based windows version seems to be 4-10 times slower than the linux version on the same hardware.

I can confirm this; in my case it was 3-4 times slower -- the other issue with cygwin is that you're limited to 32-bit.

Comment #25

Posted on Sep 28, 2010 by Swift Panda

@sgwong513: Got your version working on Win2008R2, seems it requires SUA 6.1 (http://go.microsoft.com/fwlink/?LinkId=139521). Sadly it is still more slowly than the Cygwin version. (I used redis-benchmark.exe from the Cygwin release on the same host for my test.)

Perhaps I'll try to compile it by my self with SUA/gcc and experiment with some compiler switches and a 64-bit version. At least the automatic saving and BGSAVE should be faster with 'System for UNIX' as the Cygwin implementation of fork() is crap in comparsion to the native fork() of modern Unixes.

Comment #26

Posted on Oct 12, 2010 by Happy Dog

Comment deleted

Comment #27

Posted on Oct 16, 2010 by Helpful Ox

There are mingw ported of redis available, refer to this thread:

http://groups.google.com/group/rubyinstaller/browse_thread/thread/ba6bac3df60fefdb

Comment #28

Posted on Feb 13, 2013 by Quick Hippo

Please prioritize Windows support. It's not my favorite environment either, but it really rocks when things "just work" on a variety of platforms.

Comment #29

Posted on Feb 13, 2013 by Grumpy Cat

Microsoft is working on their own version of Redis for windows. Please see https://github.com/MSOpenTech/Redis for more details.

Additionally, google code is no longer the repository of record for Redis. Please direct future attention to the github repository:

https://github.com/antirez/redis

Status: WontFix

Labels:
Type-Defect Priority-Medium