Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-21252

Enable building on Linux s390x

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Build
    • None
    • Fully Compatible
    • Linux

      This issue describes a number of changes that are needed to allow building MongoDB on Linux s390x.

      1. We need to add an extra list to the definition of processor_macros in SConstruct:

      processor_macros = {
          ...
          's390x' : ['__s390x__'],
      }
      

      The definitions of the arrays inside the hash should be delimited with square brackets (as above), rather than parentheses.

      2. SConstruct also needs to export the "endian" option, as it will be used in the third_party source files.

      3. src/mongo/db/db.cpp still contains a check against big-endian systems around line 877; that needs to be removed.

      4. src/mongo/platform/bits.h needs to check for _s390x_ when #define-ing MONGO_PLATFORM_64.

      5. src/third_party/snappy-1.1.2/SConscript and src/third_party/wiredtiger/SConscript both need to import the "endian" option and append 'WORDS_BIGENDIAN' to CPPDEFINES if its value is "big".

      6. src/third_party/wiredtiger/src/include/gcc.h needs to define WT_PAUSE() and WT_FULL_BARRIER(), etc. when _s390x_ is defined.

      7. src/third_party/wiredtiger/src/support/global.c contains a check against big-endian systems around line 45; that needs to be removed.

      8. src/third_party/mozjs-38/platform/s390x/linux/build/ needs to be populated with files to support a Spidermonkey build on s390x.

      9. We need to add a big-endian fix to src/third_party/murmurhash3/MurmurHash3.cpp from upstream (https://github.com/hideo55/node-murmurhash3/).

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            bryanpkc Bryan Chan
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: