Closed nolange closed 6 months ago
Fails to build on debian bookworm
The build to succeed
Unpack cling to /tmp/cling-1.0
Prepare a debian bookworm environment or use podman/docker
podman run --rm -it -v /tmp/cling-1.0:/host debian:bookworm
apt update apt install llvm-13-dev libclang-13-dev libzstd-dev zlib1g-dev build-essential ninja-build cmake
Configure and build
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_CONFIG=/usr/bin/llvm-config-13 -S /host -B /tmp/build cd /tmp/build ninja
just use the Cling 1.0 release tar & debian bookworm
Hi @nolange, cling ships with a patched version of llvm. Please take a look at the readme file.
I wasnt aware of that.
Describe the bug
Fails to build on debian bookworm
Expected behavior
The build to succeed
To Reproduce
Unpack cling to /tmp/cling-1.0
Prepare a debian bookworm environment or use podman/docker
Configure and build
Setup
just use the Cling 1.0 release tar & debian bookworm
Build log
Compiler output for failed files
``` [1/23] Building CXX object lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/AutoloadCallback.cpp.o FAILED: lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/AutoloadCallback.cpp.o /usr/bin/c++ -DCLING_VERSION=1.0 -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/tmp/build/lib/Interpreter -I/host/lib/Interpreter -I/host/include -I/tmp/build/include -isystem /usr/lib/llvm-13/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -Wno-nested-anon-types -Wno-covered-switch-default -Wno-unused-local-typedef -fno-rtti -O2 -g -DNDEBUG -fvisibility=default -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -MD -MT lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/AutoloadCallback.cpp.o -MF lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/AutoloadCallback.cpp.o.d -o lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/AutoloadCallback.cpp.o -c /host/lib/Interpreter/AutoloadCallback.cpp /host/lib/Interpreter/AutoloadCallback.cpp: In lambda function: /host/lib/Interpreter/AutoloadCallback.cpp:123:47: error: no matching function for call to 'clang::Preprocessor::LookupFile(clang::SourceLocation&, llvm::StringRef&, bool&, const clang::DirectoryLookup*&, const clang::FileEntry*&, const clang::DirectoryLookup*&, int, int, int, int, std::nullptr_t, bool, bool, bool)' 123 | else if (auto FERef = m_PP->LookupFile(fileNameLoc, FileName, isAngled, | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 124 | FromDir, FromFile, CurDir, | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 125 | /*SearchPath*/0, /*RelativePath*/ 0, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 126 | /*suggestedModule*/0, /*IsMapped*/0, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 127 | /*IsFrameworkFound*/ nullptr, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 128 | /*SkipCache*/ false, | ~~~~~~~~~~~~~~~~~~~~ 129 | /*OpenFile*/ false, | ~~~~~~~~~~~~~~~~~~~ 130 | /*CacheFail*/ true)) { | ~~~~~~~~~~~~~~~~~~~ In file included from /host/lib/Interpreter/AutoloadCallback.cpp:20: /usr/lib/llvm-13/include/clang/Lex/Preprocessor.h:2015:3: note: candidate: 'llvm::Optional