Page MenuHomePhabricator

HHVM doesn't compile on Vagrant
Closed, DeclinedPublic

Description

I've tried compiling HHVM on Vagrant with both Windows and Linux as the host system (in case it mattered). However, I'm running into the following error when it tries to compile the memcached extension:

/home/vagrant/hiphop-php/hphp/runtime/ext/ext_memcache.cpp: In member function âHPHP::Variant HPHP::c_Memcache::t_getversion()â:
/home/vagrant/hiphop-php/hphp/runtime/ext/ext_memcache.cpp:361:5: error: âmemcached_server_instance_stâ was not declared in this scope
/home/vagrant/hiphop-php/hphp/runtime/ext/ext_memcache.cpp:361:34: error: expected â;â before âinstanceâ
/home/vagrant/hiphop-php/hphp/runtime/ext/ext_memcache.cpp:364:10: error: âinstanceâ was not declared in this scope
/home/vagrant/hiphop-php/hphp/runtime/ext/ext_memcache.cpp:369:9: error: âinstanceâ was not declared in this scope
/home/vagrant/hiphop-php/hphp/runtime/ext/ext_memcache.cpp: In member function âHPHP::Array HPHP::c_Memcache::t_getstats(HPHP::CStrRef, int, int)â:
/home/vagrant/hiphop-php/hphp/runtime/ext/ext_memcache.cpp:461:3: error: âmemcached_server_instance_stâ was not declared in this scope
/home/vagrant/hiphop-php/hphp/runtime/ext/ext_memcache.cpp:461:32: error: expected â;â before âinstanceâ
/home/vagrant/hiphop-php/hphp/runtime/ext/ext_memcache.cpp:465:53: error: âinstanceâ was not declared in this scope
/home/vagrant/hiphop-php/hphp/runtime/ext/ext_memcache.cpp: In member function âHPHP::Array HPHP::c_Memcache::t_getextendedstats(HPHP::CStrRef, int, int)â:
/home/vagrant/hiphop-php/hphp/runtime/ext/ext_memcache.cpp:490:5: error: âmemcached_server_instance_stâ was not declared in this scope
/home/vagrant/hiphop-php/hphp/runtime/ext/ext_memcache.cpp:490:34: error: expected â;â before âserverâ
/home/vagrant/hiphop-php/hphp/runtime/ext/ext_memcache.cpp:495:5: error: âserverâ was not declared in this scope

This only occurs on Vagrant, and not on regular Ubuntu 12.04 VMs. I think it may have something to do with the package configuration, but I'm not sure.


Version: unspecified
Severity: normal

Details

Reference
bz49789

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:05 AM
bzimport set Reference to bz49789.

There's a note on https://github.com/facebook/hiphop-php/wiki/Building-and-installing-HHVM-on-Ubuntu-12.04 saying you should try removing CMakeCache.txt if you get build errors. Have you tried that? Also, have you otherwise followed the instructions on that page?

Yep, I've tried it all, and the people at Facebook have no idea either. The main error seems to be the missing memcached_server_instance_st type. In the vagrant VM, when I grep through /usr/include/libmemcached, this type is nowhere to be found. On a normal Ubuntu VM, it's there. So it has something to do with whatever version of libmemcached-dev is being installed.

The reason this occurs is because of the Wikimedia APT repository. It has some sort of custom version of libmemcached-dev. When I removed the repository and then purged and re-installed libmemcached, it continues to compile successfully.

[mass-moving from Tools>MediaWiki-Vagrant to separate product. See bug 54041. Filter bugmail on this comment.]

I was able to successfully compile HHVM with libmemcached-dev 1.0.17-1~wmf+precise1 installed. Either it wasn't the problem, or (more likely) it was once a problem but has since been fixed.