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

Support gcc 4.8.5 and build in Evergreen

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 3.11.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • C Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Scope:

      Support gcc 4.8.5 and build in Evergreen

      • Fix build with gcc 4.8.5
      • Add tasks to build in Evergreen with gcc 4.8.5.

      Background & Motivation:

      Building C++ driver r3.10.1 with gcc 4.8.5 results in compiler errors:

      /root/mongo-cxx-driver/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/string_view.hpp:571:45: error: redeclaration 'bsoncxx::v_noabi::stdx::basic_string_view<Char, Traits>::npos' differs in 'constexpr'
      const std::size_t basic_string_view<C, Tr>::npos;
                                                  ^
      /root/mongo-cxx-driver/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/string_view.hpp:136:32: error: from previous declaration 'bsoncxx::v_noabi::stdx::basic_string_view<Char, Traits>::npos'
          static constexpr size_type npos = static_cast<size_type>(-1);
      
      /root/mongo-cxx-driver/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/json.hpp:83:42: error: missing space between '""' and suffix identifier
      BSONCXX_API document::value BSONCXX_CALL operator""_bson(const char* json, size_t len);
      

      Errors were produced on the rhel-70-large host on Evergreen.

      Support for gcc 4.8.5 is requested to support building with the gcc on RHEL 7.9. See slack thread.

      This patch appears to fix the build for r3.10.1: https://gist.github.com/kevinAlbs/1bd5cac64285a693efb054b11600ebe7

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: