Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major - P3 Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: 1.8.0
    • Fix Version/s: None
    • Component/s: JavaScript
    • Labels:
      None
    • Environment:
      Mandriva Linux
    • Backport:
      No
    • # Replies:
      7
    • Last comment by Customer:
      false

      Activity

      Hide
      Thomas Dziedzic
      added a comment - - edited

      archlinux maintainer here,
      It would be nice to have this get more priority.

      1.8.5 has been released more then a month ago, and we're currently looking into moving to (spidermonkey) js 1.8.5 soon

      edit: Applying the above patch still fails for me:
      g++ -o scripting/engine_spidermonkey.o -c -Wnon-virtual-dtor -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -fno-builtin-memcmp -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -DXP_UNIX -DHAVE_COMPARTMENTS -DHAVE_JS_GET_STRING_CHARS_AND_LENGTH -DJS_NEW_REG_EXP_OBJECT_NO_STATISTICS -I. scripting/engine_spidermonkey.cpp
      In file included from /usr/include/js/jsobj.h:63:0,
      from scripting/engine_spidermonkey.h:55,
      from scripting/engine_spidermonkey.cpp:19:
      /usr/include/js/jslock.h:47:21: fatal error: pratom.h: No such file or directory

      The patch is incomplete.

      mandriva patches their mongodb sconstruct file to read CPPFLAGS from the environment and they add export CPPFLAGS="`pkg-config --cflags mozjs185`" to the spec file.
      This needs to get fixed in the upstream mongodb sconstruct file!

      Show
      Thomas Dziedzic
      added a comment - - edited archlinux maintainer here, It would be nice to have this get more priority. 1.8.5 has been released more then a month ago, and we're currently looking into moving to (spidermonkey) js 1.8.5 soon edit: Applying the above patch still fails for me: g++ -o scripting/engine_spidermonkey.o -c -Wnon-virtual-dtor -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -fno-builtin-memcmp -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -DXP_UNIX -DHAVE_COMPARTMENTS -DHAVE_JS_GET_STRING_CHARS_AND_LENGTH -DJS_NEW_REG_EXP_OBJECT_NO_STATISTICS -I. scripting/engine_spidermonkey.cpp In file included from /usr/include/js/jsobj.h:63:0, from scripting/engine_spidermonkey.h:55, from scripting/engine_spidermonkey.cpp:19: /usr/include/js/jslock.h:47:21: fatal error: pratom.h: No such file or directory The patch is incomplete. mandriva patches their mongodb sconstruct file to read CPPFLAGS from the environment and they add export CPPFLAGS="`pkg-config --cflags mozjs185`" to the spec file. This needs to get fixed in the upstream mongodb sconstruct file!
      Hide
      Thomas Dziedzic
      added a comment -

      This is a more proper patch to include mozjs185 support.
      https://gist.github.com/1064953 just apply it after applying mandriva's

      Show
      Thomas Dziedzic
      added a comment - This is a more proper patch to include mozjs185 support. https://gist.github.com/1064953 just apply it after applying mandriva's
      Hide
      Thomas Dziedzic
      added a comment -

      Another side note, the output of "pkg-config --cflags --libs mozjs185" is:
      -I/usr/include/js -I/usr/include/nspr -lmozjs185 -lplds4 -lplc4 -lnspr4 -lpthread -ldl

      Show
      Thomas Dziedzic
      added a comment - Another side note, the output of "pkg-config --cflags --libs mozjs185" is: -I/usr/include/js -I/usr/include/nspr -lmozjs185 -lplds4 -lplc4 -lnspr4 -lpthread -ldl
      Hide
      Thomas Dziedzic
      added a comment -

      also another side note, mozjs185 doesn't support utf8 so when starting mongo, it will give off a warning that spidermonkey doesn't support utf8

      related BR for archlinux:
      https://bugs.archlinux.org/task/25066
      FS#25066 - js lib compiled without UTF8 support

      Show
      Thomas Dziedzic
      added a comment - also another side note, mozjs185 doesn't support utf8 so when starting mongo, it will give off a warning that spidermonkey doesn't support utf8 related BR for archlinux: https://bugs.archlinux.org/task/25066 FS#25066 - js lib compiled without UTF8 support
      Hide
      Thomas Dziedzic
      added a comment -

      another thing to point out:
      https://bugzilla.mozilla.org/show_bug.cgi?id=628723#c48

      latest js supports unicode, but the new way to support them is through a function call before initializing the api, see above link for details on how to turn on unicode for js strings.

      Show
      Thomas Dziedzic
      added a comment - another thing to point out: https://bugzilla.mozilla.org/show_bug.cgi?id=628723#c48 latest js supports unicode, but the new way to support them is through a function call before initializing the api, see above link for details on how to turn on unicode for js strings.
      Hide
      Chris Lalancette
      added a comment -

      We are carrying a similar patch in Fedora to get MongoDB 1.8.2 to build there. It would be nice to get this fixed in the upstream sources.

      Show
      Chris Lalancette
      added a comment - We are carrying a similar patch in Fedora to get MongoDB 1.8.2 to build there. It would be nice to get this fixed in the upstream sources.
      Hide
      Eliot Horowitz
      added a comment -

      As of 2.0.0-rc0 the mongo sources include spidermonkey 1.7.0 which is the version we want to use for now.
      This should mean no patches are needed for any system.

      In 2.2, we're likely moving to v8.

      Show
      Eliot Horowitz
      added a comment - As of 2.0.0-rc0 the mongo sources include spidermonkey 1.7.0 which is the version we want to use for now. This should mean no patches are needed for any system. In 2.2, we're likely moving to v8.

        People

        • Votes:
          3 Vote for this issue
          Watchers:
          3 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:
            Days since reply:
            2 years, 33 weeks, 2 days ago
            Date of 1st Reply: