Hello Forum ,
this is my first entry here (and sorry if I start with a minor rant )
How come I can’t compile a debug version of my Panda3D program ?
With a release only version I can’t get a proper callstack.
Also is there any plans from the authors to remove the “warnings” that come up when the source gets compiled ? (something about STL compatibility issues of some panda objects, not my code but part of the SDK )
I have downloaded and installed panda just about 2-3 days ago and so far I must say its excellent work by the Panda team
“Also you could build Panda in debug if you want to use the debug runtime of visual studio with it. But I’ve found I don’t need this to debug Panda.”
By this you mean download from CVS the full source of panda right ? (I currently only have the “out of the box” version installed)
In the manual it also describes that it cannot be compiled in debug because of “instablity” (?), further if I try to compile in debug it tells me that panda_d.lib (or similar, I am not at my computer at the moment), is missing. So to me it looks like the installation package does not contain a debug version of panda.
Some stuff in the manual is very old. The panda official binaries come prebuilt in release. That’s the only limitation. But building Panda in debug should work, though I never do that, because release with symbols is enough for me, so it’s possible there are some problems, I wouldn’t know.
Also you don’t need CVS to build panda, you can just get the source package.
I still don’t understand why you can’t get a named callstack, I think our release build comes with symbols, though I might be wrong because I always build from CVS. Are there pdb files in the bin directory?
I can’t check right now because I am writing fom my work computer
I will have a go tonight when I am home.
Could you post me here a link to the full source of Panda ? (not using CVS at home)
All I can see is the SDK download http://www.panda3d.org/download.php?sdk
2.a) Locate the “thirdparty” folder in the c:\Panda3D_Source folder you just created.
2.b) Copy the Python Debug folder into the “thirdparty” folder
Locate the “makepanda” folder and open the makepanda.proj with visual studio 2008
in the visual studio “solution explorer” right click on makepanda (the project) and select “properties”
4.a) Open the Configuration Properties tab
4.b) In the Command Arguments write
–everything --verbose --optimize 1 --outputdir debug
Hit Apply and close the window
Build
Note for 64bit system users :
If you got a 64 bit system you will most likely need to modify one line of the makepanda.bat.
Not sure if makepanda.bat is actually used by this method but it didnt hurt me to change it.
Open makepanda.bat in visualstudio (drag the file into the solution) and modify this line
if %PROCESSOR_ARCHITECTURE% == AMD64 goto :AMD64
into
REM if %PROCESSOR_ARCHITECTURE% == AMD64 goto :AMD64
I am testing this right now.
I willupdate the guide once its finished.
I don’t know what that’s about; maybe the debug copy of the ODE library is out-of-date. But unless you actually need to use ODE in your build, you can avoid the issue by configure ODE off with --no-ode.
He is right, compiling with --no-ode should work around the issue. If you want to build with ODE support, you’ll have to make your own debug build of ODE and include it in the thirdparty packages.
I managed to get to 91% of the building process,
and now i get this :
Generating 'pandac' tree
thirdparty/win-python-dbg/python_d.exe direct\src\ffi\jGenPyCode.py -r libpandaexpress libpanda libpandaphysics libpandafx libp3direct libp3vision libpandaskel libpandaegg libpandaode
Importing code library: libpandaexpress
Found extensions for class: Ramfile
Found extensions for class: StreamReader
Found extensions for class: HTTPChannel
Importing code library: libpanda
Found extensions for class: NodePath
Found extensions for class: Mat3
Found extensions for class: NodePathCollection
Found extensions for class: VBase3
Found extensions for class: VBase4
Importing code library: libpandaphysics
Importing code library: libpandafx
Importing code library: libp3direct
Found extensions for class: CInterval
Importing code library: libp3vision
Importing code library: libpandaskel
Importing code library: libpandaegg
Found extensions for class: EggPrimitive
Found extensions for class: EggGroupNode
Importing code library: libpandaode
Traceback (most recent call last):
File "direct\src\ffi\jGenPyCode.py", line 94, in <module>
DoGenPyCode.run()
File "c:\Panda3D_Source\PandaDebug\direct\ffi\DoGenPyCode.py", line 305, in run
generateNativeWrappers()
File "c:\Panda3D_Source\PandaDebug\direct\ffi\DoGenPyCode.py", line 258, in generateNativeWrappers
Dtool_PreloadDLL(moduleName)
File "c:\Panda3D_Source\PandaDebug\direct\extensions_native\extension_native_helpers.py", line 79, in Dtool_PreloadDLL
imp.load_dynamic(module, pathname)
ImportError: DLL load failed: The specified module could not be found.
[123955 refs]
Storing dependency cache.
Elapsed Time: 41 min 41 sec
Build terminated.
I have rebuild ode-0.11.1 and copied from the DebugSingleDLL the dll and the object file library into the ode folder in panda source. As well as the include folder of the 0.11.1 into the panda ode include folder.
Well, now it’s on the final step, and it’s trying to import the resulting built dll into Python to generate a few wrapper files. This also tests that the dll was built correctly. The error message “The specified module cannot be found” comes from Windows and usually means that a dependency dll (like ODE or whatever it is that the build Panda dll will depend on) wasn’t found on your PATH.
It’s more than that. libpandaode_d.dll is the Panda library that you just build that references ODE. But ODE may itself be stored in a different DLL that also has to be on your PATH variable.
Or maybe not. It might be some different library, other than ODE. Or something else altogether; I’m just guessing here. You can use the dumpbin tool to help track down dependencies like this: use “dumpbin /dependents libpandaode_d.dll”, for instance, to list the DLL’s that libpandaode_d.dll requires you to have on you PATH. You can do this for all of the Panda DLL’s in turn to make sure that all of the requirements are available.
I have finally been able to create a debug version of Panda and run it, cheers guys.
for sake of completeness I write here what I did :
launch VS2008 console :
c:\Program Files (x86)\Microsoft Visual Studio 9.0\BC\bin > dumpbin.exe /dependets “c:\PandaDebug\bin\libpandaode_d.dll”
came out with a dependency on “ode_singled.dll”
which is the ode version that I had built myself.
So I have added “ode_singled.dll” to the
c:\PandaDebug\bin folder (now containing ode.dll and ode_singled.dll)
now all compiles fine but I get the impression something is wrong (mainly because ode.dll and ode_singled.dll are basically the same file with different name, so the build process used ode.dll and the python part of the build process uses a dependancy on ode_singled.dll )
Note: I had copied my ode_singled.dll before and renamed it to ode.dll to substitute the old ode version that was in the original third party source code package
Next thing I will try is getting everything out of CVS rather than trying to install from the source package on the website.
Reason why I havent done that yet is because I didnt have internet over the last month :-/