[CXX-1595] GNU 4.9.3: 'max_align_t' was not declared Created: 08/Jun/18  Updated: 28/Oct/23  Resolved: 17/Sep/18

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 3.4.0

Type: Bug Priority: Minor - P4
Reporter: Ross Altman Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
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!



 Comments   
Comment by Githook User [ 17/Sep/18 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: CXX-1595 Don't rely on max_align_t in test
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/decf09431fcd912ba3d0ba968ef5d6970aa29263

Comment by Ross Altman [ 03/Aug/18 ]

Since the error occurred in one of the tests, I managed to bypass the issue by just commenting out that particular test and got the code to compile. The issue itself is still there though.

Comment by A. Jesse Jiryu Davis [ 02/Aug/18 ]

Thanks for the report, can you please tell me if you're still having trouble with this issue?

Generated at Wed Feb 07 22:03:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.