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

got "used vector type where scalar is required" when using GCC 7

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.3, 3.7.2
    • Affects Version/s: None
    • Component/s: Build
    • None
    • Fully Compatible
    • Linux
    • v3.6
    • Platforms 2018-01-29

      When compiling Mongo core components on a Power9 with GCC 7 (Advance Toolchain 11.02)
      Got following error,
      opt/at11.0/bin/gcc -o build/opt/third_party/wiredtiger/src/block/block_compact.o -c -std=c11 -fno-omit-frame-pointer -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -O2 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-const-variable -Wno-unused-but-set-variable -Wno-missing-braces -fstack-protector-strong -fno-builtin-memcmp -fPIE -DPCRE_STATIC -DNDEBUG -D_FORTIFY_SOURCE=2 -DBOOST_THREAD_VERSION=4 -DBOOST_THREAD_DONT_PROVIDE_VARIADIC_THREAD -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS -DBOOST_THREAD_HAS_NO_EINTR_BUG -DHAVE_VERBOSE -DHAVE_FALLOCATE -DHAVE_SYNC_FILE_RANGE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_BUILTIN_EXTENSION_ZLIB -DHAVE_BUILTIN_EXTENSION_SNAPPY -DHAVE_CRC32_HARDWARE -Isrc/third_party/snappy-1.1.3 -Isrc/third_party/zlib-1.2.8 -Ibuild/opt/third_party/wiredtiger -Isrc/third_party/wiredtiger -Ibuild/opt/third_party/wiredtiger/src/include -Isrc/third_party/wiredtiger/src/include -Ibuild/opt/third_party/wiredtiger/build_linux -Isrc/third_party/wiredtiger/build_linux src/third_party/wiredtiger/src/block/block_compact.c
      In file included from src/third_party/wiredtiger/src/include/wt_internal.h:384:0,
      from src/third_party/wiredtiger/src/async/async_api.c:9:
      src/third_party/wiredtiger/src/include/cursor.i: In function '__cursor_func_init':
      src/third_party/wiredtiger/src/include/cursor.i:234:6: error: used vector type where scalar is required
      if (reenter) {
      ^~~~~~~
      In file included from src/third_party/wiredtiger/src/include/btree_cmp.i:11:0,
      from src/third_party/wiredtiger/src/include/wt_internal.h:382,
      from src/third_party/wiredtiger/src/async/async_op.c:9:

      The reason of this is that gcc used -DHAVE_X86INTRIN_H which was generated by
      ====================================================================================
      ./src/third_party/wiredtiger/SConscript

      if conf.CheckCHeader('x86intrin.h'):
      conf.env.Append(CPPDEFINES=[
      "HAVE_X86INTRIN_H"
      ])

      =====================================================================================
      I was told GCC 7 and later version will have the file, x86intrin.h, included, is there a way we could avoid it if the target platform is not x86?

      Thanks

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            calvins@us.ibm.com Calvin Sze
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: