[SERVER-71491] Update setup_spawnhost_coredump script to specify boost_version for registering printers Created: 18/Nov/22  Updated: 29/Oct/23  Resolved: 21/Nov/22

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-57891 Update spawnhost setup script to use ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding NYC 2022-11-28
Participants:

 Description   

https://github.com/ruediger/Boost-Pretty-Printer auto-detection relies on compiling a C++ program using the system's version of boost. The system's version of boost is probably not the same version as the mongodb/mongo version (master is currently 1.79.0) and not all platforms have boost installed.

The newest boost version https://github.com/ruediger/Boost-Pretty-Printer verifies it supports is 1.73.0. However, we mostly rely on this repository for printing boost::optionals which hasn't changed its internal format since then anyway. Specifying boost_version=(1, 73, 0) should therefore be good enough for the Server team's purposes.



 Comments   
Comment by Githook User [ 19/Nov/22 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-71491 Turn off boost pretty printer auto-detection of version.
Branch: master
https://github.com/mongodb/mongo/commit/7b4192c7b52a08212d98cad49c68d1df78412761

Comment by Max Hirschhorn [ 18/Nov/22 ]

For example, on SLES 15 there is no system version of boost installed.

*** boost printers: Detecting boost_version...
/tmp/boost-printer-autodetect942urd3l/version.cpp:2:10: fatal error: boost/version.hpp: No such file or directory
 #include <boost/version.hpp>
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File "./Boost-Pretty-Printer/boost/utils.py", line 631, in register_printers
    boost_version = detect_boost_version()
  File "./Boost-Pretty-Printer/boost/detect_version.py", line 48, in detect_boost_version
    subprocess.check_call(cxx_command_line)
  File "/opt/mongodbtoolchain/revisions/ecdb6f23a2cc2e822b8dc2eeb3f04c31f25c66ce/stow/python3-v3.oxJ/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['c++', '-o', '/tmp/boost-printer-autodetect942urd3l/a.out', '/tmp/boost-printer-autodetect942urd3l/version.cpp']' returned non-zero exit status 1.
/home/ec2-user/.gdbinit:13: Error in sourced command file:
Error while executing Python code.

Generated at Thu Feb 08 06:19:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.