Package Details: include-what-you-use 0.18-1

Git Clone URL: (read-only, click to copy)
Package Base: include-what-you-use
Description: A tool for use with clang to analyze #includes in C and C++ source files
Upstream URL:
Keywords: c c++ format header include iwyu
Licenses: LLVM Release License
Submitter: Mindless
Maintainer: sebschrader (jetm)
Last Packager: jetm
Votes: 32
Popularity: 0.77
First Submitted: 2011-12-03 05:58 (UTC)
Last Updated: 2022-07-10 16:52 (UTC)

Latest Comments

pattop commented on 2022-07-06 01:05 (UTC)

@jetm might I suggest reinstating the pinned and top message?

IMHO it still makes sense to set the out of date flag even if the clang dependency is not yet up to date.

MarsSeed commented on 2022-07-06 01:04 (UTC) (edited on 2022-07-06 01:05 (UTC) by MarsSeed)

There is no pinned message and has not been such at least since I first saw this package a few months ago.

jetm commented on 2022-07-06 00:56 (UTC)

@pattop v18 depends on clang v14, and Arch Linux recently upgraded it. The out-of-date flag was wrong because the submitter didn't know about that requirement. In this package, the out-of-date flag is constantly submitted because the submitters don't know the iwyu versions have a solid dependency on specific clang versions. The latter takes time to update in Arch Linux. I stopped removing the out-of-date flag because they continue doing it, even with a pinned and top message.

pattop commented on 2022-07-06 00:09 (UTC)

@jetm it was flagged out of date almost 3 months ago by @MarsSeed as v0.18 was released. That's why I submitted an orphan request.

jetm commented on 2022-07-06 00:00 (UTC) (edited on 2022-07-06 00:05 (UTC) by jetm)

@pattop clang was updated very recently to v14 in Arch Linux. This package is not an orphan. I will update it this week.

pattop commented on 2022-07-05 22:35 (UTC)

This was flagged out of date on the 9th of April (~3 months ago) and the current maintainer has not updated it. I've submitted an orphan request.

zorbik26 commented on 2022-07-05 20:52 (UTC)

Diff for support with clang v14.0

diff --git a/PKGBUILD b/PKGBUILD
index 057ae3c..9226518 100644
@@ -2,16 +2,16 @@
 # Old Maintainer: Manuel Mendez <>

 pkgdesc="A tool for use with clang to analyze #includes in C and C++ source files"
 license=('LLVM Release License')
 _max=$((_clang_major + 1)).0

carlosal1015 commented on 2022-07-05 16:31 (UTC)

Patch is not required now for clang 14.0.6.

qark commented on 2022-07-04 15:22 (UTC) (edited on 2022-07-04 15:34 (UTC) by qark)

Patch for 0.18 with mentioned simplification: Upd. fixed tabs in patch.

jhossbach commented on 2022-07-04 15:17 (UTC)

Same question @sebschrader: would you mind updating the version? Currently, this leads to a dependency conflict with the newest arch repo version of clang (v14.0.6-1).

kernelisstrong commented on 2022-07-03 12:25 (UTC)

The official clang package has been bumped to version 14. Can you update to 0.18v?

qark commented on 2022-07-02 20:38 (UTC)

May I suggest simplifying PKGBUILD by using -B build, -DCMAKE_INSTALL_PREFIX=/usr and calling cmake --build and cmake --install instead of hardcoded ninja counterparts? See

jetm commented on 2021-11-14 17:05 (UTC) (edited on 2021-12-06 20:26 (UTC) by jetm)

iwyu 0.17 is released for Clang v13, but I am getting a build error:

make: make: Permission denied
make: *** [Makefile:146: all] Error 127

I did open a case in upstream:

Edit: Package updated. As a workaround, I changed CMake to generate Ninja. Maybe is a CMake bug

Leon0402 commented on 2021-11-14 16:26 (UTC)

Clang 13 is out

Nestor_013 commented on 2021-06-10 11:41 (UTC) (edited on 2021-06-10 11:54 (UTC) by Nestor_013)

For the impatient ones...

diff --git a/PKGBUILD b/PKGBUILD
index 862a5c9..e927299 100644
@@ -1,16 +1,16 @@
 # Maintainer: Manuel Mendez <>

 pkgdesc="A tool for use with clang to analyze #includes in C and C++ source files"
 license=('LLVM Release License')

kernelisstrong commented on 2021-06-07 10:59 (UTC)

Wait for the maintainer to bump the clang dependency.

skunk commented on 2020-11-16 18:53 (UTC)

I was able to build the tool with the latest master and clang 11 as suggested here with this PKGBUILD by just bumping the _max to _clang_major+2.

ruy16109 commented on 2020-04-25 18:52 (UTC)

Clang 10 is out, so this package is now out of date. Hopefully the maintainer updates the package soon.

afontenot commented on 2020-03-29 11:54 (UTC)

Checking the git history, the Python 2 requirement has been baked in since the initial commit. As best I can determine, the iwyu codebase has since been updated and is expected to be entirely Python 3 clean.

Could you try removing the sed lines and python2 dependency from this PKGBUILD and see if everything just works for you? (I built it myself and it seems fine.) We can report any problems we find with the Python 3 support upstream.

woowapdabug commented on 2019-10-21 16:32 (UTC)

Looking forward for the update, thank you :)

jetm commented on 2019-10-12 03:16 (UTC) (edited on 2020-11-16 18:57 (UTC) by jetm)

Clang v11 is out, but the project upstream is not updated yet. I will update after upstream project update. See:

jetm commented on 2019-07-26 13:54 (UTC)

@a216: Done. Thanks!

a216 commented on 2019-07-26 13:52 (UTC)

This project doesn't seem to show up in a search for "iwyu" - could this term be added as a keyword?

jetm commented on 2019-04-02 14:07 (UTC)

@Aetf: Clang v8 is out, but project upstream is not updated yet. I will update after upstream project update. Removing flag.

Aetf commented on 2019-03-31 19:08 (UTC)

Clang v8 is out...

jmarch commented on 2018-10-17 15:41 (UTC)

Please update to use the most recent clang v7.

Arvedui commented on 2018-08-29 07:46 (UTC) (edited on 2018-08-29 07:47 (UTC) by Arvedui)

And please replace patch -Np1 -i "../../fix-clang-6.patch" with patch -Np1 -i "${srcdir}/fix-clang-6.patch" as you can not rely on a relative position for source files.

selmf commented on 2018-07-01 20:34 (UTC)

The PKGBUILD is currently broken. Please add fix-clang-6.patch to the sources list to fix it.

pseyfert commented on 2018-05-29 17:18 (UTC)

@Parkotron Ran into the same error building by hand from github (tag clang_6.0). Cherry-picking more commits from master solves the issue. I suspect it's due to See also

Parkotron commented on 2018-05-15 18:24 (UTC)

I just attempted to modify the PKGBUILD for the recently released v0.10 (the Clang 6.0 version). After just changing the versions and hashes, everything build and installed without issue. Unfortunately, the tool fails to run, yielding

LLVM ERROR: inconsistency in registered CommandLine options
: CommandLine Error: Option 'asan-instrument-assembly' registered more than once!

Apparently this is due to linking against LLVM both statically and dynamically, but at this point I'm in over my head. Hopefully smarter folks will to take a look at packaging 0.10 soon.

spider-mario commented on 2018-04-29 21:06 (UTC) (edited on 2018-04-29 21:07 (UTC) by spider-mario)

It seems that the PKGBUILD could use clang50/llvm50 now that the repo packages are 6.0. Quick and dirty patch that does not use $_clang_major/$_clang_minor:

sebschrader commented on 2018-02-24 00:34 (UTC)

I had to change line 31 that reads

Sorry, I dropped thank chunk during a git rebase.

Tristero commented on 2018-02-23 16:34 (UTC)

I had to change line 31 that reads

cd $srcdir/$pkgname/build


cd "$srcdir/$pkgname-clang_${_clang_ver}/"build

then package() worked

sebschrader commented on 2018-02-22 21:21 (UTC)

Upstream didn't post a release on their website but a release on GitHub.

See this GitHub issue:

marmistrz commented on 2017-07-06 10:01 (UTC)

@mmlb, and the very issue says that: > In the meantime, I've been using current master with llvm 4.0 and it "seems" to be working ;) Isn't it just the problem with the prebuilt binaries?

mmlb commented on 2017-04-24 21:41 (UTC)

@johnchen902, iwyu is very much tied to a specific version of clang/llvm. You can track llvm 4.0 release status here

johnchen902 commented on 2017-04-21 03:39 (UTC)

Current clang version is 4.0.0-1

tegularius commented on 2016-09-06 21:21 (UTC)

makedepends should include cmake

mmlb commented on 2015-12-28 05:05 (UTC)

@Svenstaro that was by design since the previous version of IWYU is incompatible with 3.7. I just updated to latest released version that works with 3.7.

Svenstaro commented on 2015-09-29 05:42 (UTC)

This conflicts with llvm 3.7.0 in Arch because 3.7 is < 3.7.0.

mmlb commented on 2015-07-23 13:47 (UTC)

@nerzhul, fixed thanks!

nerzhul commented on 2015-07-21 10:08 (UTC)

Please add llvm as a dependancy to fix erikw error

mmlb commented on 2015-06-01 15:31 (UTC)

@erikw I've updated the package

mmlb commented on 2015-05-25 01:14 (UTC)

erikw are you using clang 3.6? That's not out yet, see In the meantime, maybe I should change the PKGBUILD to depend on the exact version of clang.

erikw commented on 2015-05-24 09:26 (UTC)

Compilation errors: [ 7%] Building CXX object CMakeFiles/include-what-you-use.dir/ In file included from /tmp/yaourt-tmp-erikw/aur-include-what-you-use/src/include-what-you-use/ In file included from /tmp/yaourt-tmp-erikw/aur-include-what-you-use/src/include-what-you-use/iwyu_ast_util.h:19: /tmp/yaourt-tmp-erikw/aur-include-what-you-use/src/include-what-you-use/port.h:16:10: fatal error: 'llvm/Support/Compiler.h' file not found #include "llvm/Support/Compiler.h"

mmlb commented on 2014-12-30 16:27 (UTC)

@xantares, did you take a look at the second script offered? The one that uses the compile_commands.json output? I could still throw in your adaptation, but if the python script works for you that would be a better option than continually hacking cmake "compilers".

xantares commented on 2014-12-29 13:38 (UTC)

hello, iwyu cannot be used in a cmake project:!topic/include-what-you-use/N6441qSN9Og i adapted the wrapper script proposed as solution, could you include it ? then in the install section add this: # install wrapper for cmake usage # from!topic/include-what-you-use/N6441qSN9Og install -m755 "$srcdir"/iwyu-wrapper "$pkgdir"/usr/bin/iwyu-clang install -m755 "$srcdir"/iwyu-wrapper "$pkgdir"/usr/bin/iwyu-clang++ xan.

mmlb commented on 2014-09-05 18:15 (UTC)

@bchretien, thanks for the info its updated.

bchretien commented on 2014-08-29 11:39 (UTC)

This can be updated to 3.4:

dom0 commented on 2014-05-05 20:47 (UTC)

makedepends should include cmake

hauptmech commented on 2014-04-26 08:51 (UTC)

Updated to clang 3.4

christoph.gysin commented on 2012-10-24 15:53 (UTC)

@sseering: check

Mindless commented on 2012-06-02 03:53 (UTC)

"Include what you use makes heavy use of clang internals, and occasionally break when clang is updated." -- I wouldn't count on it unless they update it to match; I haven't tried it though, so you'd have to give it a try to know.

sseering commented on 2012-06-02 03:47 (UTC)

Is there any was to nake this work with the current clang version?