Latest upstream release: 0.10 Current version/release in rawhide: 0.9-0.1.20171001git576e80f URL: https://include-what-you-use.org/ Changelog: * 30 April 2018 iwyu 0.10 compatible with llvm+clang 6.0 is released. Major changes: Add --no_fwd_decls option to avoid replacing includes with forward-declarations Treat definitions of free functions as uses of the corresponding prototypes Support C++11 range-for loops Several template misattribution bugs fixed Better support for non-ASCII encodings in fix_includes.py Remove support for VCS commands from fix_includes.py * 11 March 2018 iwyu 0.9 compatible with llvm+clang 5.0 is released. Major changes: Improve handling of template arguments Improve support of JSON compilation databases (arguments field) Improve support for function pointers to templates Allow IWYU pragma: keep on forward declarations Fix a few crash scenarios on C++11 using-declarations iwyu_tool.py now supports parallel execution
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 ***