llvm-hs / homebrew-llvm

LLVM formulae for the Homebrew package manager
25 stars 7 forks source link

brew install llvm-hs/llvm/llvm-8 fails #13

Closed idontgetoutmuch closed 5 years ago

idontgetoutmuch commented 5 years ago
Last 15 lines from /Users/dom/Library/Logs/Homebrew/llvm-8/02.make:
[100%] Built target LLVMSupport
Scanning dependencies of target llvm-tblgen
make[6]: *** No rule to make target `lib/libLLVMSupport.a', needed by `bin/llvm-tblgen'.  Stop.
make[5]: *** [utils/TableGen/CMakeFiles/llvm-tblgen.dir/all] Error 2
make[4]: *** [utils/TableGen/CMakeFiles/llvm-tblgen.dir/rule] Error 2
make[3]: *** [llvm-tblgen] Error 2
make[2]: *** [NATIVE/bin/llvm-tblgen] Error 2
make[1]: *** [utils/TableGen/CMakeFiles/LLVM-tablegen-host.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Built target LLVMSupport
Scanning dependencies of target clang-tblgen
[100%] Linking CXX executable ../../../../bin/clang-tblgen
[100%] Built target clang-tblgen
[ 17%] Built target CLANG-tablegen-host
make: *** [all] Error 2
tmcdonell commented 5 years ago

What is your OS and Xcode version? Also make sure that xcode-select --print-path is pointing to the correct place (actual Xcode, not the command line tools. For me it returns /Applications/Xcode.app/Contents/Developer)

idontgetoutmuch commented 5 years ago
sw_vers
ProductName:    Mac OS X
ProductVersion: 10.13.6
BuildVersion:   17G65

xcode-select --print-path
/Applications/Xcode.app/Contents/Developer

xcodebuild -version
Xcode 10.1
Build version 10B61
idontgetoutmuch commented 5 years ago

I just did brew rm llvm and tried again. This time I get a different error

Last 15 lines from /Users/dom/Library/Logs/Homebrew/llvm-8/02.make:
ld: can't open file, errno=2 file '../../lib/libLLVMSupport.a' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[6]: *** [bin/llvm-tblgen] Error 1
make[5]: *** [utils/TableGen/CMakeFiles/llvm-tblgen.dir/all] Error 2
make[4]: *** [utils/TableGen/CMakeFiles/llvm-tblgen.dir/rule] Error 2
make[3]: *** [llvm-tblgen] Error 2
make[2]: *** [NATIVE/bin/llvm-tblgen] Error 2
make[1]: *** [utils/TableGen/CMakeFiles/LLVM-tablegen-host.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Built target LLVMSupport
Scanning dependencies of target clang-tblgen
[100%] Linking CXX executable ../../../../bin/clang-tblgen
[100%] Built target clang-tblgen
[ 17%] Built target CLANG-tablegen-host
make: *** [all] Error 2
tmcdonell commented 5 years ago

I have macOS 10.14.5 on this machine, but I do have an older laptop with 10.13 at home; I will try that out later on.

steinitznavican commented 5 years ago

I already tried on another computer and it succeeded. I need to use the first computer though and I am not sure how to proceed. Any tips would be greatly appreciated.

==> cmake -G Unix Makefiles .. -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=
==> make
==> make install
==> make install-xcode-toolchain
==> install_name_tool -change @rpath/libLLVM.dylib /usr/local/Cellar/llvm-8/8.0.0/lib/llvm
==> install_name_tool -change @rpath/libLLVM.dylib /usr/local/Cellar/llvm-8/8.0.0/lib/llvm
==> install_name_tool -id /usr/local/Cellar/llvm-8/8.0.0/lib/llvm-8/lib/libLLVM.dylib /usr
==> install_name_tool -id /usr/local/Cellar/llvm-8/8.0.0/lib/llvm-8/lib/libLTO.dylib /usr/
==> install_name_tool -id /usr/local/Cellar/llvm-8/8.0.0/lib/llvm-8/lib/libc++.1.0.dylib /
==> install_name_tool -id /usr/local/Cellar/llvm-8/8.0.0/lib/llvm-8/lib/libclang.dylib /us
==> install_name_tool -id /usr/local/Cellar/llvm-8/8.0.0/lib/llvm-8/lib/libomp.dylib /usr/
==> install_name_tool -id /usr/local/Cellar/llvm-8/8.0.0/lib/llvm-8/lib/libunwind.1.0.dyli
==> Caveats
Extra tools are installed in /usr/local/opt/llvm-8/share/clang-8

To link to libc++, something like the following is required:
  CXX="clang++-8 -stdlib=libc++"
  CXXFLAGS="$CXXFLAGS -nostdinc++ -I/usr/local/opt/llvm-8/lib/llvm-8/include/c++/v1"
  LDFLAGS="$LDFLAGS -L/usr/local/opt/llvm-8/lib/llvm-8/lib"
==> Summary
🍺  /usr/local/Cellar/llvm-8/8.0.0: 5,700 files, 1.6GB, built in 32 minutes 33 seconds
bash-3.2$ sw_vers
sw_vers
ProductName:    Mac OS X
ProductVersion: 10.13.6
BuildVersion:   17G5019
bash-3.2$ xcode-select --print-path
xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
bash-3.2$ xcodebuild -version
xcodebuild -version
Xcode 10.1
Build version 10B61