[SERVER-1104] Build system makes wrong assumptions about spidermonkey Created: 08/May/10  Updated: 16/Jan/11  Resolved: 16/Jan/11

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Evan Wies Assignee: Eliot Horowitz (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Debian, Ubuntu


Participants:

 Description   

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



 Comments   
Comment by Eliot Horowitz (Inactive) [ 16/Jan/11 ]

going to start including more deps in source tree for simplicity

Comment by Eliot Horowitz (Inactive) [ 08/May/10 ]

I'm fairly sure that libmozjs is broken in various ways (no utf8 support for example) so using that will produce packages that are going to be broken in surprising ways to people.

we should verify before people start getting oddities.

i'm pretty sure the way we have it setup is correct - have spent a fair amount of time tweaking...

Generated at Thu Feb 08 02:56:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.