読者です 読者をやめる 読者になる 読者になる

DragonflyBSD + HHVM インストール失敗ログ

参考

Building and Installing on FreeBSD 8.2 · facebook/hhvm Wiki · GitHub

環境

  • DragonFly v4.0.1.2.gf72e0-RELEASE

ログ

とりあえずソース取ってくる

$ git clone git://github.com/facebook/hhvm.git --depth=1

Cloning into 'hhvm'...
remote: Counting objects: 43045, done.
remote: Compressing objects: 100% (33026/33026), done.
remote: Total 43045 (delta 6641), reused 30989 (delta 5602)
Receiving objects: 100% (43045/43045), 22.17 MiB | 2.39 MiB/s, done.
Resolving deltas: 100% (6641/6641), done.
Checking connectivity... done.
Checking out files: 100% (56082/56082), done.

サブモジュール取得

$ cd hhvm
$ git submodule update --init --recursive
Submodule 'third-party' (https://github.com/hhvm/hhvm-third-party.git) registered for path 'third-party'
Cloning into 'third-party'...
remote: Counting objects: 2471, done.
remote: Total 2471 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (2471/2471), 6.88 MiB | 1.35 MiB/s, done.
Resolving deltas: 100% (1270/1270), done.
Checking connectivity... done.
Submodule path 'third-party': checked out 'd0cad57b5427f84af8f77d60b8b53de4aaea4694'
Submodule 'folly' (https://github.com/facebook/folly.git) registered for path 'folly/src'
Submodule 'proxygen/src' (https://github.com/facebook/proxygen) registered for path 'proxygen/src'
Submodule 'thrift/src' (https://github.com/facebook/fbthrift.git) registered for path 'thrift/src'
Cloning into 'folly/src'...
remote: Counting objects: 9977, done.
remote: Total 9977 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (9977/9977), 4.38 MiB | 852.00 KiB/s, done.
Resolving deltas: 100% (7660/7660), done.
Checking connectivity... done.
Submodule path 'third-party/folly/src': checked out '6f9b619d9ffc219296a818a83266d60628e6aedd'
Cloning into 'proxygen/src'...
remote: Counting objects: 2265, done.
remote: Total 2265 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (2265/2265), 860.75 KiB | 191.00 KiB/s, done.
Resolving deltas: 100% (1684/1684), done.
Checking connectivity... done.
Submodule path 'third-party/proxygen/src': checked out '8a602aa40383d6dddbdcb2a951067b9923edfc74'
Cloning into 'thrift/src'...
remote: Counting objects: 10698, done.
remote: Total 10698 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (10698/10698), 5.76 MiB | 989.00 KiB/s, done.
Resolving deltas: 100% (7956/7956), done.
Checking connectivity... done.
Submodule path 'third-party/thrift/src': checked out 'bba5d4590ff71e8f34ce4f90a8d7b2cf867ca3d0'

とりあえず cmake 叩いてみる.

$ cmake .
— The C compiler identification is GNU 4.7.4
— The CXX compiler identification is GNU 4.7.4
— The ASM compiler identification is GNU
— Found assembler: /usr/bin/cc
— Check for working C compiler: /usr/bin/cc
— Check for working C compiler: /usr/bin/cc — works
— Detecting C compiler ABI info
— Detecting C compiler ABI info – done
— Check for working CXX compiler: /usr/bin/CC
— Check for working CXX compiler: /usr/bin/CC — works
— Detecting CXX compiler ABI info
— Detecting CXX compiler ABI info – done
— Performing Test IS_AARCH64
— Performing Test IS_AARCH64 – Failed
— Build type not specified: cmake build type Release.
CMake Error at CMake/HPHPCompiler.cmake:50 (message):
hhvm requires g++ 4.8 or greater.
Call Stack (most recent call first):
CMake/HPHPSetup.cmake:95 (include)
third-party/CMakeLists.txt:18 (include)

gcc が 4.8 以上じゃないと行けないらしいのでとりあえず gcc49 入れてみる.

$ sudo pkg install gcc49      
Updating Avalon repository catalogue...
Avalon repository is up-to-date.
All repositories are up-to-date.
The following 5 packages will be affected (of 0 checked):

New packages to be INSTALLED:
        gcc49: 4.9.3.s20150114
        mpfr: 3.1.2_2
        gmp: 5.1.3_2
        mpc: 1.0.2_1
        binutils: 2.25

The process will require 191 MB more space.
38 MB to be downloaded.

Proceed with this action? [y/N]: y
Fetching gcc49-4.9.3.s20150114.txz: 100%   33 MB 259.2k/s    02:13    
Fetching mpfr-3.1.2_2.txz: 100%  346 KB  70.8k/s    00:05    
Fetching gmp-5.1.3_2.txz: 100%  447 KB  91.5k/s    00:05    
Fetching mpc-1.0.2_1.txz: 100%   75 KB  77.2k/s    00:01    
Fetching binutils-2.25.txz: 100%    4 MB 409.4k/s    00:11    
Checking integrity... done (0 conflicting)
[1/5] Installing gmp-5.1.3_2...
[1/5] Extracting gmp-5.1.3_2: 100%
[2/5] Installing mpfr-3.1.2_2...
[2/5] Extracting mpfr-3.1.2_2: 100%
[3/5] Installing mpc-1.0.2_1...
[3/5] Extracting mpc-1.0.2_1: 100%
[4/5] Installing binutils-2.25...
[4/5] Extracting binutils-2.25: 100%
[5/5] Installing gcc49-4.9.3.s20150114...
[5/5] Extracting gcc49-4.9.3.s20150114: 100%
Message for gcc49-4.9.3.s20150114:
 To ensure binaries built with this toolchain find appropriate versions
of the necessary run-time libraries, you may want to link using

  -Wl,-rpath=/usr/local/lib/gcc49

For ports leveraging USE_GCC, USES=compiler, or USES=fortran this happens
transparently.

もっかい挑戦するも同じく g++ が 4.7.4 だと言い続ける. 調べてみるとどうも /usr/bin/CC を叩いてるようだけどこれが 4.7.4 らしい.

$ /usr/bin/CC -dumpversion
4.7.4

gcc49 は別にあるのでこいつを使うように暫定で変更してみる.

$ which gcc49
/usr/local/bin/gcc49
$ sudo mv /usr/bin/CC /usr/bin/CC.old
$ sudo ln -s /usr/local/bin/gcc49 /usr/bin/CC

ビルド

$ cmake .
-- Build type not specified: cmake build type Release.
-- Found LibDL: /usr/lib/libdl.so  
-- Performing Test LIBDL_NEEDS_UNDERSCORE
-- Performing Test LIBDL_NEEDS_UNDERSCORE - Failed
CMake Error at /usr/local/share/cmake/Modules/FindBoost.cmake:1182 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  CMake/HPHPFindLibs.cmake:31 (find_package)
  CMake/HPHPSetup.cmake:97 (include)
  third-party/CMakeLists.txt:18 (include)


-- Could NOT find LIBGLOG (missing:  LIBGLOG_LIBRARY LIBGLOG_INCLUDE_DIR) 
-- Could NOT find LIBINOTIFY (missing:  LIBINOTIFY_LIBRARY LIBINOTIFY_INCLUDE_DIR) 
-- Found LIBICONV: /usr/local/lib/libiconv.so  
-- Performing Test LIBICONV_CONST
-- Performing Test LIBICONV_CONST - Failed
-- MySQL Include dir: /usr/local/include/mysql  library dir: /usr/local/lib/mysql
-- MySQL client libraries: mysqlclient_r
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Could NOT find LIBMEMCACHED (missing:  LIBMEMCACHED_LIBRARY LIBMEMCACHED_INCLUDE_DIR) 
CMake Error at CMake/HPHPFindLibs.cmake:76 (message):
  libmemcache is too old, found 0 and we need 0.39
Call Stack (most recent call first):
  CMake/HPHPSetup.cmake:97 (include)
  third-party/CMakeLists.txt:18 (include)

libmemcache が古い.ていうか入ってなくね?

$ sudo pkg install libmemcached
Updating Avalon repository catalogue...
Avalon repository is up-to-date.
All repositories are up-to-date.
The following 3 packages will be affected (of 0 checked):

New packages to be INSTALLED:
        libmemcached: 1.0.18
        cyrus-sasl: 2.1.26_9
        libevent2: 2.0.22

The process will require 9 MB more space.
1 MB to be downloaded.

Proceed with this action? [y/N]: y
Fetching libmemcached-1.0.18.txz: 100%  736 KB 107.7k/s    00:07    
Fetching cyrus-sasl-2.1.26_9.txz: 100%  467 KB  95.6k/s    00:05    
Fetching libevent2-2.0.22.txz: 100%  274 KB  93.6k/s    00:03    
Checking integrity... done (0 conflicting)
[1/3] Installing cyrus-sasl-2.1.26_9...
*** Added group `cyrus' (id 60)
*** Added user `cyrus' (id 60)
[1/3] Extracting cyrus-sasl-2.1.26_9: 100%
[2/3] Installing libevent2-2.0.22...
[2/3] Extracting libevent2-2.0.22: 100%
[3/3] Installing libmemcached-1.0.18...
[3/3] Extracting libmemcached-1.0.18: 100%
Message for cyrus-sasl-2.1.26_9:
 You can use sasldb2 for authentication, to add users use:

        saslpasswd2 -c username

If you want to enable SMTP AUTH with the system Sendmail, read
Sendmail.README

NOTE: This port has been compiled with a default pwcheck_method of
      auxprop.  If you want to authenticate your user by /etc/passwd,
      PAM or LDAP, install ports/security/cyrus-sasl2-saslauthd and
      set sasl_pwcheck_method to saslauthd after installing the
      Cyrus-IMAPd 2.X port.  You should also check the
      /usr/local/lib/sasl2/*.conf files for the correct
      pwcheck_method.
      If you want to use GSSAPI mechanism, install
      ports/security/cyrus-sasl2-gssapi.
      If you want to use LDAP auxprop plugin, install
      ports/security/cyrus-sasl2-ldapdb.

ビルド

$ $ cmake .                                    
-- Build type not specified: cmake build type Release.
CMake Error at /usr/local/share/cmake/Modules/FindBoost.cmake:1182 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  CMake/HPHPFindLibs.cmake:31 (find_package)
  CMake/HPHPSetup.cmake:97 (include)
  third-party/CMakeLists.txt:18 (include)


-- Could NOT find LIBGLOG (missing:  LIBGLOG_LIBRARY LIBGLOG_INCLUDE_DIR) 
-- Could NOT find LIBINOTIFY (missing:  LIBINOTIFY_LIBRARY LIBINOTIFY_INCLUDE_DIR) 
-- MySQL Include dir: /usr/local/include/mysql  library dir: /usr/local/lib/mysql
-- MySQL client libraries: mysqlclient_r
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Found LIBMEMCACHED: /usr/local/lib/libmemcached.so  
-- Found PCRE: /usr/local/lib/libpcre.so  
-- Performing Test SYSTEM_PCRE_HAS_JIT
-- Performing Test SYSTEM_PCRE_HAS_JIT - Failed
-- System PCRE does not have JIT enabled - will use hhvm-third-party/pcre
-- Found libevent: /usr/local/lib/libevent.so
-- Looking for evhttp_bind_socket_with_fd
-- Looking for evhttp_bind_socket_with_fd - not found
-- Could NOT find LibUODBC (missing:  LIBODBC_LIBRARIES LIBODBC_INCLUDE_DIRS) 
-- Found CURL: /usr/local/lib/libcurl.so (found version "7.39.0") 
-- Looking for curl_multi_select
-- Looking for curl_multi_select - not found
-- Looking for curl_multi_wait
-- Looking for curl_multi_wait - found
-- Found LibXml2: /usr/local/lib/libxml2.so (found version "2.9.2") 
CMake Error at /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find LibXslt (missing: LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake/Modules/FindLibXslt.cmake:79 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMake/HPHPFindLibs.cmake:130 (find_package)
  CMake/HPHPSetup.cmake:97 (include)
  third-party/CMakeLists.txt:18 (include)

libxslt が足りない

$ sudo pkg install libxslt     
Updating Avalon repository catalogue...
Avalon repository is up-to-date.
All repositories are up-to-date.
The following 3 packages will be affected (of 0 checked):

New packages to be INSTALLED:
        libxslt: 1.1.28_6
        libgcrypt: 1.6.2
        libgpg-error: 1.17

The process will require 3 MB more space.
787 KB to be downloaded.

Proceed with this action? [y/N]: y
Fetching libxslt-1.1.28_6.txz: 100%  227 KB  77.4k/s    00:03    
Fetching libgcrypt-1.6.2.txz: 100%  447 KB  91.6k/s    00:05    
Fetching libgpg-error-1.17.txz: 100%  113 KB  57.8k/s    00:02    
Checking integrity... done (0 conflicting)
[1/3] Installing libgpg-error-1.17...
[1/3] Extracting libgpg-error-1.17: 100%
[2/3] Installing libgcrypt-1.6.2...
[2/3] Extracting libgcrypt-1.6.2: 100%
[3/3] Installing libxslt-1.1.28_6...
[3/3] Extracting libxslt-1.1.28_6: 100%

ビルド

$ cmake .
-- Could NOT find LIBGLOG (missing:  LIBGLOG_LIBRARY LIBGLOG_INCLUDE_DIR) 
-- Could NOT find LIBINOTIFY (missing:  LIBINOTIFY_LIBRARY LIBINOTIFY_INCLUDE_DIR) 
-- MySQL Include dir: /usr/local/include/mysql  library dir: /usr/local/lib/mysql
-- MySQL client libraries: mysqlclient_r
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- System PCRE does not have JIT enabled - will use hhvm-third-party/pcre
-- Found libevent: /usr/local/lib/libevent.so
-- Could NOT find LibUODBC (missing:  LIBODBC_LIBRARIES LIBODBC_INCLUDE_DIRS) 
-- Found LibXslt: /usr/local/lib/libxslt.so (found version "1.1.28") 
-- Found EXPAT: /usr/local/lib/libexpat.so (found version "2.1.0") 
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Using third-party bundled libsqlite3
-- Could NOT find DOUBLE_CONVERSION (missing:  DOUBLE_CONVERSION_LIBRARY DOUBLE_CONVERSION_INCLUDE_DIR) 
-- Using third-party bundled double-conversion
-- Could NOT find LZ4 (missing:  LZ4_LIBRARY LZ4_INCLUDE_DIR) 
-- Using third-party bundled LZ4
-- Could NOT find FastLZ (missing:  FASTLZ_LIBRARY FASTLZ_INCLUDE_DIR) 
-- Using third-party bundled fastlz
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Could NOT find LIBZIP (missing:  LIBZIP_LIBRARY LIBZIP_INCLUDE_DIR_ZIP LIBZIP_INCLUDE_DIR_ZIPCONF) 
-- Using third-party bundled libzip
CMake Error at CMake/FindICU.cmake:91 (MESSAGE):
  Could not find ICU
Call Stack (most recent call first):
  CMake/HPHPFindLibs.cmake:179 (find_package)
  CMake/HPHPSetup.cmake:97 (include)
  third-party/CMakeLists.txt:18 (include)

ICU が足りない

$ sudo pkg install icu    
Updating Avalon repository catalogue...
Avalon repository is up-to-date.
All repositories are up-to-date.
The following 1 packages will be affected (of 0 checked):

New packages to be INSTALLED:
        icu: 53.1

The process will require 58 MB more space.
13 MB to be downloaded.

Proceed with this action? [y/N]: y
Fetching icu-53.1.txz: 100%   13 MB 946.3k/s    00:14    
Checking integrity... done (0 conflicting)
[1/1] Installing icu-53.1...
[1/1] Extracting icu-53.1: 100%

ビルド

-- Could NOT find LIBGLOG (missing:  LIBGLOG_LIBRARY LIBGLOG_INCLUDE_DIR) 
-- Could NOT find LIBINOTIFY (missing:  LIBINOTIFY_LIBRARY LIBINOTIFY_INCLUDE_DIR) 
-- MySQL Include dir: /usr/local/include/mysql  library dir: /usr/local/lib/mysql
-- MySQL client libraries: mysqlclient_r
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- System PCRE does not have JIT enabled - will use hhvm-third-party/pcre
-- Found libevent: /usr/local/lib/libevent.so
-- Could NOT find LibUODBC (missing:  LIBODBC_LIBRARIES LIBODBC_INCLUDE_DIRS) 
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Using third-party bundled libsqlite3
-- Could NOT find DOUBLE_CONVERSION (missing:  DOUBLE_CONVERSION_LIBRARY DOUBLE_CONVERSION_INCLUDE_DIR) 
-- Using third-party bundled double-conversion
-- Could NOT find LZ4 (missing:  LZ4_LIBRARY LZ4_INCLUDE_DIR) 
-- Using third-party bundled LZ4
-- Could NOT find FastLZ (missing:  FASTLZ_LIBRARY FASTLZ_INCLUDE_DIR) 
-- Using third-party bundled fastlz
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Could NOT find LIBZIP (missing:  LIBZIP_LIBRARY LIBZIP_INCLUDE_DIR_ZIP LIBZIP_INCLUDE_DIR_ZIPCONF) 
-- Using third-party bundled libzip
-- Found ICU header files in /usr/local/include
-- Found ICU libraries: /usr/local/lib/libicuuc.so
-- Can't find minimal tcmalloc
ERROR: Unable to find Intel TBB install directory. 
CMake Error at CMake/HPHPFindLibs.cmake:277 (if):
  if given arguments:

    "LESS" "5005"

  Unknown arguments specified
Call Stack (most recent call first):
  CMake/HPHPSetup.cmake:97 (include)
  third-party/CMakeLists.txt:18 (include)

TBB が足りない?

Threading Building Blocks

ここからダウンロードしてきたけど Dragonfly だと使えない. これがビルドできないと動かなそうなので失敗で終了っぽい.