clad icon indicating copy to clipboard operation
clad copied to clipboard

Building clad and LLVM from source with "Building from source LLVM, Clang and clad (development environment)" and multiple jobs fails

Open efremale opened this issue 5 years ago • 5 comments

Build commands:

  LAST_KNOWN_GOOD_LLVM=$(wget https://raw.githubusercontent.com/vgvassilev/clad/master/LastKnownGoodLLVMRevision.txt -O - -q --no-check-certificate)
  LAST_KNOWN_GOOD_CLANG=$(wget https://raw.githubusercontent.com/vgvassilev/clad/master/LastKnownGoodClangRevision.txt -O - -q --no-check-certificate)
  git clone https://github.com/llvm-mirror/llvm.git src
  cd src; git checkout $LAST_KNOWN_GOOD_LLVM
  cd tools
  git clone https://github.com/llvm-mirror/clang.git clang
  cd clang ; git checkout $LAST_KNOWN_GOOD_CLANG
  cd ../
  git clone https://github.com/vgvassilev/clad.git clad
  cd ../
  cat patches tools/clad/patches/*.diff | patch -p0
  cd ../
  mkdir obj inst
  cd obj
  cmake -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_INSTALL_PREFIX=../inst ../src/
  make -j16 && make install -j16

Error:

In file included from ./src/tools/clad/../clang/include/clang/Basic/Diagnostic.h:18:
./src/tools/clad/../clang/include/clang/Basic/DiagnosticIDs.h:54:10: fatal error: 
'clang/Basic/DiagnosticCommonKinds.inc' file not found
#include "clang/Basic/DiagnosticCommonKinds.inc"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

efremale avatar Jun 26 '19 20:06 efremale

Bit of googling gave me this http://lists.llvm.org/pipermail/llvm-bugs/2011-October/020626.html.

schwarzschild-radius avatar Jun 30 '19 09:06 schwarzschild-radius

Indeed, we are missing some dependency I suspect between intrinsic_gen and clad. Running make clang && make clad should work around the problem.

vgvassilev avatar Jun 30 '19 09:06 vgvassilev

This issue is solved now, however, I still failed to build all the binaries via make, not entirely sure why but building with cmake --build . built the whole project without any issues. The issue seems to be specific to the LLVM + Clang installation as mentioned here. Not sure if this is specific to my machine but I still thought I'd put it here in case anyone runs through the same issue again!

grimmmyshini avatar Oct 31 '20 15:10 grimmmyshini

Can you tell us your exact setup? You can try LAST_KNOWN_GOOD_CLANG to release_80?

vgvassilev avatar Oct 31 '20 15:10 vgvassilev

Sure!

  • System spec: Ubuntu 18.04 x86_64
  • CMake: 3.10.2
  • GNU Make: 4.1
  • GCC: 9.2.1 LAST_KNOWN_GOOD_CLANG is release_90

Actually, I can build the above just fine using cmake --build . and the demos run just fine too. I can also try building release_80 just to check if this error still persists.

grimmmyshini avatar Oct 31 '20 17:10 grimmmyshini

The build infrastructure has significantly improved and I believe this is not an issue anymore. Please reopen if necessary.

vgvassilev avatar Feb 01 '23 20:02 vgvassilev