Building debug version of Panda3d

Hello,

I’m trying to build a debug version of panda, using the makepanda tool. But i cannot succeed to build.
I’m working on windows with VS2019

I’m using the following command line
makepanda.bat --everything --msvc-version=14.2 --windows-sdk=10 --no-eigen --optimize 1 --no-python --outputdir built_x64d

The build fails with this error

Création de la bibliothèque built_x64d/lib/libpanda_d.lib et de l’objet built_x64d/lib/libpanda_d.exp
built_x64d\bin\libpanda_d.dll : fatal error LNK1319: 136 discordances détectées
Storing dependency cache.
Elapsed Time: 4 min 47 sec
The following command returned a non-zero value: link /nologo /NOD:MFC90.LIB /NOD:MFC80.LIB /NOD:LIBCMT /NOD:LIBCI.LIB /DEBUG /nod:libc /nod:libcmtd /nod:atlthunk /nod:atls /nod:atlsd /DLL /MAP:NUL /NOD:MSVCRT.LIB /NOD:MSVCPRT.LIB /NOD:MSVCIRT.LIB /FIXED:NO /OPT:REF /STACK:4194304 /INCREMENTAL:NO /OUT:built_x64d/bin/libpanda_d.dll /SUBSYSTEM:CONSOLE,5.02 /IMPLIB:built_x64d/lib/libpanda_d.lib built_x64d/tmp/panda_panda.obj built_x64d/tmp/p3recorder_composite1.obj built_x64d/tmp/p3recorder_composite2.obj built_x64d/tmp/p3pgraphnodes_composite1.obj built_x64d/tmp/p3pgraphnodes_composite2.obj built_x64d/tmp/p3pgraph_nodePath.obj built_x64d/tmp/p3pgraph_composite1.obj built_x64d/tmp/p3pgraph_composite2.obj built_x64d/tmp/p3pgraph_composite3.obj built_x64d/tmp/p3pgraph_composite4.obj built_x64d/tmp/p3cull_composite1.obj built_x64d/tmp/p3cull_composite2.obj built_x64d/tmp/p3movies_composite1.obj built_x64d/tmp/p3grutil_multitexReducer.obj built_x64d/tmp/p3grutil_composite1.obj built_x64d/tmp/p3grutil_composite2.obj built_x64d/tmp/p3chan_composite1.obj built_x64d/tmp/p3chan_composite2.obj built_x64d/tmp/p3pstatclient_composite1.obj built_x64d/tmp/p3pstatclient_composite2.obj built_x64d/tmp/p3char_composite1.obj built_x64d/tmp/p3char_composite2.obj built_x64d/tmp/p3collide_composite1.obj built_x64d/tmp/p3collide_composite2.obj built_x64d/tmp/p3device_composite1.obj built_x64d/tmp/p3device_composite2.obj built_x64d/tmp/p3dgraph_composite1.obj built_x64d/tmp/p3dgraph_composite2.obj built_x64d/tmp/p3display_graphicsStateGuardian.obj built_x64d/tmp/p3display_composite1.obj built_x64d/tmp/p3display_composite2.obj built_x64d/tmp/p3pipeline_composite1.obj built_x64d/tmp/p3pipeline_composite2.obj built_x64d/tmp/p3pipeline_contextSwitch.obj built_x64d/tmp/p3event_composite1.obj built_x64d/tmp/p3event_composite2.obj built_x64d/tmp/p3gobj_composite1.obj built_x64d/tmp/p3gobj_composite2.obj built_x64d/tmp/p3gsgbase_composite1.obj built_x64d/tmp/p3linmath_composite1.obj built_x64d/tmp/p3linmath_composite2.obj built_x64d/tmp/p3mathutil_composite1.obj built_x64d/tmp/p3mathutil_composite2.obj built_x64d/tmp/p3parametrics_composite1.obj built_x64d/tmp/p3parametrics_composite2.obj built_x64d/tmp/p3pnmimagetypes_composite1.obj built_x64d/tmp/p3pnmimagetypes_composite2.obj built_x64d/tmp/p3pnmimage_composite1.obj built_x64d/tmp/p3pnmimage_composite2.obj built_x64d/tmp/p3pnmimage_convert_srgb_sse2.obj built_x64d/tmp/p3text_composite1.obj built_x64d/tmp/p3text_composite2.obj built_x64d/tmp/p3tform_composite1.obj built_x64d/tmp/p3tform_composite2.obj built_x64d/tmp/p3putil_composite1.obj built_x64d/tmp/p3putil_composite2.obj built_x64d/tmp/p3audio_composite1.obj built_x64d/tmp/p3pgui_composite1.obj built_x64d/tmp/p3pgui_composite2.obj built_x64d/tmp/p3net_composite1.obj built_x64d/tmp/p3net_composite2.obj built_x64d/tmp/p3nativenet_composite1.obj built_x64d/tmp/p3pandabase_pandabase.obj built_x64d/lib/libpandaexpress_d.lib built_x64d/tmp/p3dxml_composite1.obj built_x64d/lib/libp3dtoolconfig_d.lib built_x64d/lib/libp3dtool_d.lib built_x64d/tmp/p3pnmtext_composite1.obj wsock32.lib ws2_32.lib user32.lib winmm.lib gdi32.lib advapi32.lib iphlpapi.lib setupapi.lib thirdparty/win-libs-vc14-x64/openssl/lib/libeay32.lib thirdparty/win-libs-vc14-x64/openssl/lib/ssleay32.lib thirdparty/win-libs-vc14-x64/png/lib/libpng16_static.lib thirdparty/win-libs-vc14-x64/tiff/lib/tiff.lib thirdparty/win-libs-vc14-x64/openexr/lib/IlmImf.lib thirdparty/win-libs-vc14-x64/openexr/lib/IlmThread.lib thirdparty/win-libs-vc14-x64/openexr/lib/Iex.lib thirdparty/win-libs-vc14-x64/openexr/lib/Half.lib thirdparty/win-libs-vc14-x64/jpeg/lib/jpeg-static.lib thirdparty/win-libs-vc14-x64/zlib/lib/zlibstatic.lib thirdparty/win-libs-vc14-x64/nvidiacg/lib/cg.lib thirdparty/win-libs-vc14-x64/freetype/lib/freetype.lib thirdparty/win-libs-vc14-x64/harfbuzz/lib/harfbuzz.lib thirdparty/win-libs-vc14-x64/vorbis/lib/libogg_static.lib thirdparty/win-libs-vc14-x64/vorbis/lib/libvorbis_static.lib thirdparty/win-libs-vc14-x64/vorbis/lib/libvorbisfile_static.lib thirdparty/win-libs-vc14-x64/opus/lib/ogg.lib thirdparty/win-libs-vc14-x64/opus/lib/opus.lib thirdparty/win-libs-vc14-x64/opus/lib/opusfile.lib
Build terminated.

