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

Return to Installation

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

Postby illume » Wed Oct 08, 2008 9:48 pm

Hi,

I'm getting this after following http://www.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 "<stdin>", line 1, in <module>
File "direct/src/directbase/DirectStart.py", line 4, in <module>
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.
illume
 
Posts: 26
Joined: Wed Aug 06, 2008 12:41 am

Postby drwr » Wed Oct 08, 2008 10:34 pm

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
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby illume » Wed Oct 08, 2008 11:18 pm

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)
illume
 
Posts: 26
Joined: Wed Aug 06, 2008 12:41 am

Postby illume » Wed Oct 08, 2008 11:27 pm

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']
illume
 
Posts: 26
Joined: Wed Aug 06, 2008 12:41 am

Postby treeform » Thu Oct 09, 2008 12:42 am

can you import the library with python? It should be just standard python C extension.
User avatar
treeform
 
Posts: 2106
Joined: Sat May 05, 2007 5:15 pm
Location: SF, CA

Postby illume » Thu Oct 09, 2008 1:03 am

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 "<stdin>", line 1, in <module>
ImportError: dynamic module does not define init function (initlibpandagl)
>>>
illume
 
Posts: 26
Joined: Wed Aug 06, 2008 12:41 am

Postby illume » Thu Oct 09, 2008 1:11 am

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
>>>
illume
 
Posts: 26
Joined: Wed Aug 06, 2008 12:41 am

Postby drwr » Thu Oct 09, 2008 1:15 am

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

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby drwr » Thu Oct 09, 2008 1:17 am

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
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby illume » Thu Oct 09, 2008 1:25 am

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
>>>
illume
 
Posts: 26
Joined: Wed Aug 06, 2008 12:41 am

Postby drwr » Thu Oct 09, 2008 1:28 am

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
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby illume » Thu Oct 09, 2008 1:40 am

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.
illume
 
Posts: 26
Joined: Wed Aug 06, 2008 12:41 am

Postby illume » Thu Oct 09, 2008 1:48 am

drwr wrote: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



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,
illume
 
Posts: 26
Joined: Wed Aug 06, 2008 12:41 am

Postby drwr » Thu Oct 09, 2008 10:26 am

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:
Code: Select all
print getPluginPath()

If it is not what you expect, you can confirm that it is loading the config files you expect with:
Code: Select all
print ConfigPageManager.getGlobalPtr()


David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby illume » Thu Oct 09, 2008 6:21 pm

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,
illume
 
Posts: 26
Joined: Wed Aug 06, 2008 12:41 am

Postby treeform » Thu Oct 09, 2008 6:40 pm

User avatar
treeform
 
Posts: 2106
Joined: Sat May 05, 2007 5:15 pm
Location: SF, CA

Postby drwr » Thu Oct 09, 2008 6:53 pm

If you don't have it in your namespace already, you probably need to import PandaModules:
Code: Select all
from pandac.PandaModules import *


David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby illume » Thu Oct 09, 2008 7:05 pm

Hi,

thanks for that.


I get a weird value returned...

>>> from pandac.PandaModules import *
>>> print getPluginPath()
<auto>
>>> print repr(getPluginPath())
<auto>
illume
 
Posts: 26
Joined: Wed Aug 06, 2008 12:41 am

Postby drwr » Thu Oct 09, 2008 7:31 pm

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:
Code: Select all
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
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby illume » Thu Oct 09, 2008 7:49 pm

a ha! Thanks :)

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 :)

My home var is:
HOME=/Users/rsd

So I don't know why it doesn't search there?
illume
 
Posts: 26
Joined: Wed Aug 06, 2008 12:41 am

Postby drwr » Thu Oct 09, 2008 7:58 pm

It doesn't search in your $HOME directory by default, unless you tell it to during the compilation. The default search rules, laid out by the dtool/Config.pp, are:

(1) search the directory named by $PRC_DIR
(2) search the directories on the variable named by $PRC_PATH
(3) search /usr/local/panda/etc

If you wish it to search the directory named by $HOME in addition to the above rules, you could add the following line to your Config.pp file:
Code: Select all
#define PRC_DIR_ENVVARS PRC_DIR HOME


David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby illume » Thu Oct 09, 2008 11:19 pm

Hi,

that makes sense. I guess for different panda applications, you don't want it to use the ~/ config.

However I think a note should be added to the default Config.prc ? It says the file should go in ~/Config.prc by default. Maybe it should talk about the possible search paths instead? Or maybe I copied that note from somewhere else.

Perhaps it should also warn when no Config.prc is found?

I made a bug report here: https://bugs.launchpad.net/panda3d/+bug/281073


cheers,
illume
 
Posts: 26
Joined: Wed Aug 06, 2008 12:41 am


Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest