Error in /usr/include/nurbs++/matrix_global.h ?

making panda chugs along nicely for a while, until it spits out the following:

*** Error in /usr/include/nurbs++/matrix_global.h near line 67, column 24:
syntax error, unexpected IDENTIFIER, expecting ‘{’ or ‘;’ or ‘:’ or ‘=’

(failing ‘interrogate’ command and full error pasted below)

matrix_global.h looks like this (line 67 is the uncommented one):
//#ifdef GNUG
//typedef double_complex Complex ;
//#else
typedef std::complex Complex ;

I tried uncommenting the whole thing and adding an #endif, but no go. Also tried just the alternative typedef.

I would’ve assumed this to be an error in the nurbs++ package on my system, but I saw an old thread with a comparable error that someone said was actually a panda problem. Don’t understand how, but then I don’t understand much!

FTR, I’m using nurbs++ Debian packages ver. 3.0.11-4, which are the current versions in unstable.

Thanks in advance for any advice, fixes, or what have you.


interrogate -od Opt3-Linux/libparametrics.in -oc Opt3-Linux/libparametrics_igate.cxx -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const -S/usr/local/panda/include/parser-inc -S/usr/include -I/home/kinch/panda3d/panda -I…/display -I…/downloader -I…/event -I…/express -I…/gobj -I…/grutil -I…/gsgbase -I…/lerp -I…/linmath -I…/mathutil -I…/net -I…/pandabase -I…/pgraph -I…/pnmimage -I…/pnmtext -I…/pstatclient -I…/putil -I…/text -I/usr/local/panda/include -I/usr/include/mozilla/nspr -I/usr/include/python2.3 -I/usr/include/nurbs++ -fnames -string -refcount -assert -python -module “panda” -library “libparametrics” classicNurbsCurve.h config_parametrics.h cubicCurveseg.h parametricCurveDrawer.h curveFitter.h hermiteCurve.h nurbsCurve.h nurbsCurveDrawer.h nurbsCurveEvaluator.h nurbsCurveInterface.h nurbsCurveResult.h nurbsBasisVector.h nurbsSurfaceEvaluator.h nurbsSurfaceResult.h nurbsVertex.h parametricCurve.h parametricCurveCollection.h piecewiseCurve.h ropeNode.h sheetNode.h nurbsPPCurve.cxx nurbsPPCurve.h parametrics_composite1.cxx parametrics_composite2.cxx
*** Error in /usr/include/nurbs++/matrix_global.h near line 66, column 2:
syntax error, unexpected IDENTIFIER, expecting ‘{’ or ‘;’ or ‘:’ or ‘=’
Error parsing file: ‘nurbsCurve.h’

It is a Panda problem in the sense that our interrogate program, which acts a lot like a compiler and parses the C++ code in order to generate Python wrappers, doesn’t define GNUG and maybe confuses Nurbs++ in some other ways, so that (I’m guessing) the type Complex never gets defined.

It is also a Panda problem in that you are compiling vestigial code anyway, which you probably don’t really want to compile. We experimented with using Nurbs++ once a while back, and largely decided not to use it, but the code is still there in Panda. I’ll remove it for the future so that it doesn’t cause more confusions like the one you are experiencing.

Are you using makepanda or ppremake to build Panda? If you are using ppremake, you should put the following line in your personal Config.pp:


#define HAVE_NURBSPP

This will tell ppremake not to attempt to use your existing installation of Nurbs++.

David