Bug 1574970
Summary: | iwyu 0.11 (compatible with llvm+clang 7.0) is available | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Xose Vazquez Perez <xose.vazquez> |
Component: | iwyu | Assignee: | Dave Johansen <davejohansen> |
Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | christian.morales.vega, davejohansen, liblit, plroskin, tstellar |
Target Milestone: | --- | Keywords: | FutureFeature |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-04-16 15:49:27 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Xose Vazquez Perez
2018-05-04 12:35:11 UTC
ping! I tried to use it iwyu 0.10 on the current Fedora 28. First it didn't link. I added LLVM at the end of target_link_libraries in CMakeLists.txt. include-what-you-use started complaining: CommandLine Error: Option 'asan-instrument-assembly' registered more than once! I moved LLVM above other LLVM* libraries. Now include-what-you-use is sort of working. But it's reporting a lot of bogus errors, e.g. /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/cstddef:50:10: fatal error: 'stddef.h' file not found And it's not better with libc++: /usr/include/c++/v1/cstddef:44:15: fatal error: 'stddef.h' file not found But most disappointingly, the majority of recommendations are wrong. This works for me: Needed: clang-6.0.1-1.fc28.x86_64 clang-analyzer-6.0.1-1.fc28.noarch clang-devel-6.0.1-1.fc28.x86_64 clang-libs-6.0.1-1.fc28.x86_64 clang-tools-extra-6.0.1-1.fc28.x86_64 lld-6.0.1-1.fc28.x86_64 lld-libs-6.0.1-1.fc28.x86_64 llvm-6.0.1-1.fc28.x86_64 llvm-devel-6.0.1-1.fc28.x86_64 llvm-libs-6.0.1-1.fc28.x86_64 llvm-static-6.0.1-1.fc28.x86_64 git clone -b clang_6.0 https://github.com/include-what-you-use/include-what-you-use.git mkdir build && cd build export CXX=clang++ export CC=clang ln -sf /usr/bin/ld.lld /etc/alternatives/ld # Hack to replace the default linker. To do it right, it should be done in the CMAKE env. cmake -G "Unix Makefiles" -DIWYU_LLVM_LIB_PATH=/usr/lib64/llvm/ -DIWYU_LLVM_INCLUDE_PATH=/usr/include/clang/ ../include-what-you-use/ This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle. Changing version to '29'. 0.11, compatible with clang 7, has been available for two months. Adding Tom Stellard since he was the last person to touch the package and it looks evident that Dave Johansen is not maintaining this package any more. (In reply to Xose Vazquez Perez from comment #3) > This works for me: "works" here includes not getting the "fatal error: 'stddef.h' file not found" messages? (checking C++ sources?) A manual build of iwyu 0.11 (which doesn't use IWYU_LLVM_LIB_PATH or IWYU_LLVM_INCLUDE_PATH any more) complains to me about this. It seems to look for it in /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/stddef.h -> /usr/include/c++/8/stddef.h /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux/stddef.h -> /usr/include/c++/8/x86_64-redhat-linux/stddef.h /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward/stddef.h -> /usr/include/c++/8/backward/stddef.h /usr/local/include/stddef.h /usr/include/stddef.h None of them exists. Instead of in /usr/include/linux/stddef.h, /usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h or /usr/lib64/clang/7.0.1/include/stddef.h. (In reply to Cristian Morales Vega from comment #7) > (In reply to Xose Vazquez Perez from comment #3) > > This works for me: > > "works" here includes not getting the "fatal error: 'stddef.h' file not > found" messages? (checking C++ sources?) > > A manual build of iwyu 0.11 (which doesn't use IWYU_LLVM_LIB_PATH or > IWYU_LLVM_INCLUDE_PATH any more) complains to me about this. > > It seems to look for it in > > /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/stddef.h -> > /usr/include/c++/8/stddef.h > /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat- > linux/stddef.h -> /usr/include/c++/8/x86_64-redhat-linux/stddef.h > /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward/stddef. > h -> /usr/include/c++/8/backward/stddef.h > /usr/local/include/stddef.h > /usr/include/stddef.h > > None of them exists. > > Instead of in /usr/include/linux/stddef.h, > /usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h or > /usr/lib64/clang/7.0.1/include/stddef.h. This works for me, follow all these steps *EXACTLY* : As root user: dnf install clang clang-analyzer clang-devel clang-libs clang-tools-extra lld lld-libs llvm llvm-devel llvm-libs llvm-static ln -sf /usr/bin/ld.lld /etc/alternatives/ld # Hack to replace the default linker. To do it right, it should be done in the CMAKE env. As user: mkdir tmp && cd tmp git clone -b clang_7.0 https://github.com/include-what-you-use/include-what-you-use.git mkdir build && cd build export CXX=clang++ export CC=clang cmake -G "Unix Makefiles" ../include-what-you-use/ make (wait......) ./bin/include-what-you-use --version include-what-you-use 0.11 (git:5658531) based on clang version 7.0.1 (Fedora 7.0.1-1.fc29) as root user: alternatives --auto ld # go back to gnu ld This is the end. This bug appears to have been reported against 'rawhide' during the Fedora 30 development cycle. Changing version to '30. iwyu 0.12 compatible with llvm+clang 8.0, equivalent to the clang_8.0 tag, was released recently. *** This bug has been marked as a duplicate of bug 1642220 *** |