Skip to content

Instantly share code, notes, and snippets.

@ysasaki
Created April 1, 2014 14:52
Show Gist options
  • Select an option

  • Save ysasaki/9915735 to your computer and use it in GitHub Desktop.

Select an option

Save ysasaki/9915735 to your computer and use it in GitHub Desktop.
hhvm build error on Mac OSX 10.9
% cmake . \ (git)-[master] -
-DCMAKE_CXX_COMPILER=$(brew --prefix gcc48)/bin/g++-4.8 \
-DCMAKE_C_COMPILER=$(brew --prefix gcc48)/bin/gcc-4.8 \
-DCMAKE_ASM_COMPILER=$(brew --prefix gcc48)/bin/gcc-4.8 \
-DLIBIBERTY_LIB=$(brew --prefix gcc48)/lib/x86_64/libiberty-4.8.a \
-DCMAKE_INCLUDE_PATH="/usr/local/include:/usr/include" \
-DCMAKE_LIBRARY_PATH="/usr/local/lib:/usr/lib" \
-DLIBEVENT_LIB=$(brew --prefix libeventfb)/lib/libevent.dylib \
-DLIBEVENT_INCLUDE_DIR=$(brew --prefix libeventfb)/include \
-DICU_INCLUDE_DIR=$(brew --prefix icu4c)/include \
-DICU_LIBRARY=$(brew --prefix icu4c)/lib/libicuuc.dylib \
-DICU_I18N_LIBRARY=$(brew --prefix icu4c)/lib/libicui18n.dylib \
-DICU_DATA_LIBRARY=$(brew --prefix icu4c)/lib/libicudata.dylib \
-DREADLINE_INCLUDE_DIR=$(brew --prefix readline)/include \
-DREADLINE_LIBRARY=$(brew --prefix readline)/lib/libreadline.dylib \
-DNCURSES_LIBRARY=$(brew --prefix ncurses)/lib/libncurses.dylib \
-DCURL_INCLUDE_DIR=$(brew --prefix curl)/include \
-DCURL_LIBRARY=$(brew --prefix curl)/lib/libcurl.dylib \
-DBOOST_INCLUDEDIR=$(brew --prefix boostfb)/include \
-DBOOST_LIBRARYDIR=$(brew --prefix boostfb)/lib \
-DBoost_USE_STATIC_LIBS=ON \
-DJEMALLOC_INCLUDE_DIR=$(brew --prefix jemallocfb)/include \
-DJEMALLOC_LIB=$(brew --prefix jemallocfb)/lib/libjemalloc.dylib \
-DLIBINTL_LIBRARIES=$(brew --prefix gettext)/lib/libintl.dylib \
-DLIBINTL_INCLUDE_DIR=$(brew --prefix gettext)/include \
-DLIBDWARF_LIBRARIES=$(brew --prefix libdwarf)/lib/libdwarf.3.dylib \
-DLIBDWARF_INCLUDE_DIRS=$(brew --prefix libdwarf)/include \
-DLIBMAGICKWAND_INCLUDE_DIRS=$(brew --prefix imagemagick)/include/ImageMagick-6 \
-DLIBMAGICKWAND_LIBRARIES=$(brew --prefix imagemagick)/lib/libMagickWand-6.Q16.dylib
% make -j4
--snip--
Linking CXX static library libext_hhvm.a
[ 98%] Built target ext_hhvm_static
Scanning dependencies of target hhvm
Scanning dependencies of target test
[ 98%] [ 99%] Building CXX object hphp/hhvm/CMakeFiles/hhvm.dir/global-variables.cpp.o
[ 99%] Building CXX object hphp/hhvm/CMakeFiles/hhvm.dir/main.cpp.o
Building CXX object hphp/hhvm/CMakeFiles/hhvm.dir/process-init.cpp.o
[ 99%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/main.cpp.o
[ 99%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test.cpp.o
[ 99%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_all.cpp.o
[ 99%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_base.cpp.o
Linking CXX executable hhvm
Undefined symbols for architecture x86_64:
"HPHP::HardwareCounter::GetPerfEvents(HPHP::Array&)", referenced from:
HPHP::f_hphp_get_hardware_counters() in libhphp_runtime_ext.a(ext_output.cpp.o)
"HPHP::HardwareCounter::SetPerfEvents(HPHP::String const&)", referenced from:
HPHP::f_hphp_set_hardware_events(HPHP::String const&) in libhphp_runtime_ext.a(ext_output.cpp.o)
"HPHP::HardwareCounter::ClearPerfEvents()", referenced from:
HPHP::f_hphp_clear_hardware_events() in libhphp_runtime_ext.a(ext_output.cpp.o)
"HPHP::HardwareCounter::GetInstructionCount()", referenced from:
HPHP::f_hphp_instruction_counter() in libhphp_runtime_ext.a(ext_output.cpp.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [hphp/hhvm/hhvm] Error 1
make[1]: *** [hphp/hhvm/CMakeFiles/hhvm.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 99%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_code_error.cpp.o
[ 99%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_code_run.cpp.o
[ 99%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_cpp_base.cpp.o
[ 99%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_cpp_ext.cpp.o
[ 99%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_ext_apc.cpp.o
[ 99%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_ext_curl.cpp.o
[ 99%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_ext_memcached.cpp.o
[ 99%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_ext_server.cpp.o
[ 99%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_logger.cpp.o
[100%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_parser.cpp.o
[100%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_parser_expr.cpp.o
[100%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_parser_stmt.cpp.o
[100%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_server.cpp.o
[100%] Building CXX object hphp/test/CMakeFiles/test.dir/ext/test_util.cpp.o
[100%] Building CXX object hphp/test/CMakeFiles/test.dir/__/hhvm/process-init.cpp.o
[100%] Building CXX object hphp/test/CMakeFiles/test.dir/__/hhvm/global-variables.cpp.o
Linking CXX executable test
Undefined symbols for architecture x86_64:
"HPHP::HardwareCounter::GetPerfEvents(HPHP::Array&)", referenced from:
HPHP::f_hphp_get_hardware_counters() in libhphp_runtime_ext.a(ext_output.cpp.o)
"HPHP::HardwareCounter::SetPerfEvents(HPHP::String const&)", referenced from:
HPHP::f_hphp_set_hardware_events(HPHP::String const&) in libhphp_runtime_ext.a(ext_output.cpp.o)
"HPHP::HardwareCounter::ClearPerfEvents()", referenced from:
HPHP::f_hphp_clear_hardware_events() in libhphp_runtime_ext.a(ext_output.cpp.o)
"HPHP::HardwareCounter::GetInstructionCount()", referenced from:
HPHP::f_hphp_instruction_counter() in libhphp_runtime_ext.a(ext_output.cpp.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [hphp/test/test] Error 1
make[1]: *** [hphp/test/CMakeFiles/test.dir/all] Error 2
make: *** [all] Error 2
make -j4 11312.50s user 719.66s system 385% cpu 52:03.28 total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment