fatal error: js-config.h: No such file or directory

1,965 views
Skip to first unread message

Rudra H

unread,
Jul 21, 2015, 10:42:17 AM7/21/15
to mongo...@googlegroups.com
OS: RHEL 7.1
Arch: ppc64le
Affects: MongoDB ver 3.1.6 / js engine = mozjs 

Error log:

 -DBOOST_THREAD_HAS_NO_EINTR_BUG -Isrc/third_party/s2 -Isrc/third_party/pcre-8.37 -Isrc/third_party/boost-1.56.0 -Ibuild/opt -Isrc -Isrc/third_party/asio-asio-1-11-0/asio/include -Isrc/third_party/mozjs-38/include -Isrc/third_party/mozjs-38/mongo_sources -Isrc/third_party/mozjs-38/platform/PowerPC/linux/include src/mongo/scripting/mozjs/base.cpp
In file included from <command-line>:0:0:
/usr/include/stdc-predef.h:40:1: fatal error: js-config.h: No such file or directory
 #endif
 ^
compilation terminated.
scons: *** [build/opt/mongo/scripting/mozjs/base.o] Error 1
scons: building terminated because of errors.

Andrew Morrow

unread,
Jul 21, 2015, 11:01:04 AM7/21/15
to mongo...@googlegroups.com

Hi -

You will need to generate configurations for that platform. I've emailed you directly with draft instructions.

Thanks,
Andrew


--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-dev...@googlegroups.com.
To post to this group, send email to mongo...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-dev.
For more options, visit https://groups.google.com/d/optout.

ste...@yuras.nl

unread,
Sep 26, 2015, 8:41:01 PM9/26/15
to mongodb-dev
Hello,

I've got the same error on Ubuntu 14.04, architecture is ARMv7L

$ uname -h
Linux yuras-mongo-one 3.2.34-30 #17 SMP Mon Apr 13 15:53:45 UTC 2015 armv7l armv7l armv7l GNU/Linux

Could you post the instructions for generating the configuration online?

Cheers,
Stephan

Andrew Morrow

unread,
Oct 15, 2015, 2:10:33 PM10/15/15
to mongodb-dev

Please be aware of the following important caveat: you are building for an unsupported architecture. The WiredTiger storage engine won't run there (it requires 64-bit), and MMAPv1 is limited to only 1-2 GB of data on 32-bit, total, depending on whether you are running journaling, and we currently only support x86. So, please understand that 32-bit ARM will never be a supported configuration, and there are no assurances that the database will function correctly on such a platform. The configuration that you generate here will not be upstreamed or added to the main MongoDB sources.

Here is the basic process:

You should generate the configs on the oldest version of the operating system that you plan to be able to run on. This way, you don't pick up dependencies on newer facilities from libc that might not be present on the older system when SpiderMonkey runs its configure check.

Log into an appropriate system, and clone the mongodb master branch. Change directories into the clone, and cd into the src/third_party/mozjs-38 directory.

From here, run the script 'get_sources.sh'. This will download the complete mozilla 38 sources (it will take a few minutes), and untar them.

Next, run the script 'gen-config.sh'. This script takes two arguments. The first is the processor ID that the SCons build issues at the beginning (see the highlighted line here, for an example), and the second is the OS identifier, which should be 'linux'.

Assuming that all of the necessary utilities are in the correct place, running gen-config.sh should produce a new directory under src/third_party/mozjs-38/platform/ that contains several files. These are the generated configuration files which are needed to SpiderMonkey on this platform. You should check those files into your branch, and you should now be able to build with SpiderMonkey. You can then delete the src/third_party/mozjs-38/mozilla-release/ directory and the src/third_party/mozjs-38/firefox-38.0.1esr.source.tar.bz2 file that were created by get_sources.sh.

This should get you the configs, but please be aware, again, that non-x86 platforms are entirely unsupported and untested, and that 32-bit platforms are extremely limited (and in fact are deprecated on the master branch).

Thanks,
Andrew

Septian Wibisono

unread,
Dec 7, 2015, 11:22:57 PM12/7/15
to mongodb-dev
I have the same condition. i need to build mongodb on ppc64le with RHEL 7.1. Please share the instruction to group, so everybody with same case will be helped.

thank you.

Andrew Morrow

unread,
Dec 9, 2015, 9:13:24 AM12/9/15
to mongodb-dev

Hi - 

The instructions were posted in this thread previously. Please see https://groups.google.com/d/msg/mongodb-dev/G-kGjZEEam0/VSVB9fYCBAAJ

Please also note the important caveat that the platform you are building for is untested and unsupported.

Thanks,
Andrew

Reply all
Reply to author
Forward
0 new messages