iwyu needs dependency on libclang-common-3.3-dev

Bug #1363322 reported by Bungeman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
iwyu (Ubuntu)
New
Undecided
Unassigned

Bug Description

I installed trusty and then updated my clang to 3.5. Since the various clang packages conflict, this removes the default 3.3 clang. I then installed the iwyu package, which could not find the built-in clang includes.

While the iwyu package claims to depend on any of clang 3.3, 3.4, or 3.5 packages, it appears to be built against clang 3.3 (as the version number of 3.3-4 would lead one to beleive) and appears to have the relative path to the 3.3 include directory compiled in. This means that it requires the libclang-common-3.3-dev package be installed in order to work.

Therefore, it appears that the iwyu3.3-4 package should require the libclang-common-3.3-dev package. I installed this manually (using apt-get). However, this was not enough, as it appears that the package does not create all of the needed links. (see http://anonscm.debian.org/viewvc/pkg-llvm/llvm-toolchain/branches/3.3/debian/libclang-common-3.3-dev.links?view=markup vs http://anonscm.debian.org/viewvc/pkg-llvm/llvm-toolchain/branches/3.4/debian/libclang-common-X.Y-dev.links.in?revision=1273&view=markup ). Specifically, I had to manually create the "/usr/include/clang/3.3/include -> ../../../lib/llvm-3.3/lib/clang/3.3/include" link. It appears this sort of link is created by the 3.4/3.5 package, and iwyu requires the 3.3 version. After creating it, iwyu works well.

An alternative, since iwyu is a clang tool, is to build versions of it for each supported clang release, like most other clang tools. For example, there could be an iwyu3.3, iwyu3.4, and iwyu3.5, each build along with each build of clang.

Revision history for this message
Bungeman (bungeman) wrote :

In my initial comment I stated that

>I had to manually create the "/usr/include/clang/3.3/include -> ../../../lib/llvm-3.3/lib/clang/3.3/include" link.

Actually, I believe that this link actually was created by the libclang-common-3.3-dev package. What I had intended to state was that I had to manually create the "/usr/lib/clang/3.3/include -> ../../llvm-3.3/lib/clang/3.3/include" link. This is the link that should be added to http://anonscm.debian.org/viewvc/pkg-llvm/llvm-toolchain/branches/3.3/debian/libclang-common-3.3-dev.links?view=markup .

Revision history for this message
Bungeman (bungeman) wrote :

Now that I've investigated this and know what's going on, it appears that https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=722132 is an upstream report of the same issue. The solution outlined here (depend on libclang-common-3.3-dev and provide the missing symlink) should resolve both of these reports.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.