我按照这个教程尝试在 CentOS 中安装 hiphop php: http://php.webtutor.pl/en/2011/04/22/howto-install-hiphop-for-php-on-centos-5-x/comment-page-1/#comment-416
我不再使用 git 克隆主分支,而是克隆了最新的“vm”分支。理论上,它应该可以工作。
问题出在最后几步,例如,当我引导“boost”时,出现很多错误,需要花费大量时间才能完成(大约 4 个小时):...无法更新 6 个目标... ...跳过了 12 个目标... ...更新了 9122 个目标...
似乎可用,所以我继续直到最后一步:
cd hiphop-php
git submodule init
git submodule update
export HPHP_HOME=`pwd`
export HPHP_LIB=`pwd`/bin
cmake .
问题就出在这里:
– CMAKE_PREFIX_PATH was missing, proceeding anyway
– MySQL Include dir: /usr/include library dir: /usr/lib64/mysql
– MySQL client libraries: mysqlclient_r
– Found libevent: /root/hiphop/local/lib/libevent.so
– Found GD: /usr/lib64/libgd.so
– Found ICU header files in /root/hiphop/local/include
– Found ICU libraries: /root/hiphop/local/lib/libicuuc.so
– Can’t find jemalloc
– Can’t find minimal tcmalloc
– Found Intel TBB
– Found mcrypt: /usr/lib64/libmcrypt.so
CMake Error at /usr/share/cmake-2.6/Modules/FindPackageHandleStandardArgs.cmake:57 (MESSAGE):
Could NOT find LibElf (missing: LIBELF_LIBRARIES LIBELF_INCLUDE_DIRS)
Call Stack (most recent call first):
CMake/FindLibElf.cmake:50 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMake/FindLibDwarf.cmake:12 (find_package)
CMake/HPHPFindLibs.cmake:250 (find_package)
CMake/HPHPSetup.cmake:46 (include)
src/CMakeLists.txt:18 (include)
– Configuring incomplete, errors occurred!
如果我已经使用以下命令在正确的目录中设置了变量,我不明白为什么会出现“CMAKE_PREFIX_PATH 丢失,但仍然继续”的情况:
export CC=gcc44
export CMAKE_PREFIX_PATH=`pwd`/local
也许我必须先清理一下,然后才能再次尝试构建,我该怎么做?
答案1
本周早些时候,我在 Ubuntu 上构建了 HipHop,希望可以给你一些指点。(对于 Ubuntu 用户来说,我的经验是:http://societyofcode.com/articles/guide_getting_started_with_hiphop_for_php-01-04-12)
-据我所知,“CMAKE_PREFIX_PATH”缺失消息毫无意义。即使编译成功,它也会显示出来。
-我使用了主分支,不确定 vm 的稳定性。克隆主分支可能也值得一试,作为一种手段。
-确保删除目录中的 CMakeCache.txt 文件。删除后重试。
祝你好运!