Bug ID: 1086444 Summary: Clang package misses some CMake targets Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Development Assignee: email@example.com Reporter: firstname.lastname@example.org QA Contact: email@example.com Found By: --- Blocker: ---
# Observation Using Clang's libraries via CMake config files provided by `clang5-devel` leads to configuration errors.
``` find_package(Clang REQUIRED) target_link_libraries(some_target PRIVATE clangTooling clangFrontend clangAST clangLex clangSema clangBasic LLVM) ```
``` CMake Error at generator/CMakeLists.txt:50 (find_package): Found package configuration file:
but it set Clang_FOUND to FALSE so package "Clang" is considered to be NOT FOUND. Reason given by package:
The following imported targets are referenced, but are missing: clangBasic clangCodeGen clangDriver clangFrontend clangFrontendTool ```
# Expected behavior Of course not configuration error should occur the the target links against the library correctly.
# Further details Apparently the concerning libraries are there: ``` pm -ql clang5-devel | grep 'clangBasic' /usr/lib64/libclangBasic.so
rpm -ql clang5-devel | grep 'clangTooling' /usr/lib64/libclangTooling.so /usr/lib64/libclangToolingCore.so /usr/lib64/libclangToolingRefactor.so ```
So it is just the imported target in the Clang configuration files which is missing.
Note that the Arch Linux package is working fine so it might be helpful as a reference: https://www.archlinux.org/packages/testing/x86_64/clang
BTW: Arch Linux is using static libraries for LLVM/Clang 5 but they also switched to dynamic libraries for LLVM/Clang 6. Their clang 6.0.0 package which is currently in their staging repo works fine as well. So the use of dynamic libs in Tumbleweed is likely not making the difference here.
I think the concerning Tumbleweed spec file is https://build.opensuse.org/package/show/devel:tools:compiler/llvm. I have been trying to investigate the issue myself a little bit, but don't know why the targets are missing so far.
Thanks for your help in advance!
Marius Kittler firstname.lastname@example.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #1 from Marius Kittler email@example.com --- This is fixed now, eg. https://build.opensuse.org/package/show/home:mkittler/reflective-rapidjson builds now for Tumbleweed.