Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Trouble installing on Mac OS X 10.7

#38

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

Reported by Eric Man · September 25th, 2012 @ 09:16 AM

State: new
Milestone: none
Assigned to: Paul J. Davis Paul J. Davis

Activity

  1. Eric Man
    Eric Man

    I moved the file from the Darwin-XXX folder inside spidermonkey to spider monkey/libjs to get through this error.

    September 25th, 2012 @ 09:18 AM

  2. Eric Man
    Eric Man

    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

    September 25th, 2012 @ 09:19 AM

  3. Eric Man
    Eric Man

    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]

    September 25th, 2012 @ 09:23 AM

  4. Paul J. Davis
    Paul J. Davis

    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...

    September 25th, 2012 @ 01:23 PM

  5. gernot.cseh (at gmail)
    gernot.cseh (at gmail)
    • Tag set to osx 10.8

    This also happens on OSX 10.8..

    1. git clone git://github.com/davisp/python-spidermonkey.git
    2. cd python-spidermonkey
    3. 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

    February 2nd, 2013 @ 07:12 AM

  6. gernot.cseh (at gmail)
    gernot.cseh (at gmail)

    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/YF1VAsLx

    My 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

    February 2nd, 2013 @ 02:44 PM

  7. Andreas Richter
    Andreas Richter

    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.

    October 26th, 2013 @ 10:07 AM

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.