The latest CVS version already solves these issues. With the new CVS version I succeeded to compile on Fedora 9, both 32-bits and 64-bits.
Panda3D 1.5.3 will be released within two weeks and will contain the necessary fixes (and also includes prebuilt fedora rpms.)
About cstring instead of string.h, I don’t know. It works this way with string.h anyways, so I’m not sure whether we should bother about changing that to cstring.
Maybe I was half right: with either #include <string.h>
or #include
it is okay, but with #include
it is not. I believe omitting “.h” is the preferred way with C++ nowadays, but do not have my C++ books handy to check that. It’s been a long time since I’ve done any C++ programming!.
A Fedora 9 RPM will be very welcome!
Indeed, when I tried to compile from CVS, on Aug. 14 or 15, I did not get those error messages! But I did get other error messages, which suggested some missing source files – I had no idea how to supply those, and that’s why I went back to 1.5.2.
I’ve done a CVS update today and tried to recompile – this is not an urgent issue for me, since I’ve got 1.5.2 working – but just for your information, here is the output:
Makepanda Initial Status Report
Makepanda: Compiler: LINUX
Makepanda: Optimize: 3
Makepanda: Keep Pkg:
Makepanda: Omit Pkg: MAYA6 MAYA65 MAYA7 MAYA8 MAYA85 MAYA2008 MAX6 MAX7 MAX8 MAX9 MAX2009 DX8 DX9 PYTHON ZLIB PNG JPEG TIFF VRPN FMOD FMODEX OPENAL NVIDIACG OPENSSL FREETYPE FFTW ARTOOLKIT ODE DIRECTCAM FFMPEG PANDATOOL
Makepanda: Verbose vs. Quiet Level: 1
Makepanda: Don’t generate API reference manual
Makepanda: Version ID: 1.5.3
Makepanda: Caution: the built/lib directory is not in LD_LIBRARY_PATH
Makepanda: or /etc/ld.so.conf. You must add it before using panda.
Generating dependencies…
g++ -ftemplate-depth-30 -fPIC -c -o built/tmp/interrogatedb_composite.o -I"built/tmp" -I"built/include" -Idtool/src/interrogatedb -O2 -DBUILDING_DTOOLCONFIG dtool/src/interrogatedb/interrogatedb_composite.cxx
In file included from dtool/src/interrogatedb/dtool_super_base.cxx:15,
from dtool/src/interrogatedb/interrogatedb_composite1.cxx:2,
from dtool/src/interrogatedb/interrogatedb_composite.cxx:1:
dtool/src/interrogatedb/py_panda.h:52:20: error: Python.h: No such file or directory
dtool/src/interrogatedb/py_panda.h:53:26: error: structmember.h: No such file or directory
In file included from dtool/src/interrogatedb/dtool_super_base.cxx:15,
from dtool/src/interrogatedb/interrogatedb_composite1.cxx:2,
from dtool/src/interrogatedb/interrogatedb_composite.cxx:1:
dtool/src/interrogatedb/py_panda.h:86: error: typedef ‘ConvertFunctionType’ is initialized (use typeof instead)
dtool/src/interrogatedb/py_panda.h:86: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:86: error: expected primary-expression before ‘,’ token
dtool/src/interrogatedb/py_panda.h:86: error: expected primary-expression before ‘’ token
dtool/src/interrogatedb/py_panda.h:86: error: expected primary-expression before ‘)’ token
dtool/src/interrogatedb/py_panda.h:88: error: typedef ‘FreeFunction’ is initialized (use typeof instead)
dtool/src/interrogatedb/py_panda.h:88: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:88: error: expected primary-expression before ‘)’ token
dtool/src/interrogatedb/py_panda.h:89: error: typedef ‘PyModuleClassInit’ is initialized (use typeof instead)
dtool/src/interrogatedb/py_panda.h:89: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:89: error: ‘module’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:91: error: variable or field ‘Dtool_Deallocate_General’ declared void
dtool/src/interrogatedb/py_panda.h:91: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:91: error: ‘self’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:101: error: ISO C++ forbids declaration of ‘PyObject_HEAD’ with no type
dtool/src/interrogatedb/py_panda.h:102: error: expected ‘;’ before ‘void’
dtool/src/interrogatedb/py_panda.h:125: error: ‘PyMemberDef’ does not name a type
dtool/src/interrogatedb/py_panda.h:132: error: ‘PyTypeObject’ does not name a type
dtool/src/interrogatedb/py_panda.h:137: error: ‘ConvertFunctionType’ does not name a type
dtool/src/interrogatedb/py_panda.h:139: error: ‘FreeFunction’ does not name a type
dtool/src/interrogatedb/py_panda.h:140: error: ‘PyModuleClassInit’ does not name a type
dtool/src/interrogatedb/py_panda.h:143: error: ISO C++ forbids declaration of ‘PyTypeObject’ with no type
dtool/src/interrogatedb/py_panda.h:143: error: ‘PyTypeObject’ declared as an ‘inline’ field
dtool/src/interrogatedb/py_panda.h:143: error: expected ‘;’ before ‘&’ token
dtool/src/interrogatedb/py_panda.h:144: error: ISO C++ forbids declaration of ‘PyObject’ with no type
dtool/src/interrogatedb/py_panda.h:144: error: ‘PyObject’ declared as an ‘inline’ field
dtool/src/interrogatedb/py_panda.h:144: error: expected ‘;’ before ‘&’ token
dtool/src/interrogatedb/py_panda.h:252: error: variable or field ‘Dtool_Deallocate_General’ declared void
dtool/src/interrogatedb/py_panda.h:252: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:252: error: ‘self’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:316: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:316: error: ‘self’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:326: error: variable or field ‘DTOOL_Call_ExtractThisPointerForType’ declared void
dtool/src/interrogatedb/py_panda.h:326: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:326: error: ‘self’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:326: error: expected primary-expression before ‘’ token
dtool/src/interrogatedb/py_panda.h:326: error: ‘classdef’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:326: error: expected primary-expression before ‘void’
dtool/src/interrogatedb/py_panda.h:329: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:329: error: ‘self’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:329: error: expected primary-expression before ‘’ token
dtool/src/interrogatedb/py_panda.h:329: error: ‘classdef’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:329: error: expected primary-expression before ‘int’
dtool/src/interrogatedb/py_panda.h:329: error: expected primary-expression before ‘const’
dtool/src/interrogatedb/py_panda.h:329: error: expected primary-expression before ‘bool’
dtool/src/interrogatedb/py_panda.h:329: error: initializer expression list treated as compound expression
dtool/src/interrogatedb/py_panda.h:331: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:331: error: ‘self’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:339: error: expected constructor, destructor, or type conversion before ‘’ token
dtool/src/interrogatedb/py_panda.h:345: error: expected constructor, destructor, or type conversion before ‘’ token
dtool/src/interrogatedb/py_panda.h:395: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:395: error: ‘self’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:395: error: expected primary-expression before ‘void’
dtool/src/interrogatedb/py_panda.h:395: error: expected primary-expression before ‘’ token
dtool/src/interrogatedb/py_panda.h:395: error: ‘type’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:395: error: expected primary-expression before ‘bool’
dtool/src/interrogatedb/py_panda.h:395: error: expected primary-expression before ‘bool’
dtool/src/interrogatedb/py_panda.h:395: error: initializer expression list treated as compound expression
dtool/src/interrogatedb/py_panda.h:402: error: ‘PyMethodDef’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:402: error: template argument 2 is invalid
dtool/src/interrogatedb/py_panda.h:402: error: template argument 4 is invalid
dtool/src/interrogatedb/py_panda.h:402: error: invalid type in declaration before ‘;’ token
dtool/src/interrogatedb/py_panda.h:404: error: variable or field ‘Dtool_Accum_MethDefs’ declared void
dtool/src/interrogatedb/py_panda.h:404: error: ‘PyMethodDef’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:404: error: expected primary-expression before ‘&’ token
dtool/src/interrogatedb/py_panda.h:404: error: ‘themap’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:426: error: ‘PyObject’ has not been declared
dtool/src/interrogatedb/py_panda.h:428: error: ISO C++ forbids declaration of ‘PyMethodDef’ with no type
dtool/src/interrogatedb/py_panda.h:428: error: expected ‘;’ before ‘’ token
dtool/src/interrogatedb/py_panda.h:443: error: expected constructor, destructor, or type conversion before ‘’ token
dtool/src/interrogatedb/py_panda.h:448: error: expected constructor, destructor, or type conversion before ‘’ token
dtool/src/interrogatedb/py_panda.h:494: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:494: error: ‘v1’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:494: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:494: error: ‘v2’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:494: error: initializer expression list treated as compound expression
dtool/src/interrogatedb/py_panda.h:496: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:496: error: ‘v1’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:496: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:496: error: ‘v2’ was not declared in this scope
dtool/src/interrogatedb/py_panda.h:496: error: initializer expression list treated as compound expression
In file included from dtool/src/interrogatedb/interrogatedb_composite1.cxx:2,
from dtool/src/interrogatedb/interrogatedb_composite.cxx:1:
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: ‘self’ was not declared in this scope
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: ‘args’ was not declared in this scope
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: ‘kwds’ was not declared in this scope
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: initializer expression list treated as compound expression
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: expected constructor, destructor, or type conversion before ‘’ token
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: ‘self’ was not declared in this scope
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: expected primary-expression before ‘’ token
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: ‘requested_type’ was not declared in this scope
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: initializer expression list treated as compound expression
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: variable or field ‘Dtool_PyModuleClassInit_DTOOL_SUPPER_BASE’ declared void
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: ‘module’ was not declared in this scope
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: expected constructor, destructor, or type conversion before ‘’ token
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: variable or field ‘Dtool_FreeInstance_DTOOL_SUPPER_BASE’ declared void
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: ‘PyObject’ was not declared in this scope
dtool/src/interrogatedb/dtool_super_base.cxx:22: error: ‘self’ was not declared in this scope
In file included from built/include/filename.h:21,
from built/include/dSearchPath.h:20,
from built/include/configPageManager.h:20,
from built/include/configVariableCore.h:20,
from built/include/configVariableBase.h:20,
from built/include/configVariable.h:19,
from built/include/configVariableEnum.h:19,
from built/include/notifyCategory.h:21,
from built/include/notifyCategoryProxy.h:20,
from dtool/src/interrogatedb/config_interrogatedb.h:19,
from dtool/src/interrogatedb/config_interrogatedb.cxx:15,
from dtool/src/interrogatedb/interrogatedb_composite1.cxx:3,
from dtool/src/interrogatedb/interrogatedb_composite.cxx:1:
built/include/vector_string.h:38: error: expected declaration before end of line
Storing dependency cache.
Elapsed Time: 6 sec
You appear to be missing Python.h, meaning you don’t have the python-dev package installed.
Note that the C header file <string.h> is (and always has been) a completely different file from the C++ header file . The former defines such functions as memset(), memcpy(), and so on, while the latter defines the C++ basic_string class. No relation. I’ve never heard of , and I’m not sure why the C++ designers felt the need to muddy the waters with yet a third header file named string.
It would appear so, but the appearance is deceptive: I had python-devel installed, which provides /usr/include/python2.5/Python.h
(Since compiling 1.5.2 didn’t produce this error, I assumed that Python.h was supposed to be one of the Panda source files.)
I think the problem must be with the option --nothing, because today I am running
makepanda/makepanda.py --everything
and so far the compiler is not giving any error messages.
Oh, there was one other complication. The reason I tried building with --nothing was that, with the --everything option, it complained of not finding thirdparty. I also tried
and makepanda did not recognize --thirdparty as an option. (The INSTALL-MK file does list this as a makepanda option.)
So finally, I make a symbolic link from the thirdparty directory (from panda-1.5.2) into the CVS panda directory, and that seems to be doing the trick.
Right, I think makepanda assumes that you have unpacked the thirdparty directory within the panda source directory. Where else should it expect to find it, after all?