Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-68887

Can not build on the Ubuntu 22.04 LTS

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • Affects Version/s: 6.0.1
    • Component/s: None
    • Fully Compatible
    • ALL
    • Hide

      sudo apt install build-essential
      sudo apt install libcurl4-openssl-dev
      sudo apt install liblzma-dev
      sudo apt install libssl-dev
      python3 -m pip install -r etc/pip/compile-requirements.txt
      python3 buildscripts/scons.py install-mongod
       

      Show
      sudo apt install build-essential sudo apt install libcurl4-openssl-dev sudo apt install liblzma-dev sudo apt install libssl-dev python3 -m pip install -r etc/pip/compile-requirements.txt python3 buildscripts/scons.py install-mongod  

      according to https://github.com/mongodb/mongo/blob/master/docs/building.md

       

      the error report is:

       

      ```bash

      Compiling build/59f4f0dd/mongo/db/exec/sbe/values/value_printer.o
      In file included from build/59f4f0dd/mongo/base/error_codes.h:36,
                       from src/mongo/base/data_type.h:37,
                       from src/mongo/base/data_type_endian.h:35,
                       from src/mongo/db/exec/sbe/values/value.h:43,
                       from src/mongo/db/exec/sbe/values/value.cpp:32:
      In constructor 'mongo::StringData::StringData(const char*)',
          inlined from 'mongo::sbe::value::BsonRegex::BsonRegex(const char*)' at src/mongo/db/exec/sbe/values/value.h:1230:15,
          inlined from 'mongo::sbe::value::BsonRegex mongo::sbe::value::getBsonRegexView(mongo::sbe::value::Value)' at src/mongo/db/exec/sbe/values/value.h:1243:44,
          inlined from 'std::pair<mongo::sbe::value::TypeTags, long unsigned int> mongo::sbe::value::compareValue(mongo::sbe::value::TypeTags, mongo::sbe::value::Value, mongo::sbe::value::TypeTags, mongo::sbe::value::Value, const mongo::StringData::ComparatorInterface*)' at src/mongo/db/exec/sbe/values/value.cpp:728:41:
      src/mongo/base/string_data.h:82:68: error: 'size_t strlen(const char*)' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
         82 | ingData(const char* str) : StringData(str, str ? std::strlen(str) : 0) {}
            |                                                  ~~~~~~~~~~^~~~

      In constructor 'mongo::StringData::StringData(const char*)',
          inlined from 'mongo::sbe::value::BsonRegex::BsonRegex(const char*)' at src/mongo/db/exec/sbe/values/value.h:1230:15,
          inlined from 'mongo::sbe::value::BsonRegex mongo::sbe::value::getBsonRegexView(mongo::sbe::value::Value)' at src/mongo/db/exec/sbe/values/value.h:1243:44,
          inlined from 'std::pair<mongo::sbe::value::TypeTags, long unsigned int> mongo::sbe::value::compareValue(mongo::sbe::value::TypeTags, mongo::sbe::value::Value, mongo::sbe::value::TypeTags, mongo::sbe::value::Value, const mongo::StringData::ComparatorInterface*)' at src/mongo/db/exec/sbe/values/value.cpp:727:41:
      src/mongo/base/string_data.h:82:68: error: 'size_t strlen(const char*)' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
         82 | ingData(const char* str) : StringData(str, str ? std::strlen(str) : 0) {}
            |                                                  ~~~~~~~~~~^~~~

      In constructor 'mongo::StringData::StringData(const char*)',
          inlined from 'mongo::sbe::value::BsonRegex::BsonRegex(const char*)' at src/mongo/db/exec/sbe/values/value.h:1230:15,
          inlined from 'mongo::sbe::value::BsonRegex mongo::sbe::value::getBsonRegexView(mongo::sbe::value::Value)' at src/mongo/db/exec/sbe/values/value.h:1243:44,
          inlined from 'std::pair<mongo::sbe::value::TypeTags, long unsigned int> mongo::sbe::value::compareValue(mongo::sbe::value::TypeTags, mongo::sbe::value::Value, mongo::sbe::value::TypeTags, mongo::sbe::value::Value, const mongo::StringData::ComparatorInterface*)' at src/mongo/db/exec/sbe/values/value.cpp:728:41:
      src/mongo/base/string_data.h:82:68: error: 'size_t strlen(const char*)' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
         82 | ingData(const char* str) : StringData(str, str ? std::strlen(str) : 0) {}
            |                                                  ~~~~~~~~~~^~~~

      cc1plus: all warnings being treated as errors
      scons: *** [build/59f4f0dd/mongo/db/exec/sbe/values/value.o] Error 1
      scons: building terminated because of errors.
      build/59f4f0dd/mongo/db/exec/sbe/values/value.o failed: Error 1

      ```
       

            Assignee:
            juan.gu@mongodb.com Juan Gu
            Reporter:
            diracsvip@gmail.com Kane You
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: