Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1595

GNU 4.9.3: 'max_align_t' was not declared

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Red Hat Enterprise Linux Server release 6.3 (Santiago) Cluster

      Description

      Hi all!

      I'm trying to compile the r3.2.0 release of the mongodb C++11 driver using GCC-4.9.3, but I keep getting the following error:

      ~/mongo-cxx-driver/src/mongocxx/test/pool.cpp: In lambda function:
      ~/mongo-cxx-driver/src/mongocxx/test/pool.cpp:150:16: error: 'max_align_t' was not declared in this scope
      {{ return max_align_t{};}}
      {{ ^}}
      ~/mongo-cxx-driver/src/mongocxx/test/pool.cpp:150:27: error: expected ';' before '{' token
      {{ return max_align_t{};}}
      {{ ^}}
      ~/mongo-cxx-driver/src/mongocxx/test/pool.cpp: In function 'void {anonymous}::____C_A_T_C_H____T_E_S_T____6()':
      ~/mongo-cxx-driver/src/mongocxx/test/pool.cpp:151:7: error: 'void dummy_address' has incomplete type
      {{ }();}}

      I've seen a similar error to this here: https://jira.mongodb.org/browse/CXX-865, but I am using a different compiler, and the fix to that bug is already implemented in my version.

      I've also seen the common issue with the <cstddef> header described here: https://gcc.gnu.org/gcc-4.9/porting_to.html, and I tried moving #include <cstddef> to the very top, and still no luck.

      Any help would be greatly appreciated!

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: