I am trying to compile the 1.7 release without too much success.
This is what I am doing:
makepanda.py --nothing -> everything ok, no warning, no errors.
python makepanda/installpanda.py --prefix /usr/local
ldconfig
python makepanda/installpanda.py --prefix /usr/local
python samples/Asteroids/Tut-Asteroids.py
and this is what I get:
DirectStart: Starting the game.
Traceback (most recent call last):
File "samples/Asteroids/Tut-Asteroids.py", line 13, in <module>
import direct.directbase.DirectStart
File "/usr/local/share/panda3d/direct/directbase/DirectStart.py", line 3, in <module>
from direct.showbase import ShowBase
File "/usr/local/share/panda3d/direct/showbase/ShowBase.py", line 10, in <module>
from pandac.PandaModules import *
ImportError: No module named pandac.PandaModules
So the PYTHONPATH has:
/usr/local/lib/panda3d
/usr/share/lib/panda3d
and there is pandac in:
/usr/local/share/panda3d/pandac
So any idea what the problem could be?
By the way in pandac/input/ instead of having a list of .py modules I have lib.in.( no idea what they are…)
Why did you compile with --nothing? That compiles it without X11, OpenGL, Python, etc. That’s why you are not able to run anything, because you didn’t compile a display interface and no Python support either.
You should compile with --everything instead. (For the record, you can also append the --installer option, this will generate a .deb file that you can install.)
I didn’t read INSTALL-MK carefully enough… I thought OpenGL and Python weren’t part of the thirparty libs.
By the way I compiled using --everything, no --installer because I don’t want to install it right now, I added path/to/built to the PYTHONPATH and path/to/built/lib to LD_LIBRARY_PATH and when I try to run
python built/samples/Asteroids/Tut-Asteroids.py
I get this error:
__builtin__.config = getConfigShowbase()
NameError: name 'getConfigShowbase' is not defined
I recompiled on a different machine with --no-ffmpeg flag and still I get this error:
DirectStart: Starting the game.
Traceback (most recent call last):
File "samples/Asteroids/Tut-Asteroids.py", line 13, in <module>
import direct.directbase.DirectStart
File "/home/memecs/panda3d-1.7.0/built/direct/directbase/DirectStart.py", line 3, in <module>
from direct.showbase import ShowBase
File "/home/memecs/panda3d-1.7.0/built/direct/showbase/ShowBase.py", line 14, in <module>
__builtin__.config = getConfigShowbase()
NameError: name 'getConfigShowbase' is not defined
memecs@memecs-desktop:~/panda3d-1.7.0$ python makepanda/makepanda.py --no-ffmpeg
The whole concept of thirdparty packages has been removed on Linux now. I suggest removing your thirdparty tree entirely, removing the “built” dir and trying again. With --everything, it will detect which software you have installed on your system, and will build against the right ones.
Weird, there must be a different issue. What if you try:
Back on the other machine where i previuosly installed and then removed it ffmpeg, I am getting this:
/usr/bin/ld: warning: libavutil.so.50, needed by /usr/local/lib/libswscale.so.0, not found (try using -rpath or -rpath-link)
/usr/local/lib/libswscale.so.0: undefined reference to `av_get_bits_per_pixel@LIBAVUTIL_50'
/usr/local/lib/libswscale.so.0: undefined reference to `av_pix_fmt_descriptors@LIBAVUTIL_50'
/usr/local/lib/libswscale.so.0: undefined reference to `av_freep@LIBAVUTIL_50'
/usr/local/lib/libswscale.so.0: undefined reference to `av_log@LIBAVUTIL_50'
/usr/local/lib/libswscale.so.0: undefined reference to `av_mallocz@LIBAVUTIL_50'
I'll let you know what i get when importing panda3d.core * as soon as I'll be back home (other machine)
/usr/local/lib/libswscale.so.0: undefined reference to `av_malloc@LIBAVUTIL_50'
/usr/local/lib/libswscale.so.0: undefined reference to `av_free@LIBAVUTIL_50'
collect2: ld returned 1 exit status
Storing dependency cache.
I have compiled with --everything, getting the following warnings:
WARNING: Could not locate thirdparty package artoolkit, excluding from build
WARNING: Could not locate thirdparty package ffmpeg, excluding from build
WARNING: Could not locate thirdparty package swscale, excluding from build
WARNING: Could not locate thirdparty package opencv, excluding from build
Looks like a conflicting version of Panda or so, or it’s picking up libraries from your previous build.
Try removing the “built” directory and completely uninstalling any copy of Panda3D on your system.
But for the record, we have Ubuntu karmic .debs on the download page. Why exactly do you need to compile Panda3D for yourself?
Ah, oh, I see. You really need to remove old versions of Panda3D, this will do:
sudo dpkg -P panda3d
That’s most likely the cause of all your troubles, because you had ffmpeg errors while even --everything excluded ffmpeg (you dont have the ffmpeg development libraries installed).
So removing the headers fix that problem. But now I am back to the other one:
__builtin__.config = getConfigShowbase()
NameError: name 'getConfigShowbase' is not defined
Reading an old post I thought this was related to the ffmpeg libraries. But I do not have ffmpeg installed, indeed when I compiled with --everyhing I got the warning about ffmpeg missing.
You misspelled it. Import libp3direct, not lib3direct
And you need to add built/lib to the PYTHONPATH as well. (unless you use “make install” or the “–installer” option, then this will all be done for you.)