Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-4215

Fix RHEL 6 and RHEL 7 compilation error

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.20.0
    • Affects Version/s: None
    • Component/s: None

      The RHEL 6.2 and RHEL 7.0 variants are fail to compile.

      Example RHEL 6.2 task

      [2021/10/19 23:31:30.573] /data/mci/7696425ba0c6802e5c23cccbd8ebd165/mongoc/src/libbson/src/bson/bson-atomic.h:73:34: error: invalid memory model for '__atomic_exchange'
      [2021/10/19 23:31:30.573]              return GNU_Intrinsic (__VA_ARGS__, __ATOMIC_CONSUME);)           \
      

      Example RHEL 7.0 task

      [2021/10/19 21:18:03.766] /data/mci/59b2248601bd4e33cb7c71d13d497583/mongoc/src/libbson/src/bson/bson-atomic.h:51:61: warning: anonymous variadic macros were introduced in C99
      [2021/10/19 21:18:03.767] /data/mci/59b2248601bd4e33cb7c71d13d497583/mongoc/src/libbson/src/bson/bson-atomic.h: In function 'bson_atomic_int8_fetch_add':
      [2021/10/19 21:18:03.767] /data/mci/59b2248601bd4e33cb7c71d13d497583/mongoc/src/libbson/src/bson/bson-atomic.h:296: warning: implicit declaration of function '__atomic_fetch_add'
      [2021/10/19 21:18:03.767] /data/mci/59b2248601bd4e33cb7c71d13d497583/mongoc/src/libbson/src/bson/bson-atomic.h:296: error: '__ATOMIC_ACQ_REL' undeclared (first use in this function)
      [2021/10/19 21:18:03.767] /data/mci/59b2248601bd4e33cb7c71d13d497583/mongoc/src/libbson/src/bson/bson-atomic.h:296: error: (Each undeclared identifier is reported only once
      [2021/10/19 21:18:03.767] /data/mci/59b2248601bd4e33cb7c71d13d497583/mongoc/src/libbson/src/bson/bson-atomic.h:296: error: for each function it appears in.)
      [2021/10/19 21:18:03.767] /data/mci/59b2248601bd4e33cb7c71d13d497583/mongoc/src/libbson/src/bson/bson-atomic.h:296: error: '__ATOMIC_SEQ_CST' undeclared (first use in this function)
      [2021/10/19 21:18:03.767] /data/mci/59b2248601bd4e33cb7c71d13d497583/mongoc/src/libbson/src/bson/bson-atomic.h:296: error: '__ATOMIC_ACQUIRE' undeclared (first use in this function)
      [2021/10/19 21:18:03.767] /data/mci/59b2248601bd4e33cb7c71d13d497583/mongoc/src/libbson/src/bson/bson-atomic.h:296: error: '__ATOMIC_CONSUME' undeclared (first use in this function)
      [2021/10/19 21:18:03.767] /data/mci/59b2248601bd4e33cb7c71d13d497583/mongoc/src/libbson/src/bson/bson-atomic.h:296: error: '__ATOMIC_RELEASE' undeclared (first use in this function)
      [2021/10/19 21:18:03.767] /data/mci/59b2248601bd4e33cb7c71d13d497583/mongoc/src/libbson/src/bson/bson-atomic.h:296: error: '__ATOMIC_RELAXED' undeclared (first use in this function)
      [2021/10/19 21:18:03.767] /data/mci/59b2248601bd4e33cb7c71d13d497583/mongoc/src/libbson/src/bson/bson-atomic.h: In function 'bson_atomic_int8_fetch_sub':
      [2021/10/19 21:18:03.767] /data/mci/59b2248601bd4e33cb7c71d13d497583/mongoc/src/libbson/src/bson/bson-atomic.h:296: warning: implicit declaration of function '__atomic_fetch_sub'
      

            Assignee:
            roberto.sanchez@mongodb.com Roberto Sanchez
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: