Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile memcached on Windows?

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.

like image 492
Navaneeth K N Avatar asked Nov 13 '22 18:11

Navaneeth K N


1 Answers

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.

like image 122
Jarekczek Avatar answered Nov 15 '22 12:11

Jarekczek