bat-extras
bat-extras copied to clipboard
Installing via Homebrew on Linux (Fedora 33) fails when building clang-format
Trying to install via Homebrew on Fedora 33:
- Run :
brew install eth-p/software/bat-extras
✖ 1 ❯ brew install eth-p/software/bat-extras
==> Installing bat-extras from eth-p/software
==> Downloading https://github.com/llvm/llvm-project/releases/download/llvmorg-11.1.0/clang-11.1.0.src.tar.xz
Already downloaded: /home/taran/.cache/Homebrew/downloads/0f0654e2d8309e4ba14b521beec1e77ee923109aacf625fe78892534d100ed96--clang-11.1.0.src.tar.xz
==> Downloading https://github.com/llvm/llvm-project/releases/download/llvmorg-11.1.0/llvm-11.1.0.src.tar.xz
Already downloaded: /home/taran/.cache/Homebrew/downloads/d56622798d31d26fc5b8f6eeb967b4dfc6dd7948ce5649af87e5257d378f4823--llvm-11.1.0.src.tar.xz
==> Downloading https://github.com/eth-p/bat-extras/archive/v2020.10.05.tar.gz
Already downloaded: /home/taran/.cache/Homebrew/downloads/d2663ff24a3e7f4cf98fe0e177d1395b6e723f8cbc0f388b7ccb080f1018d0e1--bat-extras-2020.10.05.tar.gz
==> Installing dependencies for eth-p/software/bat-extras: clang-format
==> Installing eth-p/software/bat-extras dependency: clang-format
==> cmake -G Ninja -DLLVM_EXTERNAL_PROJECTS="clang" ..
==> ninja clang-format
Last 15 lines from /home/taran/.cache/Homebrew/Logs/clang-format/02.ninja:
[683/1124] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangOptionDocEmitter.cpp.o
[684/1124] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangDiagnosticsEmitter.cpp.o
FAILED: tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangDiagnosticsEmitter.cpp.o
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/g++-5 -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/utils/TableGen -I../tools/clang/utils/TableGen -I../tools/clang/include -Itools/clang/include -I/home/linuxbrew/.linuxbrew/include/libxml2 -Iinclude -I../include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -DNDEBUG -fno-exceptions -fno-rtti -std=c++14 -MD -MT tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangDiagnosticsEmitter.cpp.o -MF tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangDiagnosticsEmitter.cpp.o.d -o tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangDiagnosticsEmitter.cpp.o -c ../tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
g++-5: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/Homebrew/linuxbrew-core/issues> for instructions.
[685/1124] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/SveEmitter.cpp.o
[686/1124] Linking CXX static library lib/libLLVMAnalysis.a
[687/1124] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/TableGen.cpp.o
[688/1124] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangAttrEmitter.cpp.o
[689/1124] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/NeonEmitter.cpp.o
[690/1124] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/MveEmitter.cpp.o
ninja: build stopped: subcommand failed.
READ THIS: https://docs.brew.sh/Troubleshooting
Will try --without-clang-format, but would be nice to just be able to install the default.
Works when install using --without-clang-format.
That's odd... I haven't experimented using Homebrew on Linux, but from the error you reported, it looks like g++-5 can't compile clang-format.
Will try --without-clang-format, but would be nice to just be able to install the default.
I'm not sure how many people use prettybat on C/C++ files, but I would be open to the idea if not many people use it.
After quickly looking through the Homebrew formula again, I realized that I originally intended the formula to not install clang-format by default. I used :recommended instead of :optional in the formula though, which made it opt-out rather than opt-in.
That should be fixed now.