[SERVER-59459] mongodb fails to build with glibc-2.34 Created: 20/Aug/21  Updated: 29/Oct/23  Resolved: 08/Oct/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.4.8, 5.0.2
Fix Version/s: 5.2.0, 4.4.11, 4.2.18, 5.0.4, 5.1.0-rc2

Type: Bug Priority: Major - P3
Reporter: Tomas Mozes Assignee: Andrew Morrow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to SERVER-61433 Boost thread compilation warning with... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.1, v5.0, v4.4, v4.2, v4.0
Steps To Reproduce:
  • update to glibc 2.34
  • build mongodb server
Sprint: Dev Platform 2021-09-20, Dev Platform 2021-10-04, Dev Platform 2021-10-18
Participants:

 Description   

Building the server fails with:

                 from src/mongo/db/auth/authorization_session.h:39,
                 from src/mongo/s/commands/cluster_refine_collection_shard_key_cmd.cpp:34:
src/mongo/stdx/thread.h:110:56: error: call to non-‘constexpr’ function ‘long int sysconf(int)’
  110 |         std::max(kMongoMinSignalStackSize, std::size_t{MINSIGSTKSZ});
      |                                                        ^~~~~~~~~~~
In file included from /usr/include/boost/config/stdlib/libstdcpp3.hpp:78,
                 from /usr/include/boost/config.hpp:48,

 
This is due to changes in glibc-2.34 (https://sourceware.org/pipermail/libc-alpha/2021-August/129718.html):

* Add _SC_MINSIGSTKSZ and _SC_SIGSTKSZ.  When _DYNAMIC_STACK_SIZE_SOURCE
  or _GNU_SOURCE are defined, MINSIGSTKSZ and SIGSTKSZ are no longer
  constant on Linux.  MINSIGSTKSZ is redefined to sysconf(_SC_MINSIGSTKSZ) and SIGSTKSZ is redefined to sysconf (_SC_SIGSTKSZ).  This supports dynamic sized register sets for modern architectural features like Arm SVE. 

 

Downstream bug: https://bugs.gentoo.org/806773



 Comments   
Comment by Githook User [ 02/Nov/21 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-59459 With glibc-2.34, MINSIGSTKSZ is no longer a constant

(cherry picked from commit ef08d0dbc99db8c4620512e92bfb3154282eb5d3)
(cherry picked from commit 959d10ecad8f59dbbb755b2eebab2bffed6bab32)
(cherry picked from commit 167a957f8d4d71db7a3a720052ec72e5d68724f7)
(cherry picked from commit ddee85735f38dc77f233dc16840658c8764e65cb)
Branch: v4.2
https://github.com/mongodb/mongo/commit/8ddc9941280e8bf4a07082e9cc6889d944de4ae9

Comment by Githook User [ 20/Oct/21 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-59459 With glibc-2.34, MINSIGSTKSZ is no longer a constant

(cherry picked from commit ef08d0dbc99db8c4620512e92bfb3154282eb5d3)
(cherry picked from commit 959d10ecad8f59dbbb755b2eebab2bffed6bab32)
(cherry picked from commit 167a957f8d4d71db7a3a720052ec72e5d68724f7)
Branch: v4.4
https://github.com/mongodb/mongo/commit/ddee85735f38dc77f233dc16840658c8764e65cb

Comment by Githook User [ 19/Oct/21 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-59459 With glibc-2.34, MINSIGSTKSZ is no longer a constant

(cherry picked from commit ef08d0dbc99db8c4620512e92bfb3154282eb5d3)
(cherry picked from commit 959d10ecad8f59dbbb755b2eebab2bffed6bab32)
Branch: v5.0
https://github.com/mongodb/mongo/commit/167a957f8d4d71db7a3a720052ec72e5d68724f7

Comment by Githook User [ 19/Oct/21 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-59459 With glibc-2.34, MINSIGSTKSZ is no longer a constant

(cherry picked from commit ef08d0dbc99db8c4620512e92bfb3154282eb5d3)
Branch: v5.1
https://github.com/mongodb/mongo/commit/959d10ecad8f59dbbb755b2eebab2bffed6bab32

Comment by Andrew Morrow (Inactive) [ 08/Oct/21 ]

hydrapolic@gmail.com - I've committed a fix that should unblock this. Right now it is only on the master branch, but I've filed in the internal tickets to backport through to v4.4.

Comment by Githook User [ 07/Oct/21 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-59459 With glibc-2.34, MINSIGSTKSZ is no longer a constant
Branch: master
https://github.com/mongodb/mongo/commit/ef08d0dbc99db8c4620512e92bfb3154282eb5d3

Comment by Edwin Zhou [ 20/Aug/21 ]

Hi hydrapolic@gmail.com,

Thanks for your report. I've assigned this to the appropriate team to investigate the changes in glibc 2.34.

Best,
Edwin

Generated at Thu Feb 08 05:47:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.