Skip to content

Building and Installing HHVM on Cygwin

Elizabeth M Smith edited this page Aug 5, 2014 · 20 revisions

Cygwin Build

Cygwin builds still use windows APIs. Only Windows 7 64bit and higher is supported. For now, HHVM must run inside the cygwin terminal.

The cygwin build does NOT have fastcgi, jemalloc or tcmalloc support right now. The zend_compat extension also does not currently build.

First you need to install cygwin. You must install the 64 bit version

http://cygwin.com/setup-x86_64.exe

Do not deselect any default packages. In addition you will need to install

Binaries

  • git
  • cmake
  • g++ (NOT the cygwin-32 version and NOT the mingw version)
  • make
  • cygserver (usually in a base install, but you need to run cygserver-config afterwards - this is necessary for sysv queue support)

For building deps

  • wget (under web)
  • patch
  • automake-1.11 (the version is important)

Dependencies

  • libboost-devel
  • libiconv-devel
  • libpcre-devel
  • libevent-devel
  • libcurl-devel
  • libxml2-devel
  • libxslt-devel
  • libexpat-devel
  • libmcrypt-devel
  • libbz2-devel
  • openldap-devel
  • libreadline-devel
  • libedit-devel
  • libelf-devel
  • libonig-devel
  • libintl-devel
  • libcrypt0devel
  • libsqlite3-devel -> NOTE: do NOT install the 3.8.5 version, it's broken, install the latest 3.8.4 version available

Then accept any dependencies that come along for the ride

Next you'll need to build 4 libraries

  1. glog
  2. libdwarf
  3. libmemcached
  4. tbb (thread building blocks)

Each of these will need a patch applied. Two patches are from Yet Another Cygwin Ports, one is a one line fix, and one allows tbb to build and run on cygwin.

Building glog

wget https://code.google.com/p/google-glog/downloads/detail?name=glog-0.3.3.tar.gz
tar -zxvf glog-0.3.3.tar.gz
wget https://raw.githubusercontent.com/fd00/yacp/495c0be0dc3dc9ba4ba23ee91966e9494e3afb85/glog/glog-0.3.3-1bl2.src.patch
cd glog-0.3.3
patch -p2 < ../glog-0.3.3-1bl2.src.patch
./configure && make && make install

Building libmemcached

wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
tar -zxvf libmemcached-1.0.18.tar.gz
wget https://github.com/fd00/yacp/blob/ca6dc369c2eec5f9a31d2e436b88a759a50c9439/libmemcached/libmemcached-1.0.18-1bl1.src.patch
cd libmemcached-1.0.18
patch -p2 < ../libmemcached-1.0.18-1bl1.src.patch
./configure && make && make install

Building libdwarf

wget http://www.prevanders.net/libdwarf-20140805.tar.gz
tar -zxvf libdwarf-20140805.tar.gz
cd libdwarf-20140805
./configure && make

Libdwarf does NOT have a proper install step, you'll need to copy libdwarf.h and dwarf.h to /usr/local/include/libdwarf and libdwarf.a to /usr/local/lib

Building tbb (thread building blocks)

Clone this wiki locally