facebook / hhvm

A virtual machine for executing programs written in Hack.
https://hhvm.com
Other
18.16k stars 2.99k forks source link

while building hiphop #332

Closed sridharsri closed 13 years ago

sridharsri commented 13 years ago

when iam trying to build HipHop

sridhar@ubuntu:~/dev/dev/hiphop-php$ cd hiphop-php bash: cd: hiphop-php: No such file or directory sridhar@ubuntu:~/dev/dev/hiphop-php$ git submodule init sridhar@ubuntu:~/dev/dev/hiphop-php$ git submodule update sridhar@ubuntu:~/dev/dev/hiphop-php$ cmake . -- CMAKE_PREFIX_PATH was missing, proceeding anyway -- MySQL Include dir: /usr/include library dir: /usr/lib -- MySQL client libraries: mysqlclient_r -- Found libevent: /home/sridhar/dev/dev/lib/libevent.so -- Looking for evhttp_bind_socket_with_fd -- Looking for evhttp_bind_socket_with_fd - not found CMake Error at CMake/HPHPFindLibs.cmake:65 (message): Custom libevent is required with HipHop patches Call Stack (most recent call first): CMake/HPHPSetup.cmake:46 (include) src/CMakeLists.txt:18 (include)

HPHPSetup.cmake

include(Options)

if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") endif()

IF(NOT DEFINED CMAKE_PREFIX_PATH) message(STATUS "CMAKE_PREFIX_PATH was missing, proceeding anyway") endif()

if(CMAKE_COMPILER_IS_GNUCC) INCLUDE(CheckCSourceCompiles) CHECK_C_SOURCE_COMPILES("#define GCC_VERSION (GNUC * 10000 + GNUC_MINOR * 100 + GNUC_PATCHLEVEL)

if GCC_VERSION < 40300

error Need GCC 4.3.0+

endif

int main() { return 0; }" HAVE_GCC_43)

if(NOT HAVE_GCC_43)
    message(FATAL_ERROR "Need at least GCC 4.3")
endif()

endif()

set(FREEBSD FALSE) set(LINUX FALSE)

if("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") set(FREEBSD TRUE) endif()

if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") set(LINUX TRUE) endif()

LIST(APPEND CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH}")

if(APPLE) if(EXISTS "/opt/local/var/macports/") LIST (APPEND CMAKE_PREFIX_PATH "/opt/local") LIST (APPEND CMAKE_LIBRARY_PATH "/opt/local/lib/x86_64") endif() endif()

include(HPHPFunctions) include(HPHPFindLibs)

add_definitions(-D_GNU_SOURCE -D_REENTRANT=1 -D_PTHREADS=1)

if(${CMAKE_BUILD_TYPE} MATCHES "Release") add_definitions(-DRELEASE=1) endif()

if(INFINITE_LOOP_DETECTION) add_definitions(-DINFINITE_LOOP_DETECTION=1) endif()

if(INFINITE_RECURSION_DETECTION) add_definitions(-DINFINITE_RECURSION_DETECTION=1) endif()

if(REQUEST_TIMEOUT_DETECTION) add_definitions(-DREQUEST_TIMEOUT_DETECTION=1) endif()

if(ENABLE_LATE_STATIC_BINDING) add_definitions(-DENABLE_LATE_STATIC_BINDING=1) endif()

if(DEBUG_MEMORY_LEAK) add_definitions(-DDEBUG_MEMORY_LEAK=1) endif()

if(DEBUG_APC_LEAK) add_definitions(-DDEBUG_APC_LEAK=1) endif()

if(ALWAYS_ASSERT) add_definitions(-DALWAYS_ASSERT=1) endif()

if(HOTPROFILER) add_definitions(-DHOTPROFILER=1) endif()

if(HOTPROFILER_NO_BUILTIN) add_definitions(-DHOTPROFILER_NO_BUILTIN=1) endif()

if(EXECUTION_PROFILER) add_definitions(-DEXECUTION_PROFILER=1) endif()

if(ENABLE_FULL_SETLINE) add_definitions(-DENABLE_FULL_SETLINE=1) endif()

if(APPLE OR FREEBSD) add_definitions(-DSKIP_USER_CHANGE=1) endif()

enable the OSS options if we have any

add_definitions(-DHPHP_OSS=1)

execute_process(COMMAND git describe --all --long --abbrev=40 --always OUTPUT_VARIABLE _COMPILER_ID OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)

if (_COMPILER_ID) add_definitions(-DCOMPILER_ID="${_COMPILER_ID}") endif()

IF($ENV{CXX} MATCHES "icpc") set(CMAKE_C_FLAGS "-no-ipo -fp-model precise -wd584 -wd1418 -wd1918 -wd383 -wd869 -wd981 -wd424 -wd1419 -wd444 -wd271 -wd2259 -wd1572 -wd1599 -wd82 -wd177 -wd593 -w") set(CMAKE_CXX_FLAGS "-no-ipo -fp-model precise -wd584 -wd1418 -wd1918 -wd383 -wd869 -wd981 -wd424 -wd1419 -wd444 -wd271 -wd2259 -wd1572 -wd1599 -wd82 -wd177 -wd593 -fno-omit-frame-pointer -ftemplate-depth-60 -Wall -Woverloaded-virtual -Wno-deprecated -w1 -Wno-strict-aliasing -Wno-write-strings -Wno-invalid-offsetof -fno-operator-names") else() set(CMAKE_C_FLAGS "-w") set(CMAKE_CXX_FLAGS "-fno-gcse -fno-omit-frame-pointer -ftemplate-depth-60 -Wall -Woverloaded-virtual -Wno-deprecated -Wno-parentheses -Wno-strict-aliasing -Wno-write-strings -Wno-invalid-offsetof -fno-operator-names") endif()

include_directories(${HPHP_HOME}/src) include_directories(${HPHP_HOME}/src/lib/system/gen)

scottmac commented 13 years ago

Need to use export CMAKE_PREFIX_PATH to point to the path where the custom libraries are.

jchook commented 12 years ago

Having a similar issue...

~/dev/hiphop-php master $ export CMAKE_PREFIX_PATH=`/bin/pwd`/../
~/dev/hiphop-php master $ cmake .
-- CMAKE_PREFIX_PATH was missing, proceeding anyway
...
jchook commented 12 years ago

Never mind, this stackoverflow post helped.

This command worked for me: cmake -D CMAKE_PREFIX_PATH=/bin/pwd/../ .

louisehu commented 12 years ago

If you've tcsh shell, just try setenv instead of export;

setenv CMAKE_PREFIX_PATH ${HPHP_HOME}/../