Local build of 1.5.4 cannot find libraries in Ubuntu 9.04

I am running Ubuntu 9.04, as the deb package for 1.5.4 does not work properly in this version, I downloaded the source and built my own installer. After installing I added soft links of all the /usr/share/panda3d directories in /usr/lib/python2.5. Now everything works up until I get the errors

    Dtool_PreloadDLL("libpandaexpress")
  File "/usr/lib/python2.5/pandac/extension_native_helpers.py", line 65, in Dtool_PreloadDLL
    raise ImportError, message
ImportError: DLL loader cannot find libpandaexpress.

I have created an /etc/ld.so.conf.d/ entry for panda3d pointing to /usr/lib/panda3d, ran ldconfig to update the linker entries, and I still get this error. How do I get the panda code to find this directory? Thank you very much for any help.

Why did you soft link?

If you made your own .deb (I assume you used the --installer option to makepanda) it would be the same as the one from the download page, just install it and everything should work out of the box. (It will also auto-place a file in ld.so.conf, and a .pth file in /usr/lib/python2.5/site-packages/)

I used the --installer option to create a .deb file yet neither the .pth nor the ld config file were installed with the installation, I had to manually create them( on that note I removed the links in /lib/python and added my own .pth file, which produces the expected results (same library error)).

PS. Hard linking can only be done with files, and it points to a spot on the disk not in the directory, so if the origional file moves the hard link becomes invalid. There is almost no reason to ever hard link files.

Well, that sounds like a serious bug. Is this the 1.6.0 source?
If you go to synaptic (or other tool) and list the files that are installed by the “panda3d” package, can you post that list here? (or at pastebin, if its too large)

PS. I didn’t mean to say you should use hardlinks, I just wondered why you used links at all.

Paste Bin dump

This is what I got as output of dpkg-query -L panda3d. I also just realised it was built against python 2.6 not 2.5. But running with python2.6 gives me the cannot find “direct” module error ie

ray /usr/share/panda3d/samples/Asteroids $ python Tut-Asteroids.py 
Traceback (most recent call last):
  File "Tut-Asteroids.py", line 13, in <module>
    import direct.directbase.DirectStart
ImportError: No module named direct.directbase.DirectStart

It was compiled against the default version of Python (it checks what /usr/bin/python symlinks to). In your case, Python 2.6.
Hmm, does the /usr/lib/python2.6/site-packages/panda3d.pth file contain “/usr/share/panda3d” ? That’s where the ‘direct’ tree resides.

Yes, I have

ray /usr/lib/python2.6/site-packages $ cat panda3d.pth 
/usr/share/panda3d
/usr/lib/panda3d

One thing I did notice however is that it is the only file in this directory, unlike /usr/lib/python2.5/site-packages which is full of files and directories (maybe this system became deprecated with 2.6?).

It’s PEP 370.
I don’t know if they entirely deprecated the current system though - if they did, I’ll need to fix that for the upcoming release.
Does printing “sys.path” in the interpreter list the site-packages dir? Try copying the .pth file to /usr/lib/python2.6/, or to your user’s private site-packages dir.

You should note that with python2.6 in Ubuntu9.04 the directory that holds the .pth files is /usr/lib/python2.6/dist-packages not /usr/lib/python2.6/site-packages. Now I get to the point of the backtrace that I got with the 1.5.4 installer.

ray /usr/share/panda3d/samples/Asteroids $ python Tut-Asteroids.py 
DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
Known pipe types:
  glxGraphicsPipe
(all display modules loaded.)
*** glibc detected *** python: free(): invalid pointer: 0xb28040c0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7d93604]
/lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb7d955b6]
/usr/lib/panda3d/libp3openal_audio.so[0xb299ad02]
======= Memory map: ========
08048000-08225000 r-xp 00000000 08:03 3256       /usr/bin/python2.6
08225000-08226000 r--p 001dc000 08:03 3256       /usr/bin/python2.6
08226000-08273000 rw-p 001dd000 08:03 3256       /usr/bin/python2.6
08273000-0827c000 rw-p 08273000 00:00 0 
08947000-09108000 rw-p 08947000 00:00 0          [heap]
adfc2000-adfc3000 ---p adfc2000 00:00 0 
adfc3000-ae7c3000 rwxp adfc3000 00:00 0 
b269b000-b26ae000 r-xp 00000000 08:03 9563       /usr/lib/libdirect-1.0.so.0.1.0
b26ae000-b26af000 r--p 00012000 08:03 9563       /usr/lib/libdirect-1.0.so.0.1.0
b26af000-b26b0000 rw-p 00013000 08:03 9563       /usr/lib/libdirect-1.0.so.0.1.0
b26b0000-b2714000 r-xp 00000000 08:03 9565       /usr/lib/libdirectfb-1.0.so.0.1.0
b2714000-b2715000 r--p 00063000 08:03 9565       /usr/lib/libdirectfb-1.0.so.0.1.0
b2715000-b2716000 rw-p 00064000 08:03 9565       /usr/lib/libdirectfb-1.0.so.0.1.0
b2716000-b277d000 r-xp 00000000 08:03 9353       /usr/lib/libSDL-1.2.so.0.11.2
b277d000-b277e000 ---p 00067000 08:03 9353       /usr/lib/libSDL-1.2.so.0.11.2
b277e000-b277f000 r--p 00067000 08:03 9353       /usr/lib/libSDL-1.2.so.0.11.2
b277f000-b2780000 rw-p 00068000 08:03 9353       /usr/lib/libSDL-1.2.so.0.11.2
b2780000-b27ab000 rw-p b2780000 00:00 0 
b27c4000-b27c8000 r-xp 00000000 08:03 2568       /lib/libattr.so.1.1.0
b27c8000-b27c9000 r--p 00003000 08:03 2568       /lib/libattr.so.1.1.0
b27c9000-b27ca000 rw-p 00004000 08:03 2568       /lib/libattr.so.1.1.0
b27ca000-b27cd000 r-xp 00000000 08:03 2685       /lib/libuuid.so.1.2
b27cd000-b27ce000 r--p 00002000 08:03 2685       /lib/libuuid.so.1.2
b27ce000-b27cf000 rw-p 00003000 08:03 2685       /lib/libuuid.so.1.2
b27cf000-b27d4000 r-xp 00000000 08:03 9670       /usr/lib/libgdbm.so.3.0.0
b27d4000-b27d5000 r--p 00004000 08:03 9670       /usr/lib/libgdbm.so.3.0.0
b27d5000-b27d6000 rw-p 00005000 08:03 9670       /usr/lib/libgdbm.so.3.0.0
b27d6000-b27eb000 r-xp 00000000 08:03 9324       /usr/lib/libICE.so.6.3.0
b27eb000-b27ec000 rw-p 00014000 08:03 9324       /usr/lib/libICE.so.6.3.0
b27ec000-b27ee000 rw-p b27ec000 00:00 0 
b27ee000-b284b000 r-xp 00000000 08:03 61605      /usr/lib/libpulse.so.0.7.1
b284b000-b284c000 r--p 0005c000 08:03 61605      /usr/lib/libpulse.so.0.7.1
b284c000-b284d000 rw-p 0005d000 08:03 61605      /usr/lib/libpulse.so.0.7.1
b285d000-b2864000 r-xp 00000000 08:03 9647       /usr/lib/libfusion-1.0.so.0.1.0
b2864000-b2865000 r--p 00006000 08:03 9647       /usr/lib/libfusion-1.0.so.0.1.0
b2865000-b2866000 rw-p 00007000 08:03 9647       /usr/lib/libfusion-1.0.so.0.1.0
b2866000-b286d000 r-xp 00000000 08:03 8027       /lib/tls/i686/cmov/librt-2.9.so
b286d000-b286e000 r--p 00006000 08:03 8027       /lib/tls/i686/cmov/librt-2.9.so
b286e000-b286f000 rw-p 00007000 08:03 8027       /lib/tls/i686/cmov/librt-2.9.so
b286f000-b2932000 r-xp 00000000 08:03 59842      /usr/lib/libasound.so.2.0.0
b2932000-b2934000 r--p 000c2000 08:03 59842      /usr/lib/libasound.so.2.0.0
b2934000-b2937000 rw-p 000c4000 08:03 59842      /usr/lib/libasound.so.2.0.0
b293b000-b293e000 r-xp 00000000 08:03 2579       /lib/libcap.so.2.11
b293e000-b293f000 r--p 00002000 08:03 2579       /lib/libcap.so.2.11
b293f000-b2940000 rw-p 00003000 08:03 2579       /lib/libcap.so.2.11
b2940000-b2947000 r-xp 00000000 08:03 9355       /usr/lib/libSM.so.6.0.0
b2947000-b2948000 r--p 00006000 08:03 9355       /usr/lib/libSM.so.6.0.0
b2948000-b2949000 rw-p 00007000 08:03 9355       /usr/lib/libSM.so.6.0.0
b2949000-b294e000 r-xp 00000000 08:03 10630      /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
b294e000-b294f000 r--p 00004000 08:03 10630      /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
b294f000-b2950000 rw-p 00005000 08:03 10630      /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
b2950000-b29a4000 r-xp 00000000 08:03 101714     /usr/lib/panda3d/libp3openal_audio.so
b29a4000-b29a5000 rw-p 00054000 08:03 101714     /usr/lib/panda3d/libp3openal_audio.so
b29a5000-b3005000 rw-p b29a5000 00:00 0 
b3005000-b3205000 rw-s 31276000 00:0f 8385       /dev/nvidia0
b3205000-b3305000 rw-s 34180000 00:0f 8385       /dev/nvidia0
b3305000-b3306000 rw-s c6c08000 00:0f 8385       /dev/nvidia0
b3306000-b3346000 rw-s 3416d000 00:0f 8385       /dev/nvidia0
b3346000-b3366000 rw-s 32b64000 00:0f 8385       /dev/nvidia0
b3366000-b33cb000 rw-p b3366000 00:00 0 
b33cb000-b3415000 rw-p 00000000 00:0f 1920       /dev/zero
b3415000-b3416000 rw-s c6060000 00:0f 8385       /dev/nvidia0
b3416000-b3437000 rw-s 00000000 00:09 0          /SYSV00000000 (deleted)
b3437000-b3522000 r--p 00000000 08:03 13639      /usr/lib/locale/en_US.utf8/LC_COLLATE
b3522000-b353a000 r-xp 00000000 08:03 10338      /usr/lib/libxcb.so.1.1.0
b353a000-b353b000 r--p 00017000 08:03 10338      /usr/lib/libxcb.so.1.1.0
b353b000-b353c000 rw-p 00018000 08:03 10338      /usr/lib/libxcb.so.1.1.0
b353c000-b3626000 r-xp 00000000 08:03 9357       /usr/lib/libX11.so.6.2.0
b3626000-b3627000 ---p 000ea000 08:03 9357       /usr/lib/libX11.so.6.2.0
b3627000-b3628000 r--p 000ea000 08:03 9357       /usr/lib/libX11.so.6.2.0
b3628000-b362a000 rw-p 000eb000 08:03 9357       /usr/lib/libX11.so.6.2.0
b362a000-b362b000 rw-p b362a000 00:00 0 
b362b000-b3639000 r-xp 00000000 08:03 9376       /usr/lib/libXext.so.6.4.0
b3639000-b363a000 r--p 0000d000 08:03 9376       /usr/lib/libXext.so.6.4.0
b363a000-b363b000 rw-p 0000e000 08:03 9376       /usr/lib/libXext.so.6.4.0
b363b000-b4355000 r-xp 00000000 08:03 11933      /usr/lib/libGLcore.so.180.44
b4355000-b4547000 rwxp 00d19000 08:03 11933      /usr/lib/libGLcore.so.180.44
b4547000-b4553000 rwxp b4547000 00:00 0 
b4553000-b45c2000 r-xp 00000000 08:03 77234      /usr/lib/libGLU.so.1.3.070300
b45c2000-b45c3000 ---p 0006f000 08:03 77234      /usr/lib/libGLU.so.1.3.070300
b45c3000-b45c4000 r--p 0006f000 08:03 77234      /usr/lib/libGLU.so.1.3.070300
b45c4000-b45c5000 rw-p 00070000 08:03 77234      /usr/lib/libGLU.so.1.3.070300
b45c5000-b4652000 r-xp 00000000 08:03 11932      /usr/lib/libGL.so.180.44
b4652000-b4670000 rwxp 0008d000 08:03 11932      /usr/lib/libGL.so.180.44
b4670000-b467f000 rwxp b4670000 00:00 0 
b467f000-b46bd000 r-xp 00000000 08:03 101672     /usr/lib/panda3d/libCgGL.so
b46bd000-b46bf000 rw-p 0003e000 08:03 101672     /usr/lib/panda3d/libCgGL.so
b46bf000-b46c6000 rw-p b46bf000 00:00 0 
b46c6000-b474d000 r-xp 00000000 08:03 101711     /usr/lib/panda3d/libpandagl.so
b474d000-b474f000 rw-p 00086000 08:03 101711     /usr/lib/panda3d/libpandagl.so
b474f000-b4750000 rw-p b474f000 00:00 0 
b4750000-b48c4000 r-xp 00000000 08:03 101689     /usr/lib/panda3d/libpandaode.so
b48c4000-b48cd000 rw-p 00174000 08:03 101689     /usr/lib/panda3d/libpandaode.so
b48cd000-b48d1000 rw-p b48cd000 00:00 0 
b48d1000-b4b65000 r-xp 00000000 08:03 101680     /usr/lib/panda3d/libpandaegg.so
b4b65000-b4b71000 rw-p 00294000 08:03 101680     /usr/lib/panda3d/libpandaegg.so
b4b71000-b4b74000 rw-p b4b71000 00:00 0 
b4b74000-b4cd4000 r-xp 00000000 08:03 101721     /usr/lib/panda3d/libp3direct.so
b4cd4000-b4cdc000 rw-p 00160000 08:03 101721     /usr/lib/panda3d/libp3direct.so
b4cdc000-b4cde000 rw-p b4cdc000 00:00 0 
b4cde000-b4d1c000 r-xp 00000000 08:03 101738     /usr/lib/panda3d/libpandafx.so
b4d1c000-b4d1e000 rw-p 0003e000 08:03 101738     /usr/lib/panda3d/libpandafx.so
b4d1e000-b4e8e000 r-xp 00000000 08:03 101686     /usr/lib/panda3d/libpandaphysics.so
b4e8e000-b4e99000 rw-p 0016f000 08:03 101686     /usr/lib/panda3d/libpandaphysics.so
b4e99000-b4e9c000 rw-p b4e99000 00:00 0 
b4e9c000-b4f0e000 r-xp 00000000 08:03 9643       /usr/lib/libfreetype.so.6.3.20
b4f0e000-b4f12000 r--p 00071000 08:03 9643       /usr/lib/libfreetype.so.6.3.20
b4f12000-b4f13000 rw-p 00075000 08:03 9643       /usr/lib/libfreetype.so.6.3.20
b4f13000-b4f65000 r-xp 00000000 08:03 10275      /usr/lib/libtiff.so.4.2.1
b4f65000-b4f67000 r--p 00052000 08:03 10275      /usr/lib/libtiff.so.4.2.1
b4f67000-b4f68000 rw-p 00054000 08:03 10275      /usr/lib/libtiff.so.4.2.1
b4f68000-b4f87000 r-xp 00000000 08:03 9959       /usr/lib/libjpeg.so.62.0.0
b4f87000-b4f88000 rw-p 0001e000 08:03 9959       /usr/lib/libjpeg.so.62.0.0
b4f88000-b4fac000 r-xp 00000000 08:03 10125      /usr/lib/libpng12.so.0.27.0
b4Aborted

It’s OpenAL that’s crashy.
Edit the /etc/Config.prc file, find the line that says something like this:

audio-library-name p3openal_audio

replace it with something like this:

audio-library-name p3fmod_audio

The OpenAL crash will be fixed in the upcoming 1.6.1 release. If you really want to use OpenAL in the meantime, just give me an email and I’ll send you the fixed libs.