OSX, :display: Unable to load: No error.

Hi,

I’m getting this after following edalytical.com/articles/buil … opard.html

I have this in ~/Config.prc

plugin-path /usr/local/panda/lib
default-model-extension .egg.pz
model-path .
load-display pandagl

Any ideas? Is there a log file somewhere? Or are there unittests I can run to see which parts are broken?

myname:panda3d-1.5.3 myname$ python
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.

import direct.directbase.DirectStart
DirectStart: Starting the game.
:interrogatedb(warning): Classes Http_Request and Socket_TCP share the same TypeHandle value (42); check class definitions.
/usr/local/panda/lib/pandac/extension_native_helpers.py:65: DeprecationWarning: raising a string exception is deprecated
raise message
Warning: DirectNotify: category ‘Interval’ already exists
:display: loading display module: libpandagl.dylib
:display: Unable to load: No error.
Known pipe types:
(all display modules loaded.)
Traceback (most recent call last):
File “”, line 1, in
File “direct/src/directbase/DirectStart.py”, line 4, in
ShowBase.ShowBase()
File “direct/src/showbase/ShowBase.py”, line 241, in init
self.openDefaultWindow(startDirect = False, props=props)
File “direct/src/showbase/ShowBase.py”, line 679, in openDefaultWindow
self.openMainWindow(*args, **kw)
File “direct/src/showbase/ShowBase.py”, line 754, in openMainWindow
self.openWindow(*args, **kw)
File “direct/src/showbase/ShowBase.py”, line 521, in openWindow
self.makeDefaultPipe()
File “direct/src/showbase/ShowBase.py”, line 464, in makeDefaultPipe
“No graphics pipe is available!\n”
File “direct/src/directnotify/Notifier.py”, line 130, 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.

I think this means it couldn’t find libpandagl.dylib. Did this actually get installed into your plugin-path directory, /usr/local/panda/lib ?

David

Hi,

yeah it does seem to be there:

ls -la /usr/local/panda/lib/libpanda.dylib
-rw-r–r-- 1 rsd wheel 13712 9 Oct 12:08 /usr/local/panda/lib/libpanda.dylib

$ set | grep PATH
DYLD_LIBRARY_PATH=/usr/local/panda/lib/
MANPATH=/usr/share/man:/usr/local/share/man:/usr/X11/man
PATH=/usr/local/panda/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/rsd/bin:/opt/local/bin:/opt/local/sbin
PYTHONPATH=/usr/local/panda/lib:/usr/local/panda/lib/direct:

$ otool -L /usr/local/panda/lib/libpanda.dylib
/usr/local/panda/lib/libpanda.dylib:
libpanda.dylib (compatibility version 0.0.0, current version 0.0.0)
libdownloader.dylib (compatibility version 0.0.0, current version 0.0.0)
libexpress.dylib (compatibility version 0.0.0, current version 0.0.0)
libpandabase.dylib (compatibility version 0.0.0, current version 0.0.0)
librecorder.dylib (compatibility version 0.0.0, current version 0.0.0)
libpgraph.dylib (compatibility version 0.0.0, current version 0.0.0)
libpipeline.dylib (compatibility version 0.0.0, current version 0.0.0)
libgrutil.dylib (compatibility version 0.0.0, current version 0.0.0)
libchan.dylib (compatibility version 0.0.0, current version 0.0.0)
libpstatclient.dylib (compatibility version 0.0.0, current version 0.0.0)
libchar.dylib (compatibility version 0.0.0, current version 0.0.0)
libcollide.dylib (compatibility version 0.0.0, current version 0.0.0)
libcull.dylib (compatibility version 0.0.0, current version 0.0.0)
libdevice.dylib (compatibility version 0.0.0, current version 0.0.0)
libdgraph.dylib (compatibility version 0.0.0, current version 0.0.0)
libdisplay.dylib (compatibility version 0.0.0, current version 0.0.0)
libevent.dylib (compatibility version 0.0.0, current version 0.0.0)
libgobj.dylib (compatibility version 0.0.0, current version 0.0.0)
libgsgbase.dylib (compatibility version 0.0.0, current version 0.0.0)
liblinmath.dylib (compatibility version 0.0.0, current version 0.0.0)
libmathutil.dylib (compatibility version 0.0.0, current version 0.0.0)
libmovies.dylib (compatibility version 0.0.0, current version 0.0.0)
libnet.dylib (compatibility version 0.0.0, current version 0.0.0)
libnativenet.dylib (compatibility version 0.0.0, current version 0.0.0)
libparametrics.dylib (compatibility version 0.0.0, current version 0.0.0)
libpnmimagetypes.dylib (compatibility version 0.0.0, current version 0.0.0)
libpnmimage.dylib (compatibility version 0.0.0, current version 0.0.0)
libpnmtext.dylib (compatibility version 0.0.0, current version 0.0.0)
libtext.dylib (compatibility version 0.0.0, current version 0.0.0)
libtform.dylib (compatibility version 0.0.0, current version 0.0.0)
liblerp.dylib (compatibility version 0.0.0, current version 0.0.0)
libputil.dylib (compatibility version 0.0.0, current version 0.0.0)
libaudio.dylib (compatibility version 0.0.0, current version 0.0.0)
libpgui.dylib (compatibility version 0.0.0, current version 0.0.0)
libinterrogatedb.dylib (compatibility version 0.0.0, current version 0.0.0)
libdconfig.dylib (compatibility version 0.0.0, current version 0.0.0)
libdtoolutil.dylib (compatibility version 0.0.0, current version 0.0.0)
libdtoolbase.dylib (compatibility version 0.0.0, current version 0.0.0)
libprc.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.1)
/opt/local/lib/libcv.1.dylib (compatibility version 2.0.0, current version 2.0.0)
/opt/local/lib/libhighgui.1.dylib (compatibility version 2.0.0, current version 2.0.0)
/opt/local/lib/libcxcore.1.dylib (compatibility version 2.0.0, current version 2.0.0)
/opt/local/lib/libavcodec.dylib (compatibility version 51.0.0, current version 51.60.0)
/opt/local/lib/libavformat.dylib (compatibility version 52.0.0, current version 52.18.0)
/opt/local/lib/libavutil.dylib (compatibility version 49.0.0, current version 49.7.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
/usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
/opt/local/lib/libjpeg.62.dylib (compatibility version 63.0.0, current version 63.0.0)
/opt/local/lib/libpng12.0.dylib (compatibility version 33.0.0, current version 33.0.0)
/opt/local/lib/libtiff.3.dylib (compatibility version 12.0.0, current version 12.2.0)
/opt/local/lib/libfreetype.6.dylib (compatibility version 10.0.0, current version 10.18.0)
/opt/local/lib/libtar.1.2.11.dylib (compatibility version 0.0.0, current version 1.2.11)
@executable_path/…/Library/Frameworks/Cg.framework/Cg (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

I seem to be able to load the library with ctypes too… not sure if that helps diagnose the problem or not.

$ python -c “import ctypes;print dir(ctypes.cdll.LoadLibrary(‘libpanda.dylib’))”
[’_FuncPtr’, ‘class’, ‘delattr’, ‘dict’, ‘doc’, ‘getattr’, ‘getattribute’, ‘getitem’, ‘hash’, ‘init’, ‘module’, ‘new’, ‘reduce’, ‘reduce_ex’, ‘repr’, ‘setattr’, ‘str’, ‘weakref’, ‘_handle’, ‘_name’]

can you import the library with python? It should be just standard python C extension.

Hi,

I get this error:

cd /usr/local/panda/lib/ python
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.

import libpandagl
Traceback (most recent call last):
File “”, line 1, in
ImportError: dynamic module does not define init function (initlibpandagl)

However… this works:

$ pwd
/usr/local/panda/lib/pandac

$ python
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.

import libpandaModules

Ah, then, perhaps another copy of the same library is in another directory, and is shadowing the one in /usr/local/panda/lib?

David

Oh, wait–I see that it runs when you are in the /usr/local/panda/lib/pandac directory. Weird. Is there another copy of the library in there?

I also note that the dylib doesn’t have executable permissions. I don’t remember whether this is a requirement on OSX. Does changing that help?

David

ok… I got a window up.

I changed directory to /usr/local/panda/lib/

So it looks like it is not respecting:
export DYLD_LIBRARY_PATH=/usr/local/panda/lib/

import direct.directbase.DirectStart
DirectStart: Starting the game.
:interrogatedb(warning): Classes Http_Request and Socket_TCP share the same TypeHandle value (42); check class definitions.
pandac/extension_native_helpers.py:65: DeprecationWarning: raising a string exception is deprecated
raise message
Warning: DirectNotify: category ‘Interval’ already exists
:display: loading display module: libpandagl.dylib
Known pipe types:
osxGraphicsPipe
(all display modules loaded.)
:ShowBase:info: Default graphics pipe is OpenGL (osxGraphicsPipe).
:display:osxdisplay: Creating standard window
:display:osxdisplay: In Resize…size=(800, 600) title=“Panda” !undecorated !fullscreen foreground !minimized open !cursor_hidden absolute
:display:osxdisplay: Resize Complete…
:display:osxdisplay: Event handler installed, now buildGL
:display:osxdisplay: BuildGL complete, set properties
:audio: NullAudioManager
:audio: NullAudioManager
:audio: NullAudioManager
:audio: NullAudioManager
:util(warning): Adjusting global clock’s real time by 0.115571 seconds.
:ShowBase:info: dev == 0

I don’t know enough about the Mac to speculate on why it might not be respecting that. But I’ve never heard of that failing before.

David

hrmmm…

this line looks a little odd from otool -L libpandagl.dylib

@executable_path/…/Library/Frameworks/Cg.framework/Cg (compatibility version 0.0.0, current version 0.0.0)

All the other ones don’t use executable_path.

Hi again,

I tried making all the .so, and .dylib files executable. Also tried making the /usr/local/panda/lib/ directory executable. – with no luck.

I’m pretty sure you don’t need to make them executable on OSX though.

Note, that I successfully loaded it with ctypes… so that at least is finding it on the path… so maybe it’s something to do with the dynamic loading of panda not following the path for some reason?

Is there a way I can get it to print out the plugin path? Or make sure it is using the plugin path correctly from the ~/Config.prc

cheers,

Ah, of course. It used to respect the DYLD_LIBRARY_PATH, but that was before we added plugin-path. Now that we have plugin-path, that setting is of course overriding the system library path.

You can inspect the plugin-path setting with the command:

print getPluginPath()

If it is not what you expect, you can confirm that it is loading the config files you expect with:

print ConfigPageManager.getGlobalPtr()

David

Thanks for the info David.

I looked around and couldn’t find the function. Is it available from python somewhere?

Otherwise… I think I found it in C++ land in libputil.dylib .

cu,

Its part of the global functions panda3d.org/apiref.php?page=func … PluginPath

If you don’t have it in your namespace already, you probably need to import PandaModules:

from pandac.PandaModules import *

David

Hi,

thanks for that.

I get a weird value returned…

from pandac.PandaModules import *
print getPluginPath()

print repr(getPluginPath())

That’s the default value defined in the system Config.prc, that’s a special token that means to search relative to wherever libdtool.so was loaded.

It also means that it didn’t read your personal Config.prc file. Probably that directory wasn’t on the search path for Config.prc files.

Try:

print ConfigPageManager.getGlobalPtr().getSearchPath()

to show the search path for Config.prc files. This search path is partly determined by parameters passed to the Panda build script, and partly determined by environment variables.

David

a ha! Thanks :slight_smile:

This is what that returns:

print ConfigPageManager.getGlobalPtr().getSearchPath()
/usr/local/panda/etc

I tried copying the Config.prc file to /usr/local/panda/etc/ and it worked :slight_smile:

My home var is:
HOME=/Users/rsd

So I don’t know why it doesn’t search there?