Installation on Linux Mint 15 fails 44% through

I’ve been trying for the past couple of hours to get Panda3D installed on Linux Mint 15 (Olivia). I downloaded the source, unpacked, tried to build with “python makepanda/makepanda.py --everything” and got the following output:

WARNING: Could not locate pkg-config package eigen3, excluding from build
Generating library cache...
WARNING: Could not locate thirdparty package artoolkit, excluding from build
WARNING: Could not locate thirdparty package fcollada, excluding from build
WARNING: Could not locate thirdparty package fftw, excluding from build
WARNING: Could not locate thirdparty package fmodex, excluding from build
WARNING: Could not locate thirdparty package opencv, excluding from build
WARNING: Could not locate thirdparty package squish, excluding from build
WARNING: Could not locate thirdparty package tiff, excluding from build
WARNING: Could not locate thirdparty package vrpn, excluding from build
WARNING: Could not locate thirdparty package bullet, excluding from build
WARNING: Could not locate thirdparty package rocket, excluding from build
WARNING: Could not locate thirdparty package openssl, excluding from build
Generating dependencies...
[ 44%] Building C++ object built/tmp/p3gles2gsg_gles2gsg.o
In file included from panda/src/glstuff/glstuff_src.cxx:30:0,
                 from panda/src/gles2gsg/gles2gsg.cxx:20:
panda/src/glstuff/glGraphicsStateGuardian_src.cxx: In member function ‘virtual void GLES2GraphicsStateGuardian::reset()’:
panda/src/glstuff/glGraphicsStateGuardian_src.cxx:1069:21: error: invalid conversion from ‘void (*)(GLuint, GLsizei, const GLchar* const*, const GLint*) {aka void (*)(unsigned int, int, const char* const*, const int*)}’ to ‘PFNGLSHADERSOURCEPROC {aka void (*)(unsigned int, int, const char**, const int*)}’ [-fpermissive]
Storing dependency cache.
Elapsed Time: 4 sec
The following command returned a non-zero value: g++ -ftemplate-depth-30 -fPIC -c -o built/tmp/p3gles2gsg_gles2gsg.o -Ibuilt/tmp -Ibuilt/include -I/usr/include/python2.7 -DMAKEPANDA= -Ipanda/src/gles2gsg -Ipanda/src/glstuff -pthread -msse2 -O2 -DBUILDING_PANDAGLES2 panda/src/gles2gsg/gles2gsg.cxx
Build terminated.

I have tried and failed to download artoolkit, I’m not sure what’s going on with eigen3, and I hold out no hope for me getting the rest of the dependencies. Any help is appreciated, I have tried scouring the linux mint forums as well as these, but no solutions presented worked for me.

Edit panda/src/glGraphicsStateGuardian_src.h, and find this line:

typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar **string, const GLint *length);

Try replacing it with this:

typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length);

Let me know if it works and I’ll make the change permanent for the next release of Panda.

You should probably also install libssl-dev and libtiff-dev, though. Most of the other packages are for specific features that aren’t very important unless you want to use those explicitly.

Olivia is based on Ubuntu Raring. If you have the amd64-version running, you can use my build: Panda3D downloads for several distros

If you run i386 or really want to compile yourself, here is a package list for orientation:

sudo apt-get install bison flex libboost-python-dev cmake libxxf86dga-dev libode-dev libvrpn-dev libfftw3-dev libtiff5-dev libpng12-dev libssl-dev libgtk2.0-dev libsquish-dev nvidia-cg-dev libopenal-dev libcv-dev libhighgui-dev libopencv-dev libeigen3-dev libfcollada-dev libavdevice-dev libavfilter-dev libbullet-dev fftw-dev libfmodex-dev libosmesa6-dev libcogl-dev

There can be errors, but you should get the point with it. You will need this PPA launchpad.net/~panda3d/+archive/ppa
You need to set up the PPA as you would run Ubuntu Quantal.

I suspect this to be my fault, but changing the apientry led to the following compiler error:

In file included from built/include/glstuff_src.h:45:0,
                 from panda/src/glgsg/glgsg.h:88,
                 from panda/src/glgsg/config_glgsg.cxx:16:
built/include/glGraphicsStateGuardian_src.h:153:127: error: conflicting declaration ‘typedef void (* PFNGLSHADERSOURCEPROC)(GLuint, GLsizei, const GLchar* const*, const GLint*)’
In file included from panda/src/glgsg/glgsg.h:86:0,
                 from panda/src/glgsg/config_glgsg.cxx:16:
built/include/panda_glext.h:3916:25: error: ‘PFNGLSHADERSOURCEPROC’ has a previous declaration as ‘typedef void (* PFNGLSHADERSOURCEPROC)(GLuint, GLsizei, const GLchar**, const GLint*)’
Storing dependency cache.
Elapsed Time: 14 min 16 sec
The following command returned a non-zero value: g++ -ftemplate-depth-30 -fPIC -c -o built/tmp/p3glgsg_config_glgsg.o -Ibuilt/tmp -Ibuilt/include -I/usr/include/python2.7 -DMAKEPANDA= -Ipanda/src/glgsg -Ipanda/src/glstuff -pthread -msse2 -O2 -DBUILDING_PANDAGL panda/src/glgsg/config_glgsg.cxx

The Raring build installed without issue, I will see if I can make some demos work in a bit.

EDIT: The Raring build seems to be working fine, thanks a bunch, Jorn.

I’m glad I could help! ^^

Maybe this will be useful for someone.
I just finished building panda on Linux Mint 15 (32 bit).
The list of packages I installed:

sudo apt-get install bison flex python-dev libboost-python-dev cmake libxxf86dga-dev libode-dev libfftw3-dev libtiff5-dev libpng12-dev libssl-dev libgtk2.0-dev nvidia-cg-dev libopenal-dev libcv-dev libhighgui-dev libopencv-dev libeigen3-dev  libavdevice-dev libavfilter-dev libbullet-dev fftw-dev libosmesa6-dev libcogl-dev blt-dev freeglut3-dev nvidia-cg-toolkit python-pmw python-tk 

Compilation was successful only with “–no-gles2 --no-fftw”:

makepanda/makepanda.py --everything --no-gles2 --no-fftw --installer

Also according to warnings following libraries were excluded: artoolkit, fcollada, fmodex, gles, squish, vrpn, rocket.

If you need, you can install the packages for fmodex, fcollada and libsquish from the PPA “Panda3D build dependencies”. It contains artoolkit, too, but it doesn’t compile. libRocket has to be compiled on your own.

Hi rdb,

I had the same exact problem when building Panda 1.8.1 on a Ubuntu 13.04 x86_64 host. Changing the source as you mentioned and doing the same modification to line 3916 of panda/src/glstuff/panda_glext.h fixed the build problem for me and samples are running fine.

Thank you so much,
Diego