llvm-test-suite build failure

Hi devs,

I’m able to build llvm/clang following these instructions:

  1. git clone https://github.com/llvm/llvm-project.git

  2. cd llvm-project

  3. mkdir build

  4. cd build

  5. cmake -DLLVM_ENABLE_PROJECTS=clang -G “Unix Makefiles” …/llvm

  6. make

For the test suite, I’m following the directions found here:


and execute the following commands in the same directory where I have cloned lllvm-project:

  1. **git clone [https://github.com/llvm/llvm-test-suite.git](https://github.com/llvm/llvm-test-suite.git) test-suite**
  2. <b>mkdir test-suite-build
  3. **cd test-suite-build**
  4. **cmake -DCMAKE_C_COMPILER=<path to my build of clang>/llvm-project/build/bin/****clang CMAKE_BUILD_TYPE=DEBUG -C../test-suite/cmake/caches/****O3.cmake ../test-suite**
  5. **make**

but it seems to fail at 37% with this error (sorry for any formatting issues):

Scanning dependencies of target retref-bench
[ 37%] Building CXX object MicroBenchmarks/XRay/ReturnReference/CMakeFiles/retref-bench.dir/retref-bench.cc.o
/home/removed/release/test-suite/MicroBenchmarks/XRay/ReturnReference/retref-bench.cc:18:10: fatal error:
      'xray/xray_interface.h' file not found
#include "xray/xray_interface.h"
1 error generated.
make[2]: *** [MicroBenchmarks/XRay/ReturnReference/CMakeFiles/retref-bench.dir/build.make:63: MicroBenchmarks/XRay/ReturnReference/CMakeFiles/retref-bench.dir/retref-bench.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:19890: MicroBenchmarks/XRay/ReturnReference/CMakeFiles/retref-bench.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Any ideas what I may be missing? I haven't been able to turn anything up online. I should note I've also attempted to build both repos from the release 8.x branch as well, and ran into the same error.

Hi Tim, I’m seeing the same error here but haven’t had time to really debug it.

I’ve worked around it by disabling the XRay MicroBenchmark by commenting out line 4 of https://github.com/llvm/llvm-test-suite/blob/master/MicroBenchmarks/CMakeLists.txt . With this change I’m able to complete test-suite runs of the standard directories (SingleSource, MultiSource, MicroBenchmarks)

diff --git a/MicroBenchmarks/CMakeLists.txt b/MicroBenchmarks/CMakeLists.txt
index 77a8e89…897d051 100644
— a/MicroBenchmarks/CMakeLists.txt
+++ b/MicroBenchmarks/CMakeLists.txt
@@ -1,7 +1,7 @@


Thanks Brian. Someone sent me a email saying I missed including the compiler-rt project when I built llvm. I’ve got it built now and running tests and they all finished.

LLVM release 8.x with test-suite release 8.x on a 64 CPU google cloud machine took 954.90s to complete for anyone curious. All 918 tests passed. This was not with ninja, and I assume a debug build of llvm.

Encase you’re using Ubuntu 18.10, you’ll also have to install python-dev, and tcl to have it fire off. You may need tcl-dev, or an older tcl version. I kind of went to town installing those.

Also worth noting is that I had to delete the contents of my test-suite-build folder and re-run it’s cmake file after installing the tcl package.

Thanks everyone.