problem with 1.7.0 on gentoo

Hello all, got a possibly (hopefully) small issue and I need a hint. I’ve been searching the site but this seems to be my own flavor of fail :slight_smile:

Today I built panda3d-1.7.0 by hand on my Gentoo notebook using python-2.6 and everything looked great. I did basically just

python makepanda/makepanda.py --everything
sudo python makepanda/installpanda.py

pview works great, opens models-- no problem. I tried to run some samples, but got a completely unresponsive solid black window named Panda every time. The hello-world example does the same thing, black instead of gray. In the terminal where I run “python foobar.py”, Ctrl+C does nothing, nor does trying to close the Panda window with the window manager. There are two ways to stop the interpreter-- closing the terminal, or a regular “killall python2.6”. I’ve tried switching to all-software rendering and it didn’t change anything except the details of the console output which originally looks like this:

$ python game.py 
Known pipe types:
  glxGraphicsPipe
(all display modules loaded.)
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
Terminated
$

I can get the “Cannot connect” messages to go away by starting jackd beforehand but that does nothing to stop the hang, either. I watched with strace and the last lines are typically like this:

shutdown(5, 2 /* send and receive */)   = -1 EBADF (Bad file descriptor)
close(5)                                = -1 EBADF (Bad file descriptor)
write(2, "jack server is not running or ca"..., 48jack server is not running or cannot be started
) = 48
futex(0x890dea4, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x890dea0, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0xaedcebd8, FUTEX_WAIT, 10104, NULL

I know that’s only jack and probably irrelevant; I’m just wondering about the FUTEX_WAIT. At least with strace running, Ctrl+C worked normally.

For the record, I started by building 1.6.2 but something was supposedly missing and the install script aborted early… when I tried to run some samples, it would run for a second and segfault without opening a window. Anyway, I hunted down and manually deleted everything from 1.6.2 (afaict) before installing and trying 1.7.0 so that’s probably not the issue.

Whatever’s going on is probably my machine’s fault, i.e. my fault… I’m updating the whole system and then rebuilding 1.7.0 to see what happens. I also know that getting some things to build and run on Gentoo is often “like trying to nail jello to a wall” so thanks in advance for any help.

Hm, can you try editing your /etc/Config.prc, and set the value for “audio-library-name” to “null” ?

Hey, that did it! Stuff runs. So is there anything else I can do? It was trying to use openal… I also merged fmod-4.26.00 but makepanda.py didn’t find it. Right now I’m rebuilding just in case because there’s a newer openal-soft I didn’t have.

OK, this was confusing but I read and searched and somehow got it to work. First I found the statement about OpenAL on Linux being unstable… no problem, I just have to get fmodex to show up. I had already gotten the newest dev version of fmodex and installed it, sending it to /usr instead of /usr/local in its makefile. That didn’t work so I read around, but couldn’t figure why fmod still wasn’t being included. Copying /thirdparty/ from the 1.6.2 dist made it show up at the beginning but it of course failed to compile a few things later, had to be sure though :wink:

Here’s what worked: I made some empty directories in freshly unpacked 1.7.0 sources, and copied the parts in…

panda3d-1.7.0 $ mkdir -p thirdparty/linux-libs-a/fmodex/lib
panda3d-1.7.0 $ cp -a /usr/include/fmodex thirdparty/linux-libs-a/fmodex/include
panda3d-1.7.0 $ cp /usr/lib/*fmod* thirdparty/linux-libs-a/fmodex/lib

Now makepanda finds it! Then later on, gcc fails with “cannot find -lfmodex” or similar, so I come up with:

panda3d-1.7.0 $ cd thirdparty/linux-libs-a/fmodex/lib
lib $ ln -s libfmodex-4.29.07.so libfmodex.so
lib $ ln -s libfmodexp-4.29.07.so libfmodexp.so

It finished building and installed fine, so I fix the Config.prc line, after I see three different possibilities for the correct fmod audio-library-name mentioned in the wiki and elsewhere… It turns out that of course p3fmod_audio matches the libp3fmod_audio.so under built/libs and so works.

Then when I finally try to run something, it complains about failing to load that same file and throws another message about missing libfmodex.so. Of course, nothing’s being told by ld.so.conf to look in thirdparty/linux-libs-a/fmodex/lib and I decided to remake those two symlinks but in /usr/lib, then everything finally worked.

I don’t know what’s wrong with me and my box, but this much made it alright. Now after seeing the DSP stuff in the manual, looks like fmod is definitely what I wanted… this is gonna be great.

For the record, makepanda expects the fmodex include files to be in a subdirectory under the include path (e.g. /usr/local/include/fmodex) and libfmodex.so to be in the library path (e.g. /usr/local/lib).

Also, the note about OpenAL being unstable on Linux is old. If you are using the latest version of OpenALSoft, there shouldn’t be trouble.

And dropdeadSed, while you are at it, maybe you submit an ebuild to Portage so other gentoo-ers can install it in a flash?! :wink:

Not my case, my gentoo’s are all without X, but someday…

This is just what I get after manually installing from fmodapi*.tar.gz, probably that didn’t work because of the version numbers and no symlink. I’ll try again to see… yep, that was it. So simple now! :unamused:

Hm, that’s weird. I also moved my ~/.alsoftrc because it had some tweaks, but defaults didn’t work either, and yeah, it’s up to the newest one. Thanks, it’s good to know that’s considered working.

I thought about it, but had to get it working first… it seems that only 1.0.5 and 1.5.2 are in the tree, so I have to think about whether I can take ongoing care of it, second :slight_smile: