-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Minor - P4
-
None
-
Affects Version/s: 1.8.2
-
Component/s: Build
-
None
-
Environment:LSB Version: :core-4.0-amd64:core-4.0-noarch
Distributor ID: Fedora
Description: Fedora release 15 (Lovelock)
Release: 15
Codename: Lovelock
-
Linux
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
I was able to build mongodb from source on Fedora 13 with "scons all". On Fedora 15 I got:
scons: Reading SConscript files ...
scons version: 2.0.1
python version: 2 7 1 'final' 0
Checking whether the C++ compiler worksyes
Checking for C library stdc++... yes
Checking for C++ header file pcrecpp.h... yes
Checking for C++ header file boost/filesystem/operations.hpp... yes
Checking for C library boost_system-mt... yes
Checking for C library boost_thread-mt... yes
Checking for C library boost_filesystem-mt... yes
Checking for C library boost_program_options-mt... yes
Checking for C++ header file execinfo.h... yes
Checking for C library pcrecpp... yes
Checking for C library pcre... yes
Checking for C library pcap... yes
Checking for C library mozjs... yes
Checking for C header file mozjs/jsapi.h... no
Checking for C header file jsapi.h... no
no spider monkey headers!
So I did
cd /usr/include/
ln -s js mozjs
and got around that problem but compilation failed later with
g++ -o scripting/engine_spidermonkey.o -c -Wnon-virtual-dtor -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror -fno-builtin-memcmp -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -DXP_UNIX -I. scripting/engine_spidermonkey.cpp
In file included from /usr/include/js/jsobj.h:63:0,
from scripting/engine_spidermonkey.h:52,
from scripting/engine_spidermonkey.cpp:19:
/usr/include/js/jslock.h:47:21: fatal error: pratom.h: No such file or directory
compilation terminated.
praton.h does exist:
[root@jks-desktop /usr/include]
{f13}# find . -name pratom.h
./nspr4/pratom.h
I was able to get around these problems by symlinking a bunch of files from the nspr4 directory into the js directory, but in the end:
/usr/include/js/jsvector.h:166:69: error: 'mongo::ourrealloc' is not a member of 'js::Vector<int, 20ul, js::SystemAllocPolicy>'
In file included from scripting/engine_spidermonkey.cpp:1650:0:
scripting/sm_db.cpp: In function 'bool mongo::isDate(JSContext*, JSObject*)':
scripting/sm_db.cpp:1158:5: error: control reaches end of non-void function [-Werror=return-type]
cc1plus: all warnings being treated as errors
scons: *** [scripting/engine_spidermonkey.o] Error 1
scons: building terminated because of errors.
In the end I built spidermonkey myself and was then able to build mongodb