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

Rebuilding mongodb according to building.md failed because python3 is an alias/link (led to ModuleNotFoundError)

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 4.2.13
    • Affects Version/s: 4.2.9
    • Component/s: Build
    • Environment:
      Amazon EC2 instance with ubuntu
      gcc9.3.0
      python3.8.5
    • Fully Compatible
    • ALL
    • Hide

      After installing all prerequisites indicated by the doc, executing the following scons script:

      sudo python3 buildscripts/scons.py install-mongod

      Show
      After installing all prerequisites indicated by the doc, executing the following scons script: sudo python3 buildscripts/scons.py install-mongod
    • Dev Platform 2021-01-25

      I tried to rebuild mongodb according to building.md(github repo) and I got the following error when executing the scons scrtip(sudo python3 buildscripts/scons.py install-mongod):

       Generating build/opt/mongo/db/repl/rollback_gen.cpp
      /usr/bin/python3 src/mongo/base/generate_error_codes.py src/mongo/base/error_codes.yml src/mongo/base/error_codes.tpl.h build/opt/mongo/base/error_codes.h
      Traceback (most recent call last):
      File "src/mongo/base/generate_error_codes.py", line 31, in <module>
      from Cheetah.Template import Template
      ModuleNotFoundError: No module named 'Cheetah'
      Generating build/opt/mongo/db/repl/member_config_gen.cpp
      Compiling build/opt/third_party/boost-1.70.0/libs/log/src/attribute_name.o
      Compiling build/opt/third_party/icu4c-57.1/source/i18n/strrepl.o
      Compiling build/opt/third_party/mozjs-60/extract/modules/fdlibm/s_rintf.o
      Generating build/opt/mongo/db/ops/delete_request_gen.cpp
      Compiling build/opt/third_party/mozjs-60/extract/modules/fdlibm/s_fabs.o
      scons: *** [build/opt/mongo/base/error_codes.h] Error 1
      scons: building terminated because of errors.
      build/opt/mongo/base/error_codes.h failed: Error 1

       

      Note:

      I have Cheetah installed in /home/ubuntu/.local/lib/python3.8/site-packages/Cheetah and it is in PYTHONPATH. The potential problem might be that the subprocess has no idea of the original ENV variable but I don't know how to fix it. Specifically, I don't know which file invoked this subprocess.

       

            Assignee:
            daniel.moody@mongodb.com Daniel Moody
            Reporter:
            jp2475@cornell.edu Jialing Pei
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: