[SOLVED] Panda3D compilation on FreeBSD

Hello guys!

After some hard working and after some clues, I finally got Panda3D compiled on FreeBSD. BUT when I run a sample, in my case Asteroids, I get the following error:

DirectStart: Starting the game.
Warning: unable to auto-locate config files in directory named by "<auto>etc".

[...Traceback...]

StandardError: No graphics pipe is available!
Your Config.prc file must name at least one valid panda display library via load-display or aux-display.
:TaskManager: TaskManager.destroy()

Ok, so I search for the Config.prc and find it on:
/usr/local/etc/Config.prc

Looking at it, it was at default config and was:

load-display pandagl
#load-display pandadx9
#load-display pandadx8
#load-display tinydisplay

So, the conclusion I got is:

  1. OpenGL is not correctly installed/working.
  2. /usr/local/etc/Config.prc is not being read.

Anyone have some clues for me?

Thanks!

First of all, make sure you grabbed a CVS version of Panda3D, rather than 1.7.0

Based on the warning, I think it can’t find the Config.prc file. Can you try to manually set the direction of Config.prc using:

export PANDA_PRC_DIR=/usr/local/etc

(Or PRC_DIR if you compiled using ppremake instead of makepanda)

I tried:

setenv PANDA_PRC_DIR /usr/local/etc

and received the same output.

I also tried copying Config.prc to /etc/ and to /usr/etc/ and it also didn’t change anything.

Is there a way to know that Config.prc is being loaded, like changing a line on it that would reproduce a different error?

Try this in the Python interpreter:

from pandac.PandaModules import ConfigPageManager
print ConfigPageManager.getGlobalPtr()

It will show which files have been loaded.

output:

0 explicit pages:

2 implicit pages:
  /usr/local/etc/Config.prc
  /usr/local/etc/Confauto.prc

So, it is being loaded…

I tried printing this out on the script of the Asteroids sample and it didn’t work (same error), so I tried commenting the import lines from the Asteroids Samples and discovered that the error only changed when commenting the line:

import direct.directbase.DirectStart

Any ideas?

well, didn’t notice, but the output changed:

bsd# ppython Tut-Asteroids.py 
DirectStart: Starting the game.
:display(warning): Unable to load: No error.
Known pipe types:
(all display modules loaded.)
Traceback (most recent call last):
  File "Tut-Asteroids.py", line 13, in <module>
    import direct.directbase.DirectStart
  File "/usr/local/share/panda3d/direct/directbase/DirectStart.py", line 4, in <module>
    base = ShowBase.ShowBase()
  File "/usr/local/share/panda3d/direct/showbase/ShowBase.py", line 243, in __init__
    self.openDefaultWindow(startDirect = False, props=props)
  File "/usr/local/share/panda3d/direct/showbase/ShowBase.py", line 731, in openDefaultWindow
    self.openMainWindow(*args, **kw)
  File "/usr/local/share/panda3d/direct/showbase/ShowBase.py", line 816, in openMainWindow
    self.openWindow(*args, **kw)
  File "/usr/local/share/panda3d/direct/showbase/ShowBase.py", line 561, in openWindow
    self.makeDefaultPipe()
  File "/usr/local/share/panda3d/direct/showbase/ShowBase.py", line 494, in makeDefaultPipe
    "No graphics pipe is available!\n"
  File "/usr/local/share/panda3d/direct/directnotify/Notifier.py", line 132, in error
    raise exception(errorString)
StandardError: No graphics pipe is available!
Your Config.prc file must name at least one valid panda display
library via load-display or aux-display.

OK, so the problem seems that it can’t initialize the display, and isnt accepting pandagl and tinydisplay.

Maybe opengl is misconfigured. So I assume it would run on tinydisplay since on Config.prc it says its software rendering, but it won’t. What can be wrong?

No, the message “Unable to load: No error.” usually means that your Config.prc file omits the plugin-path setting. You should have:

plugin-path /my/install/dir

where /my/install/dir is the directory where libpandagl.so etc. can be found.

David

That could work as workaround, but something else must be wrong, too. This is a makepanda build, so it should automatically detect the right directory for plugin-path (it’s by default.)

bsd# python
Python 2.6.5 (r265:79063, Jun  7 2010, 09:23:15) 
[GCC 4.2.1 20070719  [FreeBSD]] on freebsd8
Type "help", "copyright", "credits" or "license" for more information.
>>> import direct.direcbase.DirectStart
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named direcbase.DirectStart
>>> import direct.directbase.DirectStart
DirectStart: Starting the game.
Warning: unable to auto-locate config files in directory named by "<auto>etc".
Known pipe types:
(all display modules loaded.)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/share/panda3d/direct/directbase/DirectStart.py", line 4, in <module>
    base = ShowBase.ShowBase()
  File "/usr/local/share/panda3d/direct/showbase/ShowBase.py", line 243, in __init__
    self.openDefaultWindow(startDirect = False, props=props)
  File "/usr/local/share/panda3d/direct/showbase/ShowBase.py", line 731, in openDefaultWindow
    self.openMainWindow(*args, **kw)
  File "/usr/local/share/panda3d/direct/showbase/ShowBase.py", line 816, in openMainWindow
    self.openWindow(*args, **kw)
  File "/usr/local/share/panda3d/direct/showbase/ShowBase.py", line 561, in openWindow
    self.makeDefaultPipe()
  File "/usr/local/share/panda3d/direct/showbase/ShowBase.py", line 494, in makeDefaultPipe
    "No graphics pipe is available!\n"
  File "/usr/local/share/panda3d/direct/directnotify/Notifier.py", line 132, in error
    raise exception(errorString)
StandardError: No graphics pipe is available!
Your Config.prc file must name at least one valid panda display
library via load-display or aux-display.

Since it says:

Warning: unable to auto-locate config files in directory named by "<auto>etc".

It seems like the part was not generated. Where this config is set, so I could change it?

bsd# find /usr/local/lib/panda3d | xargs grep '<auto>etc'
Binary file /usr/local/lib/panda3d/libp3dtoolconfig.so.1.7 matches
Binary file /usr/local/lib/panda3d/libp3dtoolconfig.so matches

Since it is a binary, maybe the error was from makepanda.py?

Just to let it stay clear, I’m very new on FreeBSD and its a very clear install. I’m using it on VirtualBox, on a twm interface.

I compiled with:

python makepanda/makepanda.py --installer --verbose --everything

Some relevant package listing:

bsd# pkg_info | grep GL
dbus-glib-0.86_1    GLib bindings for the D-BUS messaging system
dri-7.4.4,2         OpenGL hardware acceleration drivers for the DRI
gio-fam-backend-2.24.1_1 FAM backend for GLib's GIO library
libGL-7.4.4         OpenGL library that renders using GLX or DRI
libGLU-7.4.4        OpenGL utility library
libglut-7.4.4       OpenGL utility toolkit
libosmesa-7.8.2     Off-Screen Mesa implementation of the OpenGL API
py26-opengl-3.0.1   An OpenGL (and related library) interface for Python
bsd# pkg_info | grep py
py26-imaging-1.1.6_4 The Python Imaging Library
py26-nose-0.11.3    A discovery-based unittest extension
py26-numpy-1.4.1,1  The New Numeric Extension to Python
py26-opengl-3.0.1   An OpenGL (and related library) interface for Python
py26-setuptools-0.6c11 Download, build, install, upgrade, and uninstall Python pac
py26-tkinter-2.6.5_3 Python bindings to the Tk widget set
py26-wxPython-2.8.7.1_5 Python bindings for the wxWidgets/GTK GUI toolkit
py26-wxPython-common-2.8.7.1_4 Python bindings for the wxWidgets/GTK GUI toolkit
python26-2.6.5      An interpreted object-oriented programming language
xdpyinfo-1.1.0      Display information utility for X
bsd# pkg_info | grep wx
py26-wxPython-2.8.7.1_5 Python bindings for the wxWidgets/GTK GUI toolkit
py26-wxPython-common-2.8.7.1_4 Python bindings for the wxWidgets/GTK GUI toolkit
wxgtk2-2.8.10_4     The wxWidgets GUI toolkit with GTK+ bindings
wxgtk2-common-2.8.10_4 The wxWidgets GUI toolkit (common files)
wxgtk2-contrib-2.8.10_4 The wxWidgets GUI toolkit contributed libraries
wxgtk2-contrib-common-2.8.10_4 The wxWidgets GUI toolkit contributed libraries (common fil

While doing some digging I found out this:

bsd# python
Python 2.6.5 (r265:79063, Jun  7 2010, 09:23:15) 
[GCC 4.2.1 20070719  [FreeBSD]] on freebsd8
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
/usr/local/lib/python2.6/site-packages/wx-2.8-gtk2-ansi/wx/_core.py:14240: UserWarning: wxPython/wxWidgets release number mismatch
  warnings.warn("wxPython/wxWidgets release number mismatch")

Maybe thats relevant?

Well, I’m very decided to make this work and I would make another FreeBSD install if suggested, since these problems I’m getting seems to be an exception.

Thanks for helping me out!

There are two different things going on here.

The string “etc” is what is compiled into Panda to attempt to locate the installed prc files. The string “” is supposed to map to whatever directory actually contains libp3dtool.so, or a parent directory. So “etc” is supposed to auto-locate /usr/local/etc, presuming this is the directory that contains your Config*.prc files.

You are getting an error message “Warning: unable to auto-locate config files in directory named by etc”, which indicates that this system is not working for some reason. Maybe it’s failing because libp3dtool.so isn’t being loaded from /usr/local/lib, but is instead being loaded from its build directory or something like that.

But then later that system does appear to be working, because when you print ConfigPageManager.getGlobalPtr(), it reports that it has successfully loaded both of your standard Config.prc files. So, I presume that in that run, something is different from your first reported run, and you presumably are not seeing the message about “auto”. So maybe you have fixed the first problem by this point without realizing it.

But you are still seeing another message, which is the next problem. This second problem is an inability to locate libpandagl.so. This is presumably due to an incorrect or missing setting for plugin-path. Does the string plugin-path appear in either of your standard Config.prc files?

David

WOWWWWWWWWWWWWWW

IT WORKED!!!

Since I’m doing this at home, I’m being interrupted by my family all the time, principally by my daughter who requires all of my attention.

Well, the procedure was this:

setenv PANDA_PRC_DIR /usr/local/etc

and add the line to /usr/local/etc/Config.prc:

plugin-path /usr/local/lib/panda3d

GREAT! I finally see a window!

Thanks for the help and patience, drwr!

OK, the situation now is:

Asteroids works, good.

Tried the Shadows sample, and the advanced sample tells me that the video drivers are reporting that Shaders are not supported. And after running Shadows NoShaders sample, it says No depth Textures.

Besides that, it says that /dev/dsp doesnt exists, on Shadows and Asteroids.

/dev/dsp and Shaders not supported makes sense, since I’m on Virtual Box.

But the No depth Textures part, probably because I havent installed support for the textures on the compilation. Can you tell me which one I should install?

My building report:

Makepanda Final Status Report
Makepanda: Regular build
Makepanda: Compiler: LINUX
Makepanda: Optimize: 3
Makepanda: Keep Pkg: PYTHON DIRECT OPENGL TINYDISPLAY OPENAL ODE ZLIB PNG JPEG TIFF FREETYPE OPENSSL NPAPI GTK2 WX OSMESA X11 XF86DGA XRANDR PANDATOOL PVIEW DEPLOYTOOLS CONTRIB 
Makepanda: Omit Pkg: DX8 DX9 NVIDIACG FMODEX FFMPEG PHYSX SQUISH MAYA6 MAYA65 MAYA7 MAYA8 MAYA85 MAYA2008 MAYA2009 MAYA2010 MAYA2011 MAX6 MAX7 MAX8 MAX9 MAX2009 MAX2010 MAX2011 FCOLLADA VRPN FFTW SWSCALE ARTOOLKIT OPENCV DIRECTCAM AWESOMIUM 

Thanks again!

Depth textures are an advanced feature of many graphics cards. It’s not related to features that you might or might not have compiled into Panda. If you are running under virtualization, it’s not surprising that you might not have access to any advanced graphics features–you might even be running entirely in software (via Mesa).

We haven’t fully explained why makepanda failed to produce a working build for you out-of-the-box, but I’m glad you’re up and running.

David

Thanks drwr!

My next step is to run this on a real system with a Nvidia GPU.

Good job!

Could you try and run this for me, in the interpreter? That would help me to resolve the issue that we’ve worked around.

from pandac.PandaModules import ExecutionEnvironment
print ExecutionEnvironment.getDtoolName()
print ExecutionEnvironment.getBinaryName()