SUMMARY Krita's SeExpr links to the static LLVM libs (Interpreter, MCJIT, etc) instead of the shared libLLVM.so in [1]. This in turn makes krita itself link statically to the same libs again, which break krita at runtime due to double linking: CommandLine Error: Option 'interpreter-print-volatile' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options Linking against the shared libLLVM library, like upstream seexpr does [2] fixes the problem. [1] https://invent.kde.org/graphics/seexpr/-/blob/master/CMakeLists.txt#L192 [2] https://github.com/wdas/SeExpr/blob/main/CMakeLists.txt#L150
Afaik, seexpr for Krita should be built with the following flags: -DENABLE_LLVM_BACKEND=OFF -DENABLE_SSE4=OFF -DBUILD_DOC=OFF -DBUILD_TESTS=OFF -DBUILD_UTILS=OFF -DUSE_PYTHON=OFF so, that disables llvm and python. Amyspark, is that correct?
This is correct. The SeExpr fork we use in Krita does not involve LLVM at all. In the next point release, I will make it build without LLVM support by default. In any case, I will have a look at this and make sure it works correctly.
FTR, linking against shared LLVM makes it impossible to use in systems that provide only static LLVM (like the Academy Software Foundation's Docker images, which I use for testing my changes in CI). I'm checking if the CMake modules provides any tooling to dynamically detect and use the shared lib if available (otherwise, I'll have to use llvm-config...)