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

GNU 4.9.3: 'max_align_t' was not declared

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

      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!

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            knowbodynos Ross Altman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: