interrogate and bullet


I got this error from makepanda:

45%] Building Interrogate database built/pandac/input/
*** Error in /usr/local/include/bullet/LinearMath/btAlignedAllocator.h near line 76, column 20:
syntax error, unexpected IDENTIFIER
Error parsing file: ‘bulletAllHitsRayResult.h’

using the current Panda source from CVS and bullet 2.78, on Ubuntu 10.10.

Hmmm, seems like someone checked in a modification of, which changed to using SmartPkgEnable for building the bullet module.

SmartPkgEnable("BULLET", "bullet", ("BulletSoftBody", "BulletDynamics", "BulletCollision", "LinearMath"), ("bullet", "bullet/btBulletDynamicsCommon.h"))

The last part of this line is the problem. It seems that interrogate now scans btBulletDynamicsCommon.h, which causes the problems.
One solution would be to tell SmarkPkgEnable to to scan any Bullet source files. I would wait for rdb’s opinion on this issue.

That modification has little to do with the error. The header file is only used for detecting if the Bullet headers are present on the system.

As for the original problem, try running makepanda with the --verbose flag, and capture the output.


All files in panda/src/bullet include Bullet headers indirectly via the file bullet_includes.h. Within this files only btBulletDynamicsCommon.h is outside the #ifndef CPPPARSER/#endif block. So interrogate should search only for btBulletDynamicsCommon.h. And we have a dtools/src/parser-inc/btBulletDynamicsCommon.h file.

So what I would expect is that interrogate picks up dtools/src/parser-inc/btBulletDynamicsCommon.h and none of the original Bullet header files. But benchang post shows that interrogate reads the orignal header files.

Let’s see what makepanda --verbose says.

Wait, benchang, are you perhaps rebuilding from an already existing build tree? If so, you may need to force makepanda to recopy the parser-inc directory by deleting built/include/parser-inc manually. I now remember that I ran into the same issue and got the some error a while ago. Makepanda doesn’t automatically copy over the parser-inc tree when a file in it has changed.

Bingo! clearing out that directory fixed it. thanks!