[SERVER-3400] Cannot build mongodb from source on Fedora 15 (spidermonkey header problem) Created: 09/Jul/11  Updated: 11/Jul/11  Resolved: 11/Jul/11

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

Type: Bug Priority: Minor - P4
Reporter: Joseph Shraibman Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

LSB Version: :core-4.0-amd64:core-4.0-noarch
Distributor ID: Fedora
Description: Fedora release 15 (Lovelock)
Release: 15
Codename: Lovelock


Operating System: Linux
Participants:

 Description   

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



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

See SERVER-2887

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