Unable to compile cling

Hello folks. I would like to use cling as an embedded C++ interpreter for my application, but I can’t get it to build. During the configuration step I get this error:

1>-- Performing Test HAVE_GNU_POSIX_REGEX – failed to compile
1>-- Performing Test HAVE_POSIX_REGEX – failed to compile
1>CMake Warning at utils/benchmark/CMakeLists.txt:244 (message):
1> Using std::regex with exceptions disabled is not fully supported

Then while building ClangAttrParsedAttrList:

7>Building AttrParsedAttrList.inc…
7>clang-tblgen.exe: Unknown command line argument ‘-gen-clang-attr-parsed-attr-list’. Try: ‘…\Debug\bin\clang-tblgen.exe --help’
7>clang-tblgen.exe: Did you mean ’ --debug-buffer-size’?
7>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for ‘D:\builds\cling\CMakeFiles\82d63c831004a1b8cbec9455f0feae94\AttrParsedAttrList.inc.rule;D:\builds\cling\CMakeFiles\35e5560b0619fc100a4ab449dbfb22a0\ClangAttrParsedAttrList.rule’ exited with code 1.

and a lot of other similar errors, then this error appears a lot:

71>D:\git\cling\src\include\llvm/IR/Attributes.h(73,14): fatal error C1083: Cannot open include file: ‘llvm/IR/Attributes.inc’: No such file or directory (compiling source file D:\git\cling\src\lib\Analysis\PhiValues.cpp)

The full build output is here: gist:6e049ab11cca8cde75b722101befa2be · GitHub

Any ideas?

@Axel can surely help.

Sorry for the delay. What does D:\git\cling\Debug\bin\clang-tblgen.exe --help show? (Or wherever that clang-tblgen.exe is that’s called ..\..\..\..\..\Debug\bin\clang-tblgen.exe

I don’t care about the help, but I want to make sure it’s the binary (and thus the help output) I expect it to be.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.