mongodb/mongo — pull request #306 by kimuraw (2012-09-24 14:29:53+00:00)
Title: Fix scons option "use-system-sm" does not work correctly

1. XP_UNIX, ... should be defined for both of use-system-sm and not (src/third_party/SConscript)
2. scripting engine should link to shim_spidermonkey, not libjs.a (src/mongo/SConscript)

error messages:

1. XP_UNIX, ... should be defined for both of use-system-sm and not (src/third_party/SConscript)

$ scons --use-system-sm --extralib=js
:
ar rc build/darwin/cpppath__opt_local_include_js/extralib_js/use-system-sm/m
ongo/libmongodandmongos.a build/darwin/cpppath__opt_local_include_js/extrali
b_js/use-system-sm/mongo/db/connection_factory.o build/darwin/cpppath__opt_l
ocal_include_js/extralib_js/use-system-sm/mongo/util/net/message_server_port
.o
In file included from src/third_party/js-1.7/jspubtd.h:45,
from src/third_party/js-1.7/jsapi.h:47,
from src/mongo/scripting/engine_spidermonkey.h:32,
from src/mongo/scripting/engine_spidermonkey.cpp:20:
src/third_party/js-1.7/jstypes.h:248:6: error: #error "Must define one of XP
_BEOS, XP_OS2, XP_WIN or XP_UNIX"
src/third_party/js-1.7/jstypes.h:264:2: error: #error No suitable type for J
SInt8/JSUint8
src/third_party/js-1.7/jstypes.h:277:2: error: #error No suitable type for J
SInt16/JSUint16
:
scons: *** [build/darwin/cpppath__opt_local_include_js/extralib_js/use-syste
m-sm/mongo/scripting/engine_spidermonkey.o] Error 1
scons: building terminated because of errors.

2. scripting engine should link to shim_spidermonkey, not libjs.a (src/mongo/SConscript)

$ scons --use-system-sm --extralib=js
:
scons: *** [build/darwin/cpppath__opt_local_include_js/extralib_js/use-syste
m-sm/mongo/mongod] Implicit dependency `src/third_party/js-1.7/libjs.a' not
found, needed by target `build/darwin/cpppath__opt_local_include_js/extralib
_js/use-system-sm/mongo/mongod'.
scons: building terminated because of errors.