Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-352

Missing include in engine_spidermonkey.h when using the latest spidermonkey ?

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.1.2
    • Affects Version/s: 1.1.2
    • Component/s: Build
    • None
    • Environment:
      OS X 10.6 x86_64

      I am using the latest spidermonkey sources from http://hg.mozilla.org/mozilla-central
      spidermonkey is built without any problems (JS_VERSION == 180) which makes me think it is not a spidermonkey bug.

      Anyway, while building MongoDB, I encountered this error when generating engine_spidermonkey.o :


      In file included from scripting/engine_spidermonkey.h:37,
      from scripting/engine_spidermonkey.cpp:4:
      /Users/runpac/dev/spidermonkey_release/include/js/jsregexp.h:188: error: 'JSSLOT_PRIVATE' was not declared in this scope
      /Users/runpac/dev/spidermonkey_release/include/js/jsregexp.h: In function 'void js_ClearRegExpLastIndex(JSObject*)':
      /Users/runpac/dev/spidermonkey_release/include/js/jsregexp.h:195: error: invalid use of incomplete type 'struct JSObject'
      /Users/runpac/dev/spidermonkey_release/include/js/jspubtd.h:144: error: forward declaration of 'struct JSObject'

      js/jsregexp.h included from engine_spidermonkey.h is missing a few symbols located in js/jsobj.h

      I managed to compile everything with this simple fix:

      diff --git a/scripting/engine_spidermonkey.h b/scripting/engine_spidermonkey.h
      index 46ac71a..6799b99 100644
      — a/scripting/engine_spidermonkey.h
      +++ b/scripting/engine_spidermonkey.h
      @@ -34,6 +34,7 @@

      #include "js/jsapi.h"
      #include "js/jsdate.h"
      +#include "js/jsobj.h"
      #include "js/jsregexp.h"

      #endif

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            metagoto metagoto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: