hhvm / homebrew-hhvm

Official Mac OS X Homebrew formula for HHVM
MIT License
81 stars 22 forks source link

Brew fails after "Built target timelib" #22

Closed wakeless closed 8 years ago

wakeless commented 8 years ago

I've just done an install and it's failed here:

Last 15 lines from /Users/michael-gall/Library/Logs/Homebrew/hhvm/02.make:
[  1%] Built target afdt
[  1%] Building CXX object third-party/double-conversion/CMakeFiles/double-conversion.dir/src/double-conversion/diy-fp.cc.o
[  1%] Building C object third-party/timelib/CMakeFiles/timelib.dir/parse_tz.c.o
[  1%] Building CXX object third-party/double-conversion/CMakeFiles/double-conversion.dir/src/double-conversion/double-conversion.cc.o
[  1%] Building CXX object third-party/double-conversion/CMakeFiles/double-conversion.dir/src/double-conversion/fast-dtoa.cc.o
[  1%] Building C object third-party/timelib/CMakeFiles/timelib.dir/timelib.c.o
[  1%] Building CXX object third-party/double-conversion/CMakeFiles/double-conversion.dir/src/double-conversion/fixed-dtoa.cc.o
[  2%] Building CXX object third-party/double-conversion/CMakeFiles/double-conversion.dir/src/double-conversion/strtod.cc.o
[  2%] Building C object third-party/timelib/CMakeFiles/timelib.dir/tm2unixtime.c.o
[  2%] Linking CXX static library libdouble-conversion.a
[  2%] Built target double-conversion
[  2%] Building C object third-party/timelib/CMakeFiles/timelib.dir/unixtime2tm.c.o
[  2%] Linking C static library libtimelib.a
[  2%] Built target timelib
make: *** [all] Error 2

I've done a brew gist-logs: https://gist.github.com/anonymous/27cb43a22f312f5bc587

I've not got the foggiest idea as to where to go from here.

jwatzman commented 8 years ago

Can you give the output of find /usr/local/Cellar -name ctime as well as brew info llvm and brew info boost?

wakeless commented 8 years ago

Hi, Yep:

find /usr/local/Cellar -name ctime

/usr/local/Cellar/boost/1.57.0/include/boost/compatibility/cpp_c_headers/ctime
/usr/local/Cellar/boost/1.58.0/include/boost/compatibility/cpp_c_headers/ctime
/usr/local/Cellar/boost/1.59.0/include/boost/compatibility/cpp_c_headers/ctime
/usr/local/Cellar/gcc/4.9.2_1/include/c++/4.9.2/ctime
/usr/local/Cellar/gcc/4.9.2_1/include/c++/4.9.2/tr1/ctime
/usr/local/Cellar/gcc/5.1.0/include/c++/5.1.0/ctime
/usr/local/Cellar/gcc/5.1.0/include/c++/5.1.0/tr1/ctime
/usr/local/Cellar/llvm/3.6.1/include/c++/v1/ctime

brew info llvm

llvm: stable 3.6.2 (bottled), HEAD [keg-only]
Next-gen compiler infrastructure
http://llvm.org/
/usr/local/Cellar/llvm/3.6.1 (1546 files, 481M)
  Built from source with: --with-clang --with-rtti --with-lld
/usr/local/Cellar/llvm/3.6.2 (1410 files, 422M)
  Built from source with: --with-clang --with-rtti --with-lld
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/llvm.rb
==> Dependencies
Build: xz, cmake
==> Options
--universal
    Build a universal binary
--with-clang
    Build the Clang compiler and support libraries
--with-clang-extra-tools
    Build extra tools for Clang
--with-compiler-rt
    Build Clang runtime support libraries for code sanitizers, builtins, and profiling
--with-libcxx
    Build the libc++ standard library
--with-lld
    Build LLD linker
--with-lldb
    Build LLDB debugger
--with-python
    Build Python bindings against Homebrew Python
--with-rtti
    Build with C++ RTTI
--without-assertions
    Speeds up LLVM, but provides less debug information
--HEAD
    Install HEAD version
==> Caveats
LLVM executables are installed in /usr/local/opt/llvm/bin.
Extra tools are installed in /usr/local/opt/llvm/share/llvm.

This formula is keg-only, which means it was not symlinked into /usr/local.

OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/llvm/lib
    CPPFLAGS: -I/usr/local/opt/llvm/include

If you need Python to find bindings for this keg-only formula, run:
  echo /usr/local/opt/llvm/lib/python2.7/site-packages >> /usr/local/lib/python2.7/site-packages/llvm.pth
  mkdir -p /Users/michael-gall/Library/Python/2.7/lib/python/site-packages
  echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/michael-gall/Library/Python/2.7/lib/python/site-packages/homebrew.pth

brew info boost

boost: stable 1.59.0 (bottled), HEAD
Collection of portable C++ source libraries
http://www.boost.org
/usr/local/Cellar/boost/1.57.0 (10572 files, 439M)
  Poured from bottle
/usr/local/Cellar/boost/1.58.0 (10718 files, 486M)
  Poured from bottle
