Skip to content

How to build MongoDB on Linux on System Z

Joran Siu edited this page Jul 9, 2014 · 5 revisions

To build MongoDB on Linux on System Z:

  1. Get 31-bit / 64-bit libv8.so, and install them into the normal system locations, usually under /usr/lib or /usr/lib64. Follow the instructions here to build the library: Building libv8.so library

  2. Clone the latest MongoDB fork from PPC, which includes changes for big-endian platforms. As of July 9, 2014, we recommend you get the branch r2.4.9-ppc, as the 2.6.1 branch has not been made big-endian aware.

     git clone https://github.com/ibmsoe/mongo
     git fetch
     git checkout -b r2.4.9-ppc remotes/origin/r2.4.9-ppc
    
  3. Building MongoDB requires SCons, which can be downloaded and installed from SCons 2.3.1 Downloads

  4. Copy the matching header files from your v8z/include directory into mongo/src. In order to use libv8.so, mongo requires the corresponding v8 headers for the API interfaces.

  5. In the mongo directory, execute the following to build:

31-bit:

	scons --31 --usev8 --use-system-v8 all

64-bit:

	scons --64 --usev8 --use-system-v8 all

You can replace 'all' with specific binaries you are interested in building (i.e. mongod).