Bug ID | 1120098 |
---|---|
Summary | Clang 7 packaging is inconsistent |
Classification | openSUSE |
Product | openSUSE Tumbleweed |
Version | Current |
Hardware | Other |
OS | Other |
Status | NEW |
Severity | Normal |
Priority | P5 - None |
Component | Development |
Assignee | bnc-team-screening@forge.provo.novell.com |
Reporter | aaronpuchert@alice-dsl.net |
QA Contact | qa-bugs@suse.de |
Found By | --- |
Blocker | --- |
In llvm7.spec, the Clang binaries are renamed: # Fix the clang -> clang-X.Y symlink to work with update-alternatives mv %{buildroot}%{_bindir}/clang-%{_sonum} %{buildroot}%{_bindir}/clang ln -s %{_bindir}/clang-%{_relver} %{buildroot}%{_bindir}/clang-%{_minor} but the installed CMake files (in /usr/lib64/cmake/clang/) aren't changed accordingly. This makes it hard to build software that uses libclang. (I came across this when trying to update include-what-you-use.) The issue is easy to reproduce. Just create a folder with a CMakeLists.txt having just this line: find_package(Clang CONFIG REQUIRED) Then run "cmake ." and there will be an error message like CMake Error at /usr/lib64/cmake/clang/ClangTargets.cmake:296 (message): The imported target "clang" references the file "/usr/bin/clang-7" but this file does not exist. Possible reasons include: [...] Indeed, we have * /usr/bin/clang -> /etc/alternatives/clang -> /usr/bin/clang-7.0.0 * /usr/bin/clang-7.0 -> /usr/bin/clang-7.0.0 but no /usr/bin/clang-7. That is a bit unusual. On the other hand for gcc, we have * /usr/bin/gcc -> /usr/bin/gcc-8