I finally successfully installed hack installed on OSX.
Here are the steps I followed:
I followed the steps on this page using the “Install by Hand” method:
https://github.com/facebook/hhvm/wiki/Building-and-installing-HHVM-on-OSX-10.9
Everything was cool, until I got to the step when I needed to enter the make command:
1 | make -j4 |
The make ran successfully until the very end, of course, and then I got a page full of errors, here is a snippet:
1 2 3 4 5 6 7 8 | Linking CXX executable hhvm Undefined symbols for architecture x86_64: "boost::match_results<__gnu_cxx::__normal_iterator <char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match <__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >::maybe_assign(boost::match_results<__gnu_cxx::__normal_iterator <char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match <__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > const&)", referenced from:</char></boost::sub_match></char> </__gnu_cxx::__normal_iterator></char></boost::sub_match></char></__gnu_cxx::__normal_iterator> |
Ok, I noticed it was complaining about the boost library, so I checked to see if it was installed, and it was:
1 2 | brew install boost Warning: boost-1.55.0 already installed |
I decided to uninstall then reinstall boost:
1 2 | brew remove boost Uninstalling /usr/local/Cellar/boost/1.55.0_1... |
Then I reinstalled boost using the steps from the GitHub page
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | brew install --build-from-source --cc=gcc-4.8 glog boost Warning: glog-0.3.3 already installed ==> Downloading https://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2 ######################################################################## 100.0% ==> Downloading https://github.com/boostorg/atomic/commit/6bb71fdd.diff ######################################################################## 100.0% ==> Downloading https://github.com/boostorg/atomic/commit/e4bde20f.diff ######################################################################## 100.0% ==> Patching patching file boost/atomic/detail/cas128strong.hpp patching file boost/atomic/detail/gcc-atomic.hpp ==> ./bootstrap.sh --prefix=/usr/local/Cellar/boost/1.55.0_1 --libdir=/usr/local/Cellar/boost/1.55.0_1/lib --without-icu ==> ./b2 --prefix=/usr/local/Cellar/boost/1.55.0_1 --libdir=/usr/local/Cellar/boost/1.55.0_1/lib -d2 -j8 --layout=tagged /usr/local/Cellar/boost/1.55.0_1: 10036 files, 554M, built in 8.7 minutes |
Ok now I have boost installed time to run the make command again.
1 | make -j4 |
This time it completed successfully and I was able to run the hhvm executable
1 2 | /Users/rmcfrazier/hhvm/hphp/hhvm/hhvm Notice: Nothing to do. Either pass a .php file to run, or use -m server |
Hope this helps someone.