/usr/local/Cellar/boost/1.59.0 (10928 files, 454M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/boost.rb
==> Dependencies
Optional: icu4c
==> Options
--c++11
    Build using C++11 mode
--universal
    Build a universal binary
--with-icu4c
    Build regexp engine with icu support
--with-mpi
    Build with MPI support
--without-single
    Disable building single-threading variant
--without-static
    Disable building static library variant
--HEAD
    Install HEAD version
Bukashk0zzz commented 8 years ago

I think have the same problem:

==> Installing hhvm from hhvm/hhvm
==> Cloning https://github.com/facebook/hhvm.git
Cloning into '/Library/Caches/Homebrew/hhvm--git'...
remote: Counting objects: 45760, done.
remote: Compressing objects: 100% (35465/35465), done.
remote: Total 45760 (delta 6837), reused 32537 (delta 5644), pack-reused 0
Receiving objects: 100% (45760/45760), 22.80 MiB | 5.78 MiB/s, done.
Resolving deltas: 100% (6837/6837), done.
Checking connectivity... done.
Checking out files: 100% (58864/58864), done.
==> Checking out branch master
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/hhvm/HEAD -DDEFAULT_CONFIG_DIR=/usr/local/etc/hhvm -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++ -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DCMAKE_ASM_COMPILER=/usr/local/opt/llvm/bin/clang -DENABLE_MCROUTER=OFF -DENABLE_EXTENSION_MCROUTER=OFF -DENABLE_EXTENSION_IMAP=OFF -DMYSQL_UNIX_SOCK_ADDR=/tmp/mysql.sock -DCMAKE_C_FLAGS=-I/usr/local/opt/readline/include
==> make
Last 15 lines from /Users/denis/Library/Logs/Homebrew/hhvm/02.make:
Scanning dependencies of target re2
[  2%] Building CXX object third-party/re2/CMakeFiles/re2.dir/src/util/hash.cc.o
In file included from /tmp/hhvm20151222-38761-1a15xz8/third-party/re2/src/util/hash.cc:41:
/tmp/hhvm20151222-38761-1a15xz8/third-party/re2/src/util/util.h:23:10: fatal error: 'ctime' file not found
#include <ctime>
         ^
1 error generated.
make[2]: *** [third-party/re2/CMakeFiles/re2.dir/src/util/hash.cc.o] Error 1
make[1]: *** [third-party/re2/CMakeFiles/re2.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  2%] Building C object third-party/timelib/CMakeFiles/timelib.dir/tm2unixtime.c.o
[  2%] Building C object third-party/timelib/CMakeFiles/timelib.dir/unixtime2tm.c.o
[  2%] Linking C static library libtimelib.a
[  2%] Built target timelib
make: *** [all] Error 2

find /usr/local/Cellar -name ctime

/usr/local/Cellar/boost/1.59.0/include/boost/compatibility/cpp_c_headers/ctime

brew info llvm

llvm: stable 3.6.2 (bottled), HEAD [keg-only]
Next-gen compiler infrastructure
http://llvm.org/
/usr/local/Cellar/llvm/3.6.2 (1350 files, 412M)
  Built from source with: --with-clang
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/llvm.rb
==> Dependencies
Build: xz ✔, cmake ✔
==> Options
--universal
        Build a universal binary
--with-clang
        Build the Clang compiler and support libraries
--with-clang-extra-tools
        Build extra tools for Clang
--with-compiler-rt
        Build Clang runtime support libraries for code sanitizers, builtins, and profiling
--with-libcxx
        Build the libc++ standard library
--with-lld
        Build LLD linker
--with-lldb
        Build LLDB debugger
--with-python
        Build Python bindings against Homebrew Python
--with-rtti
        Build with C++ RTTI
--without-assertions
        Speeds up LLVM, but provides less debug information
--HEAD
        Install HEAD version
==> Caveats
LLVM executables are installed in /usr/local/opt/llvm/bin.
Extra tools are installed in /usr/local/opt/llvm/share/llvm.

This formula is keg-only, which means it was not symlinked into /usr/local.

OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/llvm/lib
    CPPFLAGS: -I/usr/local/opt/llvm/include

If you need Python to find bindings for this keg-only formula, run:
  echo /usr/local/opt/llvm/lib/python2.7/site-packages >> /usr/local/lib/python2.7/site-packages/llvm.pth
  mkdir -p /Users/denis/Library/Python/2.7/lib/python/site-packages
  echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/denis/Library/Python/2.7/lib/python/site-packages/homebrew.pth

brew info boost

boost: stable 1.59.0 (bottled), HEAD
Collection of portable C++ source libraries
http://www.boost.org
/usr/local/Cellar/boost/1.59.0 (10928 files, 454M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/boost.rb
==> Dependencies
Optional: icu4c ✔
==> Options
--c++11
        Build using C++11 mode
--universal
        Build a universal binary
--with-icu4c
        Build regexp engine with icu support
--with-mpi
        Build with MPI support
--without-single
        Disable building single-threading variant
--without-static
        Disable building static library variant
--HEAD
        Install HEAD version
denji commented 8 years ago

/usr/local/Cellar/llvm/3.6.2 (1350 files, 412M) Built from source with: --with-clang

libcxx (-stc=c++11 -stdlib=libc++) includes ctime headers, about (-std=gnu++11 -stdlib=libstdc++) I'm not sure.

--with-libcxx Build the libc++ standard library

kigamuka commented 8 years ago

Hey, guys @Bukashk0zzz @wakeless , @denji was right. After about 1 hour of building i got hhvm on my laptop, thanks for helping.

brew reinstall llvm --with-libcxx --with-clang --with-clang-extra-tools
brew install hhvm

Happy new year.

denji commented 8 years ago

"with-clang-extra-tools" is not needed, it seems there are no useful utilities.

hhvm.rb
  # We need to build with upstream clang -- the version Apple ships doesn't
  # support TLS, which HHVM uses heavily. (And gcc compiles HHVM fine, but
  # causes ld to trip an assert and fail, for unclear reasons.)
-  depends_on "llvm" => [:build, "with-clang"]
+  depends_on "llvm" => [:build, "with-clang", "with-libcxx"]
jwatzman commented 8 years ago

I think PR #25 fixes this? Sorry for the delay -- I was on holiday for Christmas and a transatlantic move. Please brew update and try again, and reopen if you still have problems.