Build system makes wrong assumptions about spidermonkey

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Build
    • None
    • Environment:
      Debian, Ubuntu
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The following is a bug in the Debian bug tracking system, but it appears to be more upstream than just Debian? I'm putting it here so you don't need to monitor two bug tracking systems. I've read on the mongodb-user mailing list about some of the hardships of libjs on this distribution.

      Original link:
      http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572870

      From: Mike Hommey <mh+reportbug@glandium.org>
      To: Debian Bug Tracking System <submit@bugs.debian.org>
      Subject: mongodb: Build system makes wrong assumptions about spidermonkey
      Date: Sun, 07 Mar 2010 11:18:27 +0100
      Package: mongodb
      Severity: normal

      The build system make assumptions that are only valid on ubuntu systems,
      and are most probably wrong anywhere else.

      For example, it assumes that if the headers are found in
      /usr/include/mozjs, they are those of an old spidermonkey version.
      This is plain wrong.

      The rpath to /usr/lib*/xulrunner-1.9.1 is also pointless on Debian
      systems.

      Anyways, on Debian systems, you can build without xulrunner-dev, but
      only libmozjs-dev, if you can get rid of these wrong assumptions.

      e.g. with the following gross hack, it builds fine with libmozjs-dev
      instead of xulrunner-dev, and doesn't get a useless rpath:

      (IMHO, the proper fix would be to use the pkg-config information for
      mozilla-js, falling back to using js-config (provided by upstream
      standalone tracemonkey), and get the version information and proper
      include directory from there)

      — mongodb-1.2.2.orig/scripting/engine_spidermonkey.h
      +++ mongodb-1.2.2/scripting/engine_spidermonkey.h
      @@ -47,10 +47,10 @@

      #else

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

      #endif

      @@ -76,9 +76,8 @@
      #define SM18
      #endif

      -#ifdef XULRUNNER
      #define SM181
      -#endif
      +#define XULRUNNER

      namespace mongo {

      – System Information:
      Debian Release: squeeze/sid
      APT prefers unstable
      APT policy: (500, 'unstable'), (1, 'experimental')
      Architecture: amd64 (x86_64)

      Kernel: Linux 2.6.31-1-amd64 (SMP w/2 CPU cores)
      Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
      Shell: /bin/sh linked to /bin/bash

            Assignee:
            Eliot Horowitz (Inactive)
            Reporter:
            Evan Wies
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: