iamrayw / python-spidermonkey

Automatically exported from code.google.com/p/python-spidermonkey
GNU General Public License v2.0
0 stars 0 forks source link

Doesn't seem to run on OSX? #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

oki:iobridge wjhuie$ python
Python 2.5.1 (r251:54863, Jul 23 2008, 11:00:16) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from spidermonkey import Runtime
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.macosx-10.5-i386/egg/spidermonkey.py", line 7, in <module>
  File "build/bdist.macosx-10.5-i386/egg/spidermonkey.py", line 6, in
__bootstrap__
ImportError:
dlopen(/Users/wjhuie/.python-eggs/spidermonkey-0.0.1a-py2.5-macosx-10.5-i386.egg
-tmp/spidermonkey.so,
2): Library not loaded: Darwin_DBG.OBJ/libjs.dylib
  Referenced from:
/Users/wjhuie/.python-eggs/spidermonkey-0.0.1a-py2.5-macosx-10.5-i386.egg-tmp/sp
idermonkey.so
  Reason: image not found

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

I don't know if this is related but unfortunately I haven't learned how to
compile on OSX, etc... yet.

http://osdir.com/ml/python.ctypes/2006-04/msg00059.html

Original issue reported on code.google.com by wjh...@gmail.com on 10 Jan 2009 at 6:50

GoogleCodeExporter commented 8 years ago
I just installed Pyrex by running "sudo easy_install Pyrex", checked out r29 of
python-spidermonkey and ran "python setup.py build" and "sudo python setup.py
install". I can now successfully import the Runtime and run some basic 
examples. Even
"python test.py" shows that 15 Tests passed OK.

I'm running OS X 10.5.6 on an Intel Mac.

So I cannot reproduce the problem described above. Hope this helps ...

Original comment by a...@rcs4u.de on 20 Mar 2009 at 7:40

GoogleCodeExporter commented 8 years ago
I just tried again (removed it from site-package and had the same problem.
From your description vs. mine I can think of one major difference, I don't run
easy_install via sudo.

So my Pyrex egg is in;
/Users/wjhuie/Library/Python/2.5/site-packages/Pyrex-0.9.8.5-py2.5.egg

I have a .pydistutils.cfg file to specify this directory;

cat .pydistutils.cfg 
[install]
install_lib = ~/Library/Python/$py_version_short/site-packages
install_scripts = ~/bin

Even with the new "easy_install Pyrex" I get the same error from a python shell;

>>>import spidermonkey
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.macosx-10.5-i386/egg/spidermonkey.py", line 7, in <module>
  File "build/bdist.macosx-10.5-i386/egg/spidermonkey.py", line 6, in __bootstrap__
ImportError:
dlopen(/Users/wjhuie/.python-eggs/spidermonkey-0.0.1a-py2.5-macosx-10.5-i386.egg
-tmp/spidermonkey.so,
2): Library not loaded: Darwin_DBG.OBJ/libjs.dylib
  Referenced from:
/Users/wjhuie/.python-eggs/spidermonkey-0.0.1a-py2.5-macosx-10.5-i386.egg-tmp/sp
idermonkey.so
  Reason: image not found

It looks like it can't find libjs.dylib which Spotlight can't seem to find on my
system. What would provide that library?

Original comment by wjh...@gmail.com on 20 Mar 2009 at 8:59

GoogleCodeExporter commented 8 years ago
I seem to be having problems too. I had spidermonkey installed via mac ports, 
and
installed pyrex via easy_install. I then built and installed the bridge, but am
getting a .Bus error when running the tests.

This is with Python 2.6, BTW.

Original comment by bdar...@gmail.com on 20 Apr 2009 at 6:45

GoogleCodeExporter commented 8 years ago
This config works for me:

- OS X 10.5.8
- spidermoney installed using macports
- system python (2.5.1)
- Pyrex installed using pip (pip first installed using easy_install)

I expected it not to work after seeing the error message "ld warning: in
js/src/Darwin_DBG.OBJ/libjs.dylib, file is not of required architecture", but 
work it
did.

However I see the same symptom as Bruce - Bus Error - using pythons 2.5 and 2.6 
from
macports, with pyrex installed from macports or using pip.

Original comment by hamish.h...@gmail.com on 16 May 2010 at 1:52