This gets the build going, but then it eventually seems to fail with: ******************** Failing Tests (2): LLVM-Unit :: ADT/Release/ADTTests/APIntTest.LargeAPIntConstruction LLVM-Unit :: ADT/Release/ADTTests/APIntTest.nearestLogBase2
Details on the fails I see (with both 16.10 and sid): FAIL: LLVM-Unit :: ADT/Release/ADTTests/APIntTest.LargeAPIntConstruction (11248 of 12318) ******************** TEST 'LLVM-Unit :: ADT/Release/ADTTests/APIntTest.LargeAPIntConstruction' FAILED ******************** Note: Google Test filter = APIntTest.LargeAPIntConstruction [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from APIntTest [ RUN ] APIntTest.LargeAPIntConstruction terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc 0 libLLVM-3.6.so.1 0x00007f65fa969b22 llvm::sys::PrintStackTrace(_IO_FILE*) + 50 1 libLLVM-3.6.so.1 0x00007f65fa968251 2 libpthread.so.0 0x00007f65f9b09670 3 libc.so.6 0x00007f65f91c77ef gsignal + 159 4 libc.so.6 0x00007f65f91c93ea abort + 362 5 libstdc++.so.6 0x00007f65f980158d __gnu_cxx::__verbose_terminate_handler() + 365 6 libstdc++.so.6 0x00007f65f97ff336 7 libstdc++.so.6 0x00007f65f97ff381 8 libstdc++.so.6 0x00007f65f97ff599 9 libstdc++.so.6 0x00007f65f97ffb5c 10 libLLVM-3.6.so.1 0x00007f65fa92e9b8 llvm::APInt::initSlowCase(unsigned int, unsigned long, bool) + 40 11 ADTTests 0x0000563e2728033a 12 ADTTests 0x0000563e2741ba3a testing::Test::Run() + 186 13 ADTTests 0x0000563e2741bb80 testing::TestInfo::Run() + 272 14 ADTTests 0x0000563e2741bc45 testing::TestCase::Run() + 165 15 ADTTests 0x0000563e2741f897 testing::internal::UnitTestImpl::RunAllTests() + 583 16 ADTTests 0x0000563e2741fb82 testing::UnitTest::Run() + 34 17 ADTTests 0x0000563e27243c56 main + 70 18 libc.so.6 0x00007f65f91b23f1 __libc_start_main + 241 19 ADTTests 0x0000563e27243cba _start + 42 ******************** FAIL: LLVM-Unit :: ADT/Release/ADTTests/APIntTest.nearestLogBase2 (11269 of 12318) ******************** TEST 'LLVM-Unit :: ADT/Release/ADTTests/APIntTest.nearestLogBase2' FAILED ******************** Note: Google Test filter = APIntTest.nearestLogBase2 [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from APIntTest [ RUN ] APIntTest.nearestLogBase2 terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc 0 libLLVM-3.6.so.1 0x00007f71055cab22 llvm::sys::PrintStackTrace(_IO_FILE*) + 50 1 libLLVM-3.6.so.1 0x00007f71055c9251 2 libpthread.so.0 0x00007f710476a670 3 libc.so.6 0x00007f7103e287ef gsignal + 159 4 libc.so.6 0x00007f7103e2a3ea abort + 362 5 libstdc++.so.6 0x00007f710446258d __gnu_cxx::__verbose_terminate_handler() + 365 6 libstdc++.so.6 0x00007f7104460336 7 libstdc++.so.6 0x00007f7104460381 8 libstdc++.so.6 0x00007f7104460599 9 libstdc++.so.6 0x00007f7104460b5c 10 libLLVM-3.6.so.1 0x00007f710558f9b8 llvm::APInt::initSlowCase(unsigned int, unsigned long, bool) + 40 11 ADTTests 0x000056207be123f8 12 ADTTests 0x000056207bfa7a3a testing::Test::Run() + 186 13 ADTTests 0x000056207bfa7b80 testing::TestInfo::Run() + 272 14 ADTTests 0x000056207bfa7c45 testing::TestCase::Run() + 165 15 ADTTests 0x000056207bfab897 testing::internal::UnitTestImpl::RunAllTests() + 583 16 ADTTests 0x000056207bfabb82 testing::UnitTest::Run() + 34 17 ADTTests 0x000056207bdcfc56 main + 70 18 libc.so.6 0x00007f7103e133f1 __libc_start_main + 241 19 ADTTests 0x000056207bdcfcba _start + 42 ******************** The patch I applied is: diff -Nru llvm-toolchain-3.6-3.6.2/debian/rules llvm-toolchain-3.6-3.6.2/debian/rules --- llvm-toolchain-3.6-3.6.2/debian/rules 2015-10-20 09:40:08.000000000 -0700 +++ llvm-toolchain-3.6-3.6.2/debian/rules 2016-09-26 16:38:48.000000000 -0700 @@ -3,9 +3,10 @@ TARGET_BUILD := build-llvm DEB_INST := $(CURDIR)/debian/tmp/ #GCC_VERSION := 4.8 -# The 5| in the regexp is a crappy workaround. g++ 5.2 in Debian is not providing a g++-5.2 binary (only g++-5) -# accomodate that by hardcoding the 5 detection -GCC_VERSION := $(shell dpkg-query -W -f '$${Version}' g++ | sed -rne 's,^([0-9]+:)?(5|[0-9]+\.[0-9]+|[0-9]+).*$$,\2,p') +# The 5|6 in the regexp is a crappy workaround. g++ 5.2 in Debian is not +# providing a g++-5.2 binary (only g++-5). Similar for g++ 6.x +# accomodate that by hardcoding the 5/6 detection +GCC_VERSION := $(shell dpkg-query -W -f '$${Version}' g++ | sed -rne 's,^([0-9]+:)?(5|6|[0-9]+\.[0-9]+|[0-9]+).*$$,\2,p') LLVM_VERSION := 3.6 LLVM_VERSION_FULL := $(LLVM_VERSION).2 SONAME_EXT := 1 Thanks, Nish