Created attachment 200545 [details] iwyu.patch - clang_7.0 tag - uses LLVM's CMake files now - https URL
This fails to build for me with poudriere/12.0-p2 the following error: CMake Error at /usr/local/llvm70/lib/cmake/clang/ClangTargets.cmake:535 (message): The imported target "clangDoc" references the file "/usr/local/llvm70/lib/libclangDoc.a" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/local/llvm70/lib/cmake/clang/ClangTargets.cmake" but not all the files it references. Call Stack (most recent call first): /usr/local/llvm70/lib/cmake/clang/ClangConfig.cmake:18 (include) CMakeLists.txt:16 (find_package) -- Configuring incomplete, errors occurred! I note that IWYU mentions changes to the cmake build system in the 0.11 notes: This leads to the following pull request: https://github.com/include-what-you-use/include-what-you-use/pull/542 In the following commit in that PR, the docs now mention using a CMAKE_PREFIX_PATH variable for 0.11 and later: https://github.com/include-what-you-use/include-what-you-use/pull/542/commits/bb980c7e44346c473f20c07f70edbf51610f70ae @Greg What references were used to modify the ports CMAKE_ARGS to use LLVM_DIR and Clang_DIR? Need to investigate further
(In reply to Kubilay Kocak from comment #1) Well, these dirs are where the .cmake config files are, and you can see that it found them: > contained > "/usr/local/llvm70/lib/cmake/clang/ClangTargets.cmake" Looking at the pkg-plist for LLVM70, libclangDoc.a is marked with %%DOCS%%: https://github.com/freebsd/freebsd-ports/blob/master/devel/llvm70/pkg-plist That looks like a mistake, DOCS is for, well, docs — not docs-related libraries.
So, that library actually belongs to %%EXTRAS%%: https://reviews.freebsd.org/D19068
A commit references this bug: Author: koobs Date: Tue Apr 23 05:29:46 UTC 2019 New revision: 499716 URL: https://svnweb.freebsd.org/changeset/ports/499716 Log: devel/include-what-you-use: Update to 0.11 PR: 234429 Submitted by: Greg V <greg unrelenting.technology> Changes: head/devel/include-what-you-use/Makefile head/devel/include-what-you-use/distinfo head/devel/include-what-you-use/pkg-descr head/devel/include-what-you-use/pkg-plist
Committed, thank you Greg!