Does anyone ahave an idea how to solve the problem?

When I use the --nothing option, I succeeded to build
libp3dtool_d.dll
libp3dtoolconfig_d.dll
libp3interrogatedb_d.dll
libpandaexpress_d.dll
libpanda_d.dll
libp3windisplay_d.dll
libp3framework_d.dll

So I guess problem was with third party cause. I’ve read that --nothing means building panda without thirdparty

You have stripped out the errors in the output you pasted here, so we can’t really tell you which thirdparty library might be the issue here. If you want help, you need to post a more complete log.

Thanks for your answer. The complete log of the build is available here BuildEverything.log Some error occurs while linking different files for example IlmImf.lib(ImfHeader.obj) : error LNK2038: mismatch detected for ‘_ITERATOR_DEBUG_LEVEL’ : value ‘0’ doesn’t match value ‘2’ in panda_panda.obj

The problem is with OpenEXR, which is compiled in Release mode. Either build with --no-openexr or rebuild the OpenEXR thirdparty package in Debug mode.

Thanks for your answer using --no-openxr solved the first error but i have the same error with other third-party modules. I guess all third-party modules available into https://www.panda3d.org/download/panda3d-1.10.8/panda3d-1.10.8-tools-win64.zip are compiled in release mode so I’ll probably need to build all third-party modules I need in debug mode.

Please note panda3d 1.10.9 has come out.

You can use this CMake project to rebuild the thirdparties in Debug mode:

Note that many thirdparty libraries are optional, you may not need all of them.

1 Like

Thanks for the panda3d-thirparty link. I will try to build it today.

@panda3dmastercoder I have noticed that current version is 1.10.9 but as I have started an analysis of Panda3d with version 1.10.8 I’m keeping this version for the moment.

1 Like

@panda3dmastercoder @rdb Thank you for your help and quick answers, I appreciate it.

1 Like