[CXX-2358] Compilation failure (tests) with glibc 2.34 Created: 24/Aug/21  Updated: 28/Oct/23  Resolved: 07/Apr/22

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 3.7.0, 3.7.0-beta1, 3.6.7

Type: Bug Priority: Major - P3
Reporter: Laurent Stacul Assignee: Jesse Williamson (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Commit.png    
Issue Links:
Duplicate
is duplicated by CXX-2356 Compilation failure (tests) with glib... Closed
is duplicated by CXX-2353 Compilation failure (tests) with glib... Closed
is duplicated by CXX-2354 Compilation failure (tests) with glib... Closed
is duplicated by CXX-2355 Compilation failure (tests) with glib... Closed
is duplicated by CXX-2357 Compilation failure (tests) with glib... Closed
is duplicated by CXX-2420 Compile failure on Ubuntu-21.10 Closed

 Description   

Hello,

We are compiling the MongoDB C++ driver with gcc 11.2.1 and glibc 2.34. We have the following error:

In file included from /opt/1A/toolchain/x86_64-v21.0.26/include/signal.h:328,
 from /home/jenkins/workspace/b-libmongocxxdriver_release_21.1/BUILD/mongo-cxx-driver-r3.6.5/src/third_party/catch/include/catch.hpp:8034,
 from /home/jenkins/workspace/b-libmongocxxdriver_release_21.1/BUILD/mongo-cxx-driver-r3.6.5/src/third_party/catch/main.cpp:16:
/home/jenkins/workspace/b-libmongocxxdriver_release_21.1/BUILD/mongo-cxx-driver-r3.6.5/src/third_party/catch/include/catch.hpp:10822:58: error: call to non-'constexpr' function 'long int sysconf(int)'
10822 | static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
 | ^~~~~~~~~~~

I can see that the embedded version of Catch2 is 2.3.4 which suffers from this bug https://github.com/catchorg/Catch2/issues/2178 and is fixed in Catch2 2.3.5 (see https://github.com/catchorg/Catch2/commit/8f277a54c0b9c1d1024dedcb2dec1d206971e745).

Can you update the version of Catch2 to latest ?

Regards,



 Comments   
Comment by Niclas Johansson [ 22/Apr/22 ]

"As a workaround, consider configuring C++ driver with -DENABLE_TESTS=OFF to disable building test targets."

CMake Warning:
  Manually-specified variables were not used by the project:
 
 
    ENABLE_TESTS 

I couldn't get the workaround to fly.

Comment by Kevin Albertson [ 07/Apr/22 ]

oliver.nemcek@gmail.com thank you for flagging. I agree the linked commit was not included in 3.6.0 and was not backported to the releases/v3.6 branch.

I have cherry-picked onto the releases/v3.6 branch as part of this commit. It will be included in an upcoming 3.6.7 release.

As a workaround, consider configuring C++ driver with -DENABLE_TESTS=OFF to disable building test targets.

Comment by Oliver Nemček [ 01/Mar/22 ]

The commit was created after 3.6.6 was released. It is not included in 3.6.x release. See tags reported by GitHub:

Comment by Jesse Williamson (Inactive) [ 28/Feb/22 ]

oliver.nemcek@gmail.com As far as I can see, Catch2 2.13.7 is the current version provided by master on GitHub, and was included in 3.6.0:
https://github.com/mongodb/mongo-cxx-driver/releases

I hope that helps!

Comment by Oliver Nemček [ 28/Feb/22 ]

Is this going to be released as a bugfix of 3.6 release? I can't build any production release on my Arch with {glibc 2.35}} and 3.7 is in beta for a while without any ETA for a proper release.

Comment by Backlog - Core Eng Program Management Team [ 17/Sep/21 ]

There hasn't been any recent activity on this ticket, so we're resolving it. Thanks for reaching out! Please feel free to comment on this if you're able to provide more information.

Comment by Jesse Williamson (Inactive) [ 02/Sep/21 ]

This file doesn't appear to be generated, so it was updated against the latest release on Catch2's GitHub page (2.1.37).

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