Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-2900

Add ARM8 build support to WiredTiger and fix ARM CRC assembler tags

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.9.0, 3.2.10, 3.3.14
    • Labels:
      None
    • # Replies:
      12
    • Last comment by Customer:
      true

      Description

      Alexander Gorrod comments in WT-2882:

      I just tried an Evergreen patch build with the latest WiredTiger develop after the CRC branch was merged, and including the ARM Sconscript change. It's still encountering a compile problem on the ARM builder:

      https://evergreen.mongodb.com/task/mongodb_mongo_master_enterprise_ubuntu1604_arm64_compile_2d3d3d3a92e2b1549a638a6f06d8c408625a2287_16_09_08_07_07_24

      The particular errors are copied below. We are pushing to get master updated, so that we can get a set of changes in for the MongoDB 3.2 release next Monday. Would you mind digging into the failure during your day today?

       [2016/09/08 04:17:36.784] src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c: In function '__wt_checksum_hw':
       [2016/09/08 04:17:36.784] src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c:42:2: error: implicit declaration of function 'asm' [-Werror=implicit-function-declaration]
       [2016/09/08 04:17:36.784]   asm("crc32cb %w[c], %w[c], %w[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
       [2016/09/08 04:17:36.784]   ^
       [2016/09/08 04:17:36.784] src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c:63:3: note: in expansion of macro 'CRC32CB'
       [2016/09/08 04:17:36.784]    CRC32CB(crc, *p);
       [2016/09/08 04:17:36.784]    ^
       [2016/09/08 04:17:36.784] src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c:42:36: error: expected ')' before ':' token
       [2016/09/08 04:17:36.784]   asm("crc32cb %w[c], %w[c], %w[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
       [2016/09/08 04:17:36.785]                                     ^
       [2016/09/08 04:17:36.785] src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c:63:3: note: in expansion of macro 'CRC32CB'
       [2016/09/08 04:17:36.785]    CRC32CB(crc, *p);
       [2016/09/08 04:17:36.785]    ^
       [2016/09/08 04:17:36.785] src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c:36:36: error: expected ')' before ':' token
       [2016/09/08 04:17:36.785]   asm("crc32cx %w[c], %w[c], %x[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
       [2016/09/08 04:17:36.785]                                     ^
       [2016/09/08 04:17:36.785] src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c:69:3: note: in expansion of macro 'CRC32CX'
       [2016/09/08 04:17:36.785]    CRC32CX(crc, *p64);
       [2016/09/08 04:17:36.785]    ^
       [2016/09/08 04:17:36.785] src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c:42:36: error: expected ')' before ':' token
       [2016/09/08 04:17:36.785]   asm("crc32cb %w[c], %w[c], %w[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
       [2016/09/08 04:17:36.785]                                     ^
       [2016/09/08 04:17:36.785] src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c:76:3: note: in expansion of macro 'CRC32CB'
       [2016/09/08 04:17:36.785]    CRC32CB(crc, *p);
       [2016/09/08 04:17:36.785]    ^
       [2016/09/08 04:17:36.789] cc1: all warnings being treated as errors
       [2016/09/08 04:17:36.795] scons: *** [build/opt/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.o] Error 1
      

        Issue Links

          Activity

          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

          Message: Import wiredtiger: bb18c439152379fb528af217345be40819b01fc4 from branch mongodb-3.2

          ref: 911c940ada..bb18c43915
          for: 3.2.10

          WT-2859 Improve statistics macros to not collect stats when statistics=none is set
          WT-2894 Create workload that shows negative scaling when overwhelmed
          WT-2900 Add ARM8 build support to WiredTiger and fix ARM CRC assembler tags
          WT-2902 Enhance eviction to work better with update heavy YCSB load
          WT-2905 dead code: MongoDB Coverity #99881
          WT-2908 Add dry-run support to python unit-test
          WT-2910 test_inmem01 can abort due to stuck cache
          WT-2911 add support for gcc6
          WT-2912 make --enable-strict run on the zseries test box
          WT-2913 stuck cache after latest merge
          WT-2914 Fix link error on OS/X for checksum_init call
          WT-2916 whitespace check not working
          Branch: v3.2
          https://github.com/mongodb/mongo/commit/dfca65ea3a32b1e0c832ff7ee2d7b667819ec64d

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'} Message: Import wiredtiger: bb18c439152379fb528af217345be40819b01fc4 from branch mongodb-3.2 ref: 911c940ada..bb18c43915 for: 3.2.10 WT-2859 Improve statistics macros to not collect stats when statistics=none is set WT-2894 Create workload that shows negative scaling when overwhelmed WT-2900 Add ARM8 build support to WiredTiger and fix ARM CRC assembler tags WT-2902 Enhance eviction to work better with update heavy YCSB load WT-2905 dead code: MongoDB Coverity #99881 WT-2908 Add dry-run support to python unit-test WT-2910 test_inmem01 can abort due to stuck cache WT-2911 add support for gcc6 WT-2912 make --enable-strict run on the zseries test box WT-2913 stuck cache after latest merge WT-2914 Fix link error on OS/X for checksum_init call WT-2916 whitespace check not working Branch: v3.2 https://github.com/mongodb/mongo/commit/dfca65ea3a32b1e0c832ff7ee2d7b667819ec64d
          Hide
          lidi lidi added a comment -

          I encount the same problem when I build r3.4.0-rc3 on centos7 ARM8 with gcc 5.4.0

          Here's the error information:

          Compiling build/opt/third_party/wiredtiger/src/btree/row_modify.o
          Compiling build/opt/third_party/wiredtiger/src/btree/row_srch.o
          Compiling build/opt/third_party/wiredtiger/src/cache/cache_las.o
          Compiling build/opt/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.o
          Compiling build/opt/third_party/wiredtiger/src/checksum/software/checksum.o
          Compiling build/opt/third_party/wiredtiger/src/config/config.o
          Compiling build/opt/third_party/wiredtiger/src/config/config_api.o
          /tmp/ccu0HlDB.s: Assembler messages:
          /tmp/ccu0HlDB.s:34: Error: selected processor does not support `crc32cb w2,w2,w3'
          /tmp/ccu0HlDB.s:60: Error: selected processor does not support `crc32cx w2,w2,x4'
          /tmp/ccu0HlDB.s:81: Error: selected processor does not support `crc32cb w2,w2,w3'
          scons: *** [build/opt/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.o] Error 1
          Compiling build/opt/third_party/wiredtiger/src/config/config_check.o
          scons: building terminated because of errors.
          build/opt/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.o failed: Error 1

          Show
          lidi lidi added a comment - I encount the same problem when I build r3.4.0-rc3 on centos7 ARM8 with gcc 5.4.0 Here's the error information: Compiling build/opt/third_party/wiredtiger/src/btree/row_modify.o Compiling build/opt/third_party/wiredtiger/src/btree/row_srch.o Compiling build/opt/third_party/wiredtiger/src/cache/cache_las.o Compiling build/opt/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.o Compiling build/opt/third_party/wiredtiger/src/checksum/software/checksum.o Compiling build/opt/third_party/wiredtiger/src/config/config.o Compiling build/opt/third_party/wiredtiger/src/config/config_api.o /tmp/ccu0HlDB.s: Assembler messages: /tmp/ccu0HlDB.s:34: Error: selected processor does not support `crc32cb w2,w2,w3' /tmp/ccu0HlDB.s:60: Error: selected processor does not support `crc32cx w2,w2,x4' /tmp/ccu0HlDB.s:81: Error: selected processor does not support `crc32cb w2,w2,w3' scons: *** [build/opt/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.o] Error 1 Compiling build/opt/third_party/wiredtiger/src/config/config_check.o scons: building terminated because of errors. build/opt/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.o failed: Error 1
          Hide
          keith.bostic Keith Bostic added a comment -

          lidi, thank you for the comment – I'm traveling at the moment, but I'll take a look as soon as I get back.

          cc: Mark Benvenuto

          Show
          keith.bostic Keith Bostic added a comment - lidi , thank you for the comment – I'm traveling at the moment, but I'll take a look as soon as I get back. cc: Mark Benvenuto
          Hide
          mark.benvenuto Mark Benvenuto added a comment -

          The ARMv8 CRC32 instructions are optional ARMv8 ISA instructions. They require a compiler flag to enable so that the assembler recognizes them.

          Example

          ./configure CFLAGS="-march=armv8-a+crc -mtune=generic"
          

          WiredTiger will detect at runtime if you machine actually supports them and if your hardware does not, it will fallback to a software CRC32 implementation.

          See
          https://github.com/mongodb/mongo/blob/39d650faa5436a37359ca45717d5e988fb4461cb/etc/evergreen.yml#L3881
          https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gcc/ARM-Options.html#ARM-Options

          Show
          mark.benvenuto Mark Benvenuto added a comment - The ARMv8 CRC32 instructions are optional ARMv8 ISA instructions. They require a compiler flag to enable so that the assembler recognizes them. Example ./configure CFLAGS="-march=armv8-a+crc -mtune=generic" WiredTiger will detect at runtime if you machine actually supports them and if your hardware does not, it will fallback to a software CRC32 implementation. See https://github.com/mongodb/mongo/blob/39d650faa5436a37359ca45717d5e988fb4461cb/etc/evergreen.yml#L3881 https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gcc/ARM-Options.html#ARM-Options
          Hide
          lidi lidi added a comment -

          I import the patch '7d2acd6395ec84beca34718a75371bc11f0c9f60' for src/third_party/wiredtiger/SConscript , and it work well now.

          Show
          lidi lidi added a comment - I import the patch '7d2acd6395ec84beca34718a75371bc11f0c9f60' for src/third_party/wiredtiger/SConscript , and it work well now.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                31 weeks, 1 day ago
                Date of 1st Reply: