在ubuntu 10.04上编译MongoDB r2.0.2导致错误

时间:2012-01-05 10:39:04

标签: mongodb compiler-errors ubuntu-10.04

我正在使用来自http://www.mongodb.org/display/DOCS/Building+for+Linux

的说明从源代码编译MongoDB

我在运行“scons all”之后遇到了这个错误:

rty/js-1.7/jsscan.c
third_party/js-1.7/jsscan.c:112:22: error: jsautokw.h: No such file or directory
third_party/js-1.7/jsscan.c: In function 'FindKeyword':
third_party/js-1.7/jsscan.c:122: warning: label 'test_guess' defined but not used
third_party/js-1.7/jsscan.c:119: warning: label 'got_match' defined but not used
scons: *** [third_party/js-1.7/jsscan.o] Error 1
scons: building terminated because of errors

我在64位ubuntu 10.04上。 gcc版本4.4.3(Ubuntu 4.4.3-4ubuntu5),scons版本是:

script: v1.2.0.d20100117.r4629, 2010/01/17 22:23:21, by scons on scons-dev
engine: v1.2.0.d20100117.r4629, 2010/01/17 22:23:21, by scons on scons-dev

有没有人有同样的问题?在早期版本中为此jsscan文件报告了类似的错误,但自那以后一直在修复。

2 个答案:

答案 0 :(得分:4)

老兄,它有效!这样做:

sudo apt-get remove xulrunner-1.9.2-dev xulrunner-1.9.2
curl -O ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
tar zxvf js-1.7.0.tar.gz
cd js/src
export CFLAGS="-DJS_C_STRINGS_ARE_UTF8"
make -f Makefile.ref
sudo JS_DIST=/usr make -f Makefile.ref export

然后再次运行scons all

答案 1 :(得分:4)

无需卸载“xulrunner-1.9.2-dev”和“xulrunner-1.9.2”,因为它还会卸载您稍后可能需要的其他软件包。 只需安装较新版本的scons软件包(我用它为scons-2.1.0)。

  1. 下载scons-2.1.0.tar.gz
  2. 安装它并使用已安装的代替Ubuntu 10.04的scons v1.2.0存储库软件包。
  3. 它没有任何额外的技巧,对我有用。