[color=red]Scroll to the bottom of this post for the most recent trouble I have encountered. Any suggestions would be appreciated
This documents my 4th attempt at compiling panda3d using ppremake. Its meant to log all the issues I cam across so other searching the the forums might make some use of it.
A few of the former errors I would get resolved around linker issues. The most annoying being the linker spitting up when encountering -outresource, saying that this was not supported. On this final attempt I did not encounter this. I am not sure why. I am assuming that I was infact using the wrong linker (indirectly), or had some other environment issue. If you have encountered the same thing I recommend you start from scratch and follow the instructions more carefully. Hopefully my log below is useful to someone.
My environment is cygwin using gcc 4. I am using also MSVC9. I’m compiling Panda 1.7.
1. Compiling ppremake
ERROR
T filename.o -MD -MP -MF .deps/filename.Tpo -c -o filename.o filename.cxx
filename.cxx: In member function `bool Filename::make_true_case()':
filename.cxx:841: error: `MAX_PATH' was not declared in this scope
filename.cxx:842: error: `DWORD' was not declared in this scope
filename.cxx:842: error: expected `;' before `l'
filename.cxx:843: error: `l' was not declared in this scope
filename.cxx:851: error: `l' was not declared in this scope
filename.cxx:854: error: `short_name' was not declared in this scope
filename.cxx:854: error: `long_name' was not declared in this scope
filename.cxx:854: error: `GetLongPathName' was not declared in this scope
filename.cxx: In member function `std::string Filename::to_os_short_name() cons
':
filename.cxx:984: error: `MAX_PATH' was not declared in this scope
filename.cxx:985: error: `DWORD' was not declared in this scope
filename.cxx:985: error: expected `;' before `l'
filename.cxx:986: error: `l' was not declared in this scope
filename.cxx:994: error: `l' was not declared in this scope
filename.cxx:996: error: `short_name' was not declared in this scope
filename.cxx: In member function `std::string Filename::to_os_long_name() const
:
filename.cxx:1018: error: `MAX_PATH' was not declared in this scope
filename.cxx:1019: error: `DWORD' was not declared in this scope
filename.cxx:1019: error: expected `;' before `l'
filename.cxx:1020: error: `l' was not declared in this scope
filename.cxx:1025: error: `l' was not declared in this scope
filename.cxx:1027: error: `long_name' was not declared in this scope
make[1]: *** [filename.o] Error 1
To resolve this I added the following to the top of filename.cxx
#include <windows.h>
2. Compiling dtool
Here is my Config.pp
///////////////////////////////////////////////////////////////////////
// Caution: there are two separate, independent build systems:
// 'makepanda', and 'ppremake'. Use one or the other, do not attempt
// to use both. This file is part of the 'ppremake' system.
///////////////////////////////////////////////////////////////////////
// This is a sample Config.pp that you may wish to use for your own
// needs. For a longer list of configuration variables that you may
// set in your own Config.pp file, see dtool/Config.pp.
// What level of compiler optimization/debug symbols should we build?
// The various optimize levels are defined as follows:
//
// 1 - No compiler optimizations, full debug symbols
// 2 - Full compiler optimizations, full debug symbols
// (if the compiler supports this)
// 3 - Full compiler optimizations, no debug symbols
// 4 - Full optimizations, no debug symbols, and asserts removed
//
// Setting this has no effect when BUILD_TYPE is "stopgap". In this
// case, the compiler optimizations are selected by setting the
// environment variable OPTIMIZE accordingly at compile time.
#define OPTIMIZE 1
// If you have installed the DirectX SDK in a particular location on
// your machine (currently, Panda requires DirectX 8.1 in order to
// build the DirectX interfaces), then you must indicate that location
// here. These two variables point to the include and lib
// directories, respectively.
// Note the use of the Panda filename convention, with forward slashes
// instead of backslashes, and /c/ instead of c:/ .
#define DX8_IPATH /c/DXSDK-OCT2004/include
#define DX8_LPATH /c/DXSDK-OCT2004/lib
#define DX9_IPATH /c/DXSDK-DEC2006/include
#define DX9_LPATH /c/DXSDK-DEC2006/lib
// If for any reason you need to turn off either the DX8 or DX9 builds,
// you can uncomment one of the following lines. (Defining a
// variable to an empty string means setting it false.)
#define HAVE_DX8
#define HAVE_DX9
#define HAVE_GL
#define HAVE_CG
#define HAVE_TINYDISPLAY
#define GLES_IPATH /c/Imagination Technologies/POWERVR SDK/OGLES-1.1_WINDOWS_PCEMULATION_2.06.26.0649/Builds/OGLES/Include
#define GLES_LPATH /c/Imagination Technologies/POWERVR SDK/OGLES-1.1_WINDOWS_PCEMULATION_2.06.26.0649/Builds/OGLES/WindowsPC/Lib
#define OPENAL_IPATH /c/Program Files/OpenAL 1.1 SDK/include
#define OPENAL_LPATH /c/Program Files/OpenAL 1.1 SDK/lib/Win32
#define HAVE_OPENAL 1
#define PYTHON_IPATH /c/Python26/include
#define HAVE_THREADS 1
#define SIMPLE_THREADS 1
and here is the result
Root is /cygdrive/c/panda3d-1.7.0/dtool
Reading /cygdrive/c/panda3d-1.7.0/Config.pp (referred to by PPREMAKE_CONFIG)
Read 18 Sources.pp files.
Generating for MSVC7
Configuring support for the following optional third-party packages:
- Did not find OpenSSL
- Did not find libjpeg
- Did not find libpng
- Did not find libtiff
- Did not find libtar
- Did not find fftw
- Did not find squish
- Did not find Nvidia Cg High Level Shading Language
- Did not find Cg OpenGL API
- Did not find Cg DX8 API
- Did not find Cg DX9 API
- Did not find Cg DX10 API
- Did not find VRPN
- Did not find zlib
- Did not find Miles Sound System
- Did not find FMOD Ex sound library
+ OpenAL sound library
+ Ageia PhysX
- Did not find TinyXML
- Did not find gtk+-2
- Did not find Freetype
- Did not find WxWidgets
+ OpenGL ES 2
- Did not find DirectX8
- Did not find DirectX9
- Not building Tinydisplay
- Did not find X11
- Did not find Mesa
- Did not find OpenCV
- Did not find FFMPEG
- Did not find ODE
- Did not find AWESOMIUM
- Did not find OpenMaya
- Did not find FCollada
- Did not find ARToolKit
Compilation will generate Python interfaces.
Compilation will include simulated threading support.
See dtool_config.h for more details about the specified configuration.
Generating dtool_config.h
No errors.
Error 1: Standard include path is missing?
cd ./src/dtoolbase && make all
make[1]: Entering directory `/cygdrive/c/panda3d-1.7.0/dtool/src/dtoolbase'
cl /Fo"Opt1-Cygwin\dtoolbase_lookup3.obj" /nologo /c /I"." /I"C:\panda3d-1.7.0\d
tool" /I"C:\Python26\include" /DHAVE_DINKUM /Zc:forScope /MDd /Zi /Fd"Opt1-
Cygwin\dtoolbase_lookup3.pdb" /RTCs /GS /DBUILDING_DTOOL /EHsc /Zm500 /DWIN32_VC
/DWIN32=1 /W3 "lookup3.c"
lookup3.c
C:\Python26\include\pyconfig.h(68) : fatal error C1083: Cannot open include file
: 'io.h': No such file or directory
make[1]: *** [Opt1-Cygwin/dtoolbase_lookup3.obj] Error 2
make[1]: Leaving directory `/cygdrive/c/panda3d-1.7.0/dtool/src/dtoolbase'
make: *** [dtoolbase] Error 2
Solution
Set the INCLUDE environment variable properly.
colinn@colinn-PC /cygdrive/c/panda3d-1.7.0/dtool
$ INCLUDE="C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE"\;"C:\Program Files\Microsoft SDKs\Windows\v7.1\Include"
colinn@colinn-PC /cygdrive/c/panda3d-1.7.0/dtool
$ export INCLUDE
Error 2: LINK syntax error
link /nologo /DLL /DEBUG /MAP /MAPINFO:EXPORTS /MAPINFO:LINES /fixed:no /incre
mental:no /stack:4194304 /NODEFAULTLIB:LIBCI.LIB /NODEFAULTLIB:MSVCRT.LIB /OUT:
"Opt1-Cygwin\libdtool_d.dll" Opt1-Cygwin/dtool_dtool.obj ../../src/dtoolutil/Opt
1-Cygwin/dtoolutil_gnu_getopt.obj ../../src/dtoolutil/Opt1-Cygwin/dtoolutil_gnu_
getopt1.obj ../../src/dtoolutil/Opt1-Cygwin/dtoolutil_dtoolutil_composite1.obj .
./../src/dtoolutil/Opt1-Cygwin/dtoolutil_dtoolutil_composite2.obj ../../src/dtoo
lbase/Opt1-Cygwin/dtoolbase_lookup3.obj ../../src/dtoolbase/Opt1-Cygwin/dtoolbas
e_indent.obj ../../src/dtoolbase/Opt1-Cygwin/dtoolbase_dtoolbase_composite1.obj
../../src/dtoolbase/Opt1-Cygwin/dtoolbase_dtoolbase_composite2.obj shell32.lib
LINK : fatal error LNK1117: syntax error in option 'MAPINFO:LINES'
make[1]: *** [Opt1-Cygwin/libdtool_d.dll] Error 93
make[1]: Leaving directory `/cygdrive/c/panda3d-1.7.0/dtool/metalibs/dtool'
make: *** [dtool] Error 2
Solution: Set USE_COMPILER properly
In Config.pp, add the line
#define USE_COMPILER MSVC9
Error 3: Linker Library Path no set
make[1]: Entering directory `/cygdrive/c/panda3d-1.7.0/dtool/metalibs/dtool'
link /nologo /DLL /DEBUG /MAP /MAPINFO:EXPORTS /fixed:no /incremental:no /stac
k:4194304 /NODEFAULTLIB:LIBCI.LIB /NOD:MFC80.LIB /NOD:libcmtd /NOD:libc /NODEFAU
LTLIB:MSVCRT.LIB /OUT:"Opt1-Cygwin\libdtool_d.dll" Opt1-Cygwin/dtool_dtool.obj
../../src/dtoolutil/Opt1-Cygwin/dtoolutil_gnu_getopt.obj ../../src/dtoolutil/Opt
1-Cygwin/dtoolutil_gnu_getopt1.obj ../../src/dtoolutil/Opt1-Cygwin/dtoolutil_dto
olutil_composite1.obj ../../src/dtoolutil/Opt1-Cygwin/dtoolutil_dtoolutil_compos
ite2.obj ../../src/dtoolbase/Opt1-Cygwin/dtoolbase_lookup3.obj ../../src/dtoolba
se/Opt1-Cygwin/dtoolbase_indent.obj ../../src/dtoolbase/Opt1-Cygwin/dtoolbase_dt
oolbase_composite1.obj ../../src/dtoolbase/Opt1-Cygwin/dtoolbase_dtoolbase_compo
site2.obj shell32.lib ; mt -nologo -manifest Opt1-Cygwin/libdtool_d.dll.manife
st -outputresource:Opt1-Cygwin/libdtool_d.dll\;2
LINK : fatal error LNK1181: cannot open input file 'shell32.lib'
/bin/sh: mt: command not found
make[1]: *** [Opt1-Cygwin/libdtool_d.dll] Error 127
make[1]: Leaving directory `/cygdrive/c/panda3d-1.7.0/dtool/metalibs/dtool'
make: *** [dtool] Error 2
Solution: EXPORT Library path
$ export LIB="C:\Program Files\Microsoft Visual Studio 9.0\VC\LIB"\;"C:\Program
Files\Microsoft SDKs\Windows\v7.1\lib"
Error 4: Unresolved python symbols
Creating library Opt2-Cygwin\libdtool_d.lib and object Opt2-Cygwin\libdtool_d
.exp
dtoolutil_dtoolutil_composite1.obj : error LNK2019: unresolved external symbol _
_imp___Py_Dealloc referenced in function "public: struct _object * __thiscall Fi
lename::__reduce__(struct _object *)const " (?__reduce__@Filename@@QBEPAU_object
@@PAU2@@Z)
dtoolutil_dtoolutil_composite1.obj : error LNK2019: unresolved external symbol _
_imp___Py_NegativeRefcount referenced in function "public: struct _object * __th
iscall Filename::__reduce__(struct _object *)const " (?__reduce__@Filename@@QBEP
AU_object@@PAU2@@Z)
dtoolutil_dtoolutil_composite1.obj : error LNK2001: unresolved external symbol _
_imp___Py_RefTotal
Opt2-Cygwin\libdtool_d.dll : fatal error LNK1120: 3 unresolved externals
mt.exe : general error c101008d: Failed to write the updated manifest to the res
ource of file "Opt2-Cygwin/libdtool_d.dll". The system cannot find the file spec
ified.
make[1]: *** [Opt2-Cygwin/libdtool_d.dll] Error 31
make[1]: Leaving directory `/cygdrive/c/panda3d-1.7.0/dtool/metalibs/dtool'
make: *** [dtool] Error 2
[color=red]Solution: … None Yet
I don’t know where to find the proper python26_d.lib so for the time being I changed the optimization level of the build to 3 (no debug symbols)
In Config.pp
#define OPTIMIZE 3
Compiling panda:
Error: Cannot run interrogate because libdtool.dll cannot be found.
I had tried setting LD_LIBRARY_PATH and LIBPATH to both C:\Panda3d-1.7.0 and /cygdrive/c/panda3d-1.7.0 with no luck. I most likely goofed something up here but instead I…
Solution: Hack by moving dlls to the exe dir
cp lib/*.dll bin
Error: Incorrect OpenAL include paths
Panda expects al.h to be under AL whereas the OpenAL SDK just places it at include. Furthermore, my OPENAL_IPATH doesnt not seem to be in the build command
make[1]: Entering directory `/cygdrive/c/panda3d-1.7.0/panda/src/audiotraits'
cl /Fo"Opt3-Cygwin\p3openal_audio_openal_audio_composite1.obj" /nologo /c /I"."
/I"C:\panda3d-1.7.0\panda" /I"..\audio" /I"..\downloader" /I"..\event" /I"..\exp
ress" /I"..\gobj" /I"..\gsgbase" /I"..\linmath" /I"..\mathutil" /I"..\movies" /I
"..\nativenet" /I"..\net" /I"..\pandabase" /I"..\pipeline" /I"..\pnmimage" /I"..
\pstatclient" /I"..\putil" /I"C:\panda3d-1.7.0\include" /I"C:\Python26\include"
/DFORCE_INLINING /DHAVE_DINKUM /Zc:forScope /MD /O2 /Ob2 /Zi /Fd"Opt3-Cygwin\p
3openal_audio_openal_audio_composite1.pdb" /DBUILDING_OPENAL_AUDIO /EHsc /Zm500
/DWIN32_VC /DWIN32=1 /W3 "openal_audio_composite1.cxx"
openal_audio_composite1.cxx
c:\panda3d-1.7.0\panda\src\audiotraits\openalAudioManager.h(34) : fatal error C1
083: Cannot open include file: 'AL/al.h': No such file or directory
make[1]: *** [Opt3-Cygwin/p3openal_audio_openal_audio_composite1.obj] Error 2
make[1]: Leaving directory `/cygdrive/c/panda3d-1.7.0/panda/src/audiotraits'
make: *** [audiotraits] Error 2
Solution
[color=red]No real solution yet. Since it was just head libraries I copied them over to another directory that was in the include path. In this case C:\Panda3d-1.7\include
Error: Incorrect OpenAL library paths
Same as above.
link /nologo /DLL /DEBUG /MAP /MAPINFO:EXPORTS /fixed:no /incremental:no /stac
k:4194304 /NODEFAULTLIB:LIBCI.LIB /NOD:MFC80.LIB /NOD:libcmtd /NOD:libc /NODEFAU
LTLIB:MSVCRTD.LIB /OPT:REF /NODEFAULTLIB:LIBCMT.LIB /OUT:"Opt3-Cygwin\libp3open
al_audio.dll" Opt3-Cygwin/p3openal_audio_openal_audio_composite1.obj /LIBPATH:".
.\..\metalibs\panda\Opt3-Cygwin" /LIBPATH:"..\..\metalibs\pandaexpress\Opt3-Cygw
in" /LIBPATH:"C:\panda3d-1.7.0\lib" /LIBPATH:"C:\Python26\libs" libpanda.lib lib
pandaexpress.lib libdtoolconfig.lib libdtool.lib user32.lib advapi32.lib winmm.l
ib libopenal.lib wsock32.lib ; mt -nologo -manifest Opt3-Cygwin/libp3openal_aud
io.dll.manifest -outputresource:Opt3-Cygwin/libp3openal_audio.dll\;2
LINK : fatal error LNK1181: cannot open input file 'libopenal.lib'
Opt3-Cygwin/libp3openal_audio.dll.manifest : general error c1010070: Failed to l
oad and parse the manifest. The system cannot find the file specified.
make[1]: *** [Opt3-Cygwin/libp3openal_audio.dll] Error 31
make[1]: Leaving directory `/cygdrive/c/panda3d-1.7.0/panda/src/audiotraits'
make: *** [audiotraits] Error 2
Solution
[color=red]No real solution yet. Copied over to C:\Panda3d-1.7\lib. Maybe I am supposed to use a different version of OpenAL.
NOTE: The same issue happened with the GLES include/lib files.
[color=green][size=200]=========================================
Current Error[/size]
[b]Error: PFNGLFRAMEBUFFERTEXTURE3DOES Redefinition, inconsistent dll linkage[b]
cl /Fo"Opt3-Cygwin\gles2gsg_config_gles2gsg.obj" /nologo /c /I"." /I"C:\panda3d-1.7.0\panda" /I"..\cull" /I"..\display" /I"..\downloader" /I"..\effects" /I"..\event" /I"..\express" /I"..\glstuff" /I"..\gobj" /I"..\gsgbase" /I"..\lerp" /I"..\linmath" /I"..\mathutil" /I"..\nativenet" /I"..\net" /I"..\pandabase" /I"..\pgraph" /I"..\pgraphnodes" /I"..\pipeline" /I"..\pnmimage" /I"..\pstatclient" /I"..\putil" /I"C:\panda3d-1.7.0\include" /I"C:\Python26\include" /I"C:\Python26\include" /DFORCE_INLINING /DHAVE_DINKUM /Zc:forScope /MD /O2 /Ob2 /Zi /Fd"Opt3-Cygwin\gles2gsg_config_gles2gsg.pdb" /DBUILDING_PANDAGLES /EHsc /Zm500 /DWIN32_VC /DWIN32=1 /W3 "config_gles2gsg.cxx"
config_gles2gsg.cxx
c:\panda3d-1.7.0\panda\src\glstuff\glGraphicsStateGuardian_src.h(98) : error C2373: 'PFNGLFRAMEBUFFERTEXTURE3DOES' : redefinition; different type modifiers
C:\panda3d-1.7.0\include\GLES2/gl2ext.h(411) : see declaration of 'PFNGLFRAMEBUFFERTEXTURE3DOES'
config_gles2gsg.cxx(21) : warning C4273: 'gles2gsg_cat' : inconsistent dll linkage
c:\panda3d-1.7.0\panda\src\gles2gsg\config_gles2gsg.h(23) : see previous definition of 'gles2gsg_cat'
config_gles2gsg.cxx(21) : warning C4273: 'NotifyCategoryGetCategory_gles2gsg::NotifyCategoryGetCategory_gles2gsg' : inconsistent dll linkage
c:\panda3d-1.7.0\panda\src\gles2gsg\config_gles2gsg.h(23) : see previous definition of '{ctor}'
config_gles2gsg.cxx(21) : warning C4273: 'NotifyCategoryGetCategory_gles2gsg::get_category' : inconsistent dll linkage
c:\panda3d-1.7.0\panda\src\gles2gsg\config_gles2gsg.h(23) : see previous definition of 'get_category'
config_gles2gsg.cxx(36) : warning C4273: 'init_libgles2gsg' : inconsistent dll linkage
c:\panda3d-1.7.0\panda\src\gles2gsg\config_gles2gsg.h(25) : see previous definition of 'init_libgles2gsg'
make[1]: *** [Opt3-Cygwin/gles2gsg_config_gles2gsg.obj] Error 2
make[1]: Leaving directory `/cygdrive/c/panda3d-1.7.0/panda/src/gles2gsg'
[color=red]No solution yet:
I’m really not sure what to make of this yet. I looked at the PFNGLFRAMEBUFFERTEXTURE3DOES redefinition. In panda (gles2gsg) we have this
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
whereas in the gl2ext file we have this
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
Am I using the wrong gles? I got it from Imagination tech.
Here is what a search for gles2gsg_cat returns
src/egldisplay/eglGraphicsStateGuardian.cxx: if (gles2gsg_cat.is_debug()) {
src/egldisplay/eglGraphicsStateGuardian.cxx: gles2gsg_cat.debug()
src/gles2gsg/gles2gsg.h:#define GLCAT gles2gsg_cat
Binary file src/gles2gsg/Opt3-Cygwin/gles2gsg_config_gles2gsg.obj matches
Any idea on this?