Build problems on svn trunk. Autotools. Definition does not match in clang::ento


I had a couple of mysterious build problems on the svn trunk recently
and I'm not smart enough to fix them but I thought I could at least
mention them to someone else. I don't know if the problems are really
bugs or just my poor reading of the build instructions.

I was building with clang and clang++ 3.3 on Fedora 19 x86_64. I don't
remember the revision at this point although it was Sunday 11th August
and must have been on or before r161722.

1. GNU Autotools build.
Whatever I did, I couldn't get this to work. I tried building only
the x86_64 platform and that caused a lot of failures from pieces of
code that obviously expected the other platforms to be there. When I
built with all the platforms I got almost everything to build but
still had errors about the MBlaze platform (obviously llvm not clang)
and then some much more mysterious problems which seemed to be related
to undefined macros that were clang related. I forgot to save the
output from this which is stupid and I'm not greatly eager to repeat
the experience but I certainly will if asked. I don't know if
autotools is supposed to be maintained but if so then it doesn't work
for me.

2. Cmake
With cmake there was eventual success but I had to patch it because I
reached something very hard to understand that related to namespaces.
I don't want to submit a full patch because I don't really understand
the problem and what I did could easily have been incorrect but I
thought that the registration of checkers was not very uniform and
seemed to be happening in the wrong namespaces. It might have been a
clang3.3 bug in the way namespaces are handled - that is the only
reason I can imagine for everyone else being able to build this and
not me.

The kind of error I got was:

Hi Tim,

I ran into the same issue today. I think what’s happening is that you (and I) first did an in-tree autoconf build, then started an out-of-tree cmake build, and manually deleted all the autoconf-generated files that cmake complained about. However, …/llvm-git/tools/clang/lib/StaticAnalyzer/Checkers/ didn’t get deleted (not sure why cmake didn’t warn about that one), so the old autoconf-generated got picked up by clang during the cmake build. The fix which worked for me was to run

rm …/llvm-git/tools/clang/lib/StaticAnalyzer/Checkers/

Nico (in case anyone else ever websearches for this error message)