5

I am trying to get memcached running on Windows. I have downloaded memcached stable latest and compiled it using Mingw under Windows 7. Configure failed with error,

checking for libevent directory... configure: error: libevent is required. You can get it from http://www.monkey.org/~provos/libevent/

  If it's already installed, specify its path using --with-libevent=/dir/

Then I downloaded libevent and compiled it. This produced 3 DLLs, libeventcore, libevent-extra and libevent-2.0.5.

I ran configure on memcached again with the option --with-libevent. But for some reason, it fails again with the same error. I have no clue on why it is failing. Can anyone help me to resolve this issue? Or is there a better way to get memcached running on Windows? I have seen lot of pre-built binaries for Windows. But all of them uses old versions of memcached. And AFAIK, Windows is officially supported by memcached in the newer versions.

I am using Windows7 64bit version with MinGW.

Navaneeth K N
  • 15,295
  • 38
  • 126
  • 184

3 Answers3

1

After you run make in libevent dir you get the files ready, but to make full use of it, they must be installed. So make install step is needed. If you configured it with a prefix, it will land in the directory of your choice. Otherwise it is /usr/local.

So maybe it's enough to run make install in libevent dir and run configure from memcache without parameters.

If you still have problems passing the configure stage, look at config.log. It shows the source file and the gcc command on which it failed.

Unfortunately successful configure is not everything. Later it fails on inclusion of sys/socket.h, netinet/in.h and netdb.h and perhaps also -pthread gcc parameter. I'm afraid it won't compile on mingw. At least not without a serious porting effort.

Jarekczek
  • 7,456
  • 3
  • 46
  • 66
0

As I know, Never had an official Memcached port for Windows (Yes, there were few individual efforts. Last knowing porting effort can find on version 1.2.6 here) Best known Implementation for Memcached for windows on Couchbase with Memcached Bucket.

Dasun
  • 3,244
  • 1
  • 29
  • 40
0

Late to the party I realize but the answer is to use:

$ export LIBS=-lws2_32

which will place $LIBS at the end of compile calls so that it is linked to libws2_32.a or winsocks2, but this probably means that your did not configure your build correctly and you will subsequent errors such as #include <sys/socket.h> header not found, etc.

see mingw-linker-error-winsock

Community
  • 1
  • 1
Mark Mikofski
  • 19,398
  • 2
  • 57
  • 90