Classapi with a Little Treehydra on the Side
After building what I thought was (and now am only unsure is) a successful static analysis build of Mozilla I attempted to “generate the docs” by issuing the command:
make -C <objdir>/xpcom/analysis classapi
This command ends up with the error:
make: *** No rule to make target `.deps', needed by `classapi'. Stop.
Getting some extra information from make using:
make -d -C objdir/xpcom/analysis classapi
I get:
...
Considering target file `classapi'.
File `classapi' does not exist.
Considering target file `.deps'.
File `.deps' does not exist.
...
Must remake target `.deps'.
...
make: *** No rule to make target `.deps', needed by `classapi'. Stop.
...
Touching base with Treehydra
The only thing in <objdir>/xpcom/analysis is the Makefile. The previously mentioned Building with static checking instructions specifically uses gcc_treehydra.so so I though I would build Treehydra if not as a fix, just to have it.
Which brings me to a nice discovery, something I should have been aware of prior perhaps, Benjamin Smedberg’s blog post talking about the steps he had given me before. In that post he mentions the same page on MDC mentioned above.
I had used gcc_dehydra.so. It seemed to build just fine, but when I ran make check_treehydra however it ended with 100% errors. I noticed that the cc1plus it was using was the systems version, not the plug-in version.
Using:
make CC1PLUS=../../installed/libexec/gcc/x86_64-unknown-linux-gnu/4.3.0/cc1plus check_treehydra
Made the test run much better however there were still 6 failures all mentioning:
../libs/treehydra.js:12: JS Exception: No case_val in this lazy object
:0: #0: Error("No case_val in this lazy object")
../libs/treehydra.js:12: #1: unhandledLazyProperty("case_val")
../libs/unstable/esp.js:481: #2: ()
./esp_lock.js:41: #3: process_tree([object GCCNode])
As interesting as this all is, I feel that I am getting sidetracked. I should be able to do something with gcc_dehydra.so alone, and at this point I feel that my static analysis build is faulty. On to IRC…
Solution
bsmedberg gives me the solution:
mkdir <objdir>/xpcom/analysis/.deps
Making the empty directory lets me get on with the build. At this point I have made a fresh static analysis build and am not using treehydra, I am sure I will get to play with it later. Visit me next time to see what other fun I am having!