Trouble installing on Mac OS X 10.7
Reported by Eric Man | September 25th, 2012 @ 09:16 AM
What is "jsautocfg.h"?
Here is the error log:
➜ davisp-python-spidermonkey-6e3d647 python setup.py
build running build
running build_ext
gcc-4.2 not found, using clang instead
building 'spidermonkey' extension
creating build/temp.macosx-10.6-intel-2.7
creating build/temp.macosx-10.6-intel-2.7/spidermonkey
creating build/temp.macosx-10.6-intel-2.7/spidermonkey/libjs
clang -fno-strict-aliasing -fno-common -dynamic -isysroot
/Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2
-DNDEBUG -g -O3 -Ispidermonkey/libjs -Ispidermonkey/Darwin-x86_64
-I/usr/local/include/nspr
-I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
-c ./spidermonkey/context.c -o
build/temp.macosx-10.6-intel-2.7/./spidermonkey/context.o
-DJS_THREADSAFE -DPOSIX_SOURCE -D_BSD_SOURCE -Wno-strict-prototypes
-DXP_UNIX
In file included from ./spidermonkey/context.c:9:
In file included from spidermonkey/spidermonkey.h:15:
In file included from spidermonkey/libjs/jsapi.h:47:
In file included from spidermonkey/libjs/jspubtd.h:45:
spidermonkey/libjs/jstypes.h:245:14: fatal error: 'jsautocfg.h'
file not found
include "jsautocfg.h" / Use auto-detected configuration /
^
1 error generated.
error: command 'clang' failed with exit status 1
Comments and changes to this ticket
-
Eric Man September 25th, 2012 @ 09:18 AM
I moved the file from the Darwin-XXX folder inside spidermonkey to spider monkey/libjs to get through this error.
-
Eric Man September 25th, 2012 @ 09:19 AM
Here's another error.
...In file included from ./spidermonkey/libjs/jsarena.c:49:
./spidermonkey/libjs/jsbit.h:169: error: size of array ‘js_static_assert_line_169’ is negative ./spidermonkey/libjs/jsarena.c: In function ‘JS_InitArenaPool’: ./spidermonkey/libjs/jsarena.c:68: warning: implicit conversion shortens 64-bit value into a 32-bit value lipo: can't open input file: /var/folders/_y/ckd6n2xs7x59060cr1w25dqc0000gn/T//ccsAlSOF.out (No such file or directory)
error: command 'llvm-gcc-4.2' failed with exit status 1 -
Eric Man September 25th, 2012 @ 09:23 AM
To get through this error, I changed line 76 of jsutil.h from:
typedef int js_static_assert_line##line[(condition) ? 1 : -1]
to:
typedef int js_static_assert_line##line[(condition) ? 1 : 0] -
Paul J. Davis September 25th, 2012 @ 01:23 PM
I'm not sure. There's also this patch that I haven't had time to test thoroughly but might help you:
https://github.com/kencochrane/python-spidermonkey/commit/6859fc37b...
-
gernot.cseh (at gmail) February 2nd, 2013 @ 07:12 AM
- Tag set to osx 10.8
This also happens on OSX 10.8..
- git clone
git://github.com/davisp/python-spidermonkey.git
- cd python-spidermonkey
- python setup.py build
The same 2 errors as above are happening. If I modify the 2 files like mentioned above, compiling is fine, but getting following error:
import spidermonkey rt = spidermonkey.Runtime() cx = rt.new_context() cx.execute("1+2") Segmentation fault: 11
Too bad, really need spidermonkey for OSX 10.8. Any ideas what might cause the compilation errors?
Thank's
Gernot -
gernot.cseh (at gmail) February 2nd, 2013 @ 02:44 PM
Also working with the patch that you've mentioned in another ticket didn't work so far.
Here's the output that I've got for
building:
http://pastebin.com/n5LSY36c
and testing:
http://pastebin.com/YF1VAsLxMy C++ skills are not that good to tackle this thing alone, but one idea would be if there are some problems with 64bit systems?
Searching for this error
In file included from ./spidermonkey/libjs/jsarena.c:49: spidermonkey/libjs/jsbit.h:169:1: error: 'js_static_assert_line_169' declared as an array with a negative size JS_STATIC_ASSERT(sizeof(unsigned) == sizeof(JSUword)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ spidermonkey/libjs/jsutil.h:72:5: note: expanded from macro 'JS_STATIC_ASSERT' JS_STATIC_ASSERT_IMPL(condition, __LINE__) ^ spidermonkey/libjs/jsutil.h:74:5: note: expanded from macro 'JS_STATIC_ASSERT_IMPL' JS_STATIC_ASSERT_IMPL2(condition, line) ^ spidermonkey/libjs/jsutil.h:76:46: note: expanded from macro 'JS_STATIC_ASSERT_IMPL2' typedef int js_static_assert_line_##line[(condition) ? 1 : -1] ^~~~~~~~~~~~~~~~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit status 1
i've found this page Link
There is a comment mentioning:I have an idea that you should be using the 64-bit version of jsautocfg.h, not the 32-bit one. :-)
Is this version of python-spidermonkey only for 32bit systems?
Thanks
-
Andreas Richter October 26th, 2013 @ 10:07 AM
I see there are some forks trying to fix these issues, but I don't see anything being merged into the main repo. Is this project still being worked on? After making all the above changes it can be compiled but python crashes when you try to execute javascript.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Python/JavaScript bridge module, making use of Mozilla's spidermonkey JavaScript implementation. Allows implementation of JavaScript classes, objects and functions in Python, and evaluation and calling of JavaScript scripts and functions respectively. Borrows heavily from Claes Jacobssen's Javascript Perl module, in turn based on Mozilla's 'PerlConnect' Perl binding.