Can't compile 1.4.1 on Debian Lenny

Hi, i’m new in this forum, and i’m writing cause i’ve been all day trying to compile panda 1.4.1 and i just can’t do it.

First, i had

i solved it as specified on some other thread…

then, i had the same problem as discourse.panda3d.org/viewtopic.php … e3e54dc13f
with the “Python.h” and “structmember.h” not being found…

i don’t know what Josh means with “You need to install the python SDK”… are you talking about ‘apt-get install python’ ? well… i searched a while, and didn’t find nothing as ‘python sdk’ o similar.

What i did is to edit dtool/src/interrogatedb/py_panda.h and replaced

#include “Python.h”
#include “structmember.h”

with

#include <Python.h>
#include <structmember.h>

as i assumed they were system libraries…
i do not get the error on not founding Python.h but it’s still not finding structmember.h

please, any help will be VERY appreciated

It’s not just package python, it’s something along the lines of python-dev or maybe python2.5-dev or something like that.

Well… yes, python-dev was missing.

it Compiled everything ok with makepanda/makepanda.py --everything, but it didn’t make ppython executable… i had pview, and it worked… if showing a small textured triangle means “worked”.

I have also several other executables, but no ‘ppython’. I tried one example with python, but it didn’t work…

so, i removed everything, and tried the ppremake method.

i manage to make and install ppremake, and dtool… but when i tried to compile ‘panda’ i have an error, and i cant find how to solve it:

“No existe el fichero o el directorio” means “file does not exist”

i think perhaps this has to do with the “Config.pp” perhaps i’m not configuring it ok.

Another thing, which version of python is recommended to use? because i have both 2.4.4 and 2.5.1 installed, and i noticed that when building with makepanda.py it included libraries from 2.5… perhaps this is the problem of not building the ppython executable?

thanks a lot :smiley:

There is no ppython any more. It’s just python.

When you say the sample “didn’t work,” what was the error message?

Update: I just searched the manual for any residual references to ppython. I have removed them all. Sorry about that.

i mean, an error from the imports… i don’t remember exactly but i think was
pandac.PandaModules

i’m recompiling with makepanda to see what happens…

also, if i do makepanda/makepanda.py --everything --installer to have a .deb when i install it, it should place the libraries on their correct location, right ? or should i set LD_LIBRARY_PATH with some path?

if i have to… how can i make that variable to persist?

because i do export LD_LIBRARY_PATH=[some_path]

but when i logout and login again, LD_LIBRARY_PATH does not exists anymore… any clue?

and what about python2.5 and python2.4 ? which one should i use?

as i’m recompiling now, i’m seeing that it’s including python 2.5

should i re-run the makepanda.py for use python2.4 ? if so… how? because i tried but couldn’t do it… and then, when it’s installed, should i use python2.4 or python2.5 ?

regards

ok… i finished the compilation with makepanda/makepanda.py

i go to samples/Sample-Programs–Shadows
and do ‘python Tut-Shadow-Mapping.py’
i get

You have to set your PYTHONPATH as well, I think.
About the LD_LIBRARY_PATH persistance, try using ldconfig or placeing the path in /etc/ld.so.conf or so (dunno the exact name)

ok, now is working… the thing is i have to set PATH, PYTHONPATH and LD_LIBRARY_PATH everytime i open a console… anyway, i’ll try to find out how to solve this.

Thanks a lot :smiley:

If you build a ‘deb’ file, and then install the deb, you do NOT need to set environment variables. That is the intended way of installing it.

well… i installed it as it sais in the readme, to /usr/local/panda3d
then i saw your answer here, and made the “deb”… installed it and i still have to create the enviroment variables… i do not need to set LD_LIBRARY_PATH nor PATH, but i do have to set PYTHONPATH=/usr/share/panda3d:/usr/lib/panda3d

i don’t know, perhaps i messed around too much…

by the way, to have the enviroment variables set when you open a new terminal, you have to edit ~/.bashrc or /etc/bash.bashrc (this last one to do it system-wide)

and on the bottom place, for example
export PATH=/usr/local/panda3d/bin:$PATH
export PYTHONPATH=/usr/share/panda3d:/usr/lib/panda3d

well… returning to panda, i have some issues with it, but i will create another thread.

regards, and Thank you VERY VERY much :smiley:

Hm. Those readmes are pretty old… I should take a look at them to see if they’re still correct.

To all who see this: please do NOT use environment variables. Panda does not require them, except under one very special circumstance. If you’ve just compiled panda and you want to run it out of your own home directory without installing it, in that one case, you need to set some environment variables. Other than that, no environment variables should be needed.

I have the same sort of problem when trying to use ppremake. I get as far as the panda directory and when i type ppremake I get that everything is fine except:

and make install:

This is using panda 1.4.1. It seems that one of the solutions is to use makepanda, but I’m on OS X and I was under the impression that makepanda does not work on OS X because INSTALL-MK says…

Is there something I’m missing? I’ve followed a few tutorials about ppremaking on mac os, and none of them address this issue…

It’s just a bug in 1.4.1. The “movies” directory is not fully included in the ppremake build, and it needs to be. I’m afraid I don’t know how to fix that, but I think that others on the forums may have discussed it.