[SERVER-21252] Enable building on Linux s390x Created: 02/Nov/15  Updated: 09/Dec/15  Resolved: 09/Dec/15

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

Type: Bug Priority: Major - P3
Reporter: Bryan Chan Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-21819 Add extra list to the definition of p... Closed
is duplicated by SERVER-21820 Export "endian" option from SConstruct Closed
is duplicated by SERVER-21821 Remove big-endian check in db.cpp Closed
is duplicated by SERVER-21822 Add check for s390x in bits.h Closed
is duplicated by SERVER-21827 Spidermonkey build support on s390x Closed
is duplicated by SERVER-21830 Import the edit "endian" option in SC... Closed
is duplicated by WT-2277 Remove WT check against big-endian sy... Closed
is duplicated by WT-2279 Define WT_PAUSE(), WT_FULL_BARRIER(),... Closed
is duplicated by SERVER-21828 big-endian fix for MurmurHash3.cpp Closed
Related
related to SERVER-21465 FTS index key version 2 is not endian... Closed
Backwards Compatibility: Fully Compatible
Operating System: Linux
Participants:

 Description   

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/).



 Comments   
Comment by Crystal Horn [ 09/Dec/15 ]

Hi bryanpkc the tickets have been broken out and are linked in the "Issue Links" section.

Comment by Ramon Fernandez Marina [ 06/Nov/15 ]

Hi bryanpkc, in general is best to open one ticket per issue so they can be scheduled in parallel. I'll break down the issues above into SERVER and WT tickets as needed early next week.

Comment by Bryan Chan [ 06/Nov/15 ]

Should I open a WT ticket for the required WiredTiger changes?

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