Homebrew/linuxbrew-core

llvm fails to build on Linux Mint 18.3 Sylvia

yermulnik opened this issue · 4 comments

brew gist-logs <formula> link OR brew config AND brew doctor output

* `brew gist-logs llvm`: https://gist.github.com/yermulnik/e297f1d817fd68ee5ac19145f911ef00
* `brew upgrade llvm`: https://gist.github.com/yermulnik/85f88488cefe600c4a00333295e7465a

  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?

brew update && brew upgrade to install all pending updates which included llvm package.
build failed and output had no details hence I was not able to identify what caused the failure.

What happened (include all command output)?

> brew upgrade llvm
==> Upgrading 1 outdated package:
llvm 11.1.0_3 -> 12.0.0
==> Upgrading llvm 11.1.0_3 -> 12.0.0 
==> Downloading https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0/llvm-project-12.0.0.src.tar.xz
Already downloaded: /home/yz/.cache/Homebrew/downloads/4c560dd0f8f42d75ce11beba52750913a9adc3c69541e8f3498394d34361c33c--llvm-project-12.0.0.src.tar.xz
==> cmake -G Unix Makefiles .. -DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;lld;lldb;openmp;polly;mlir -DLLVM_ENABLE_RUNTIMES=compiler-rt;libunwind;libcxxabi -DLLVM_POLLY_LINK_INTO_TOOLS=ON -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_FFI=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INSTALL_UTILS=ON -DLLVM_ENABLE_Z3_SOLVER=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DLLDB_USE_SYSTEM_DEBUGSERVER=ON -DLLDB_ENABLE_PYTHON=ON -DLLDB_ENABLE_LUA=OFF -DLLDB_ENABLE_LZMA=ON -DLLDB_PYTHON_RELATIVE_PATH=libexec/python3.9/site-packages -DLIBOMP_INSTALL_ALIASES=OFF -DCLANG_PYTHON_BINDINGS_VERSIONS=3.9 -DFFI_INCLUDE_DIR=/home/linuxbrew/.linuxbrew/opt/libffi/include -DFFI_LIBRARY_DIR=/home/linuxbrew/.linuxbrew/opt/libffi/lib -DLLVM_ENABLE_LIBCXX=OFF -DLLVM_CREATE_XCODE_TOOLCHAIN=OFF -DCLANG_DEFAULT_CXX_STDLIB=libstdc++ -DLLVM_BINUTILS_INCDIR=/home/linuxbrew/.linuxbrew/opt/binutils/include
==> cmake --build .
Last 15 lines from /home/yz/.cache/Homebrew/Logs/llvm/02.cmake:
[  2%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/X86FoldTablesEmitter.cpp.o
cd /tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build/utils/TableGen && /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/g++-5 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build/utils/TableGen -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/utils/TableGen -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build/include -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -ffunction-sections -fdata-sections -DNDEBUG -std=c++14 -MD -MT utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/X86FoldTablesEmitter.cpp.o -MF CMakeFiles/obj.llvm-tblgen.dir/X86FoldTablesEmitter.cpp.o.d -o CMakeFiles/obj.llvm-tblgen.dir/X86FoldTablesEmitter.cpp.o -c /tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/utils/TableGen/X86FoldTablesEmitter.cpp
[  2%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/X86ModRMFilters.cpp.o
cd /tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build/utils/TableGen && /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/g++-5 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build/utils/TableGen -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/utils/TableGen -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build/include -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -ffunction-sections -fdata-sections -DNDEBUG -std=c++14 -MD -MT utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/X86ModRMFilters.cpp.o -MF CMakeFiles/obj.llvm-tblgen.dir/X86ModRMFilters.cpp.o.d -o CMakeFiles/obj.llvm-tblgen.dir/X86ModRMFilters.cpp.o -c /tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/utils/TableGen/X86ModRMFilters.cpp
[  2%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/X86RecognizableInstr.cpp.o
cd /tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build/utils/TableGen && /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/g++-5 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build/utils/TableGen -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/utils/TableGen -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build/include -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -ffunction-sections -fdata-sections -DNDEBUG -std=c++14 -MD -MT utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/X86RecognizableInstr.cpp.o -MF CMakeFiles/obj.llvm-tblgen.dir/X86RecognizableInstr.cpp.o.d -o CMakeFiles/obj.llvm-tblgen.dir/X86RecognizableInstr.cpp.o -c /tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/utils/TableGen/X86RecognizableInstr.cpp
[  2%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/WebAssemblyDisassemblerEmitter.cpp.o
cd /tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build/utils/TableGen && /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/g++-5 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build/utils/TableGen -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/utils/TableGen -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build/include -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -ffunction-sections -fdata-sections -DNDEBUG -std=c++14 -MD -MT utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/WebAssemblyDisassemblerEmitter.cpp.o -MF CMakeFiles/obj.llvm-tblgen.dir/WebAssemblyDisassemblerEmitter.cpp.o.d -o CMakeFiles/obj.llvm-tblgen.dir/WebAssemblyDisassemblerEmitter.cpp.o -c /tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/utils/TableGen/WebAssemblyDisassemblerEmitter.cpp
[  2%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/CTagsEmitter.cpp.o
cd /tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build/utils/TableGen && /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/g++-5 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build/utils/TableGen -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/utils/TableGen -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build/include -I/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -ffunction-sections -fdata-sections -DNDEBUG -std=c++14 -MD -MT utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/CTagsEmitter.cpp.o -MF CMakeFiles/obj.llvm-tblgen.dir/CTagsEmitter.cpp.o.d -o CMakeFiles/obj.llvm-tblgen.dir/CTagsEmitter.cpp.o -c /tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/utils/TableGen/CTagsEmitter.cpp
make[2]: Leaving directory '/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build'
[  2%] Built target obj.llvm-tblgen
make[1]: Leaving directory '/tmp/llvm-20210420-15816-mzgjd3/llvm-project-12.0.0.src/llvm/build'
Makefile:158: recipe for target 'all' failed
make: *** [all] Error 2

READ THIS: https://docs.brew.sh/Troubleshooting

These open issues may also help:
llvm: Fix for Linux https://github.com/Homebrew/linuxbrew-core/pull/23059
llvm@11: Fix for Linux https://github.com/Homebrew/linuxbrew-core/pull/23058
john-jumbo: build with llvm https://github.com/Homebrew/linuxbrew-core/pull/23001

What did you expect to happen?

homebrew to upgrade llvm to latest

Step-by-step reproduction instructions (by running brew commands)

brew update && brew upgrade llvm

Fix is incoming in #23059, you'll have to wait for that build to finish. Sorry for the annoyance.

Gotcha. Thanks.
Saw that issue but output from my brew upgrade llvm command didn't have that exact error and I thought it might be something else.

The error might be different, as it's a parallel build, it depends which file is compiled first. And other things might come into play. We are working on a solution to avoid these situations, but it will take a few more months before we can build linux packages BEFORE they are pushed to our users.

Thanks for explanation.