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

Bazel scons integration will sometimes fail to compile due to nonexistent output dirs

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL

    Description

      Right now the scons-bazel integration performs a copy step to move the artifacts from the bazel ouput dir to the scons ouput dir. The copy logic requires the scons output directory for that target to exist.

      This doesn't play well with the current issue where we always build all bazel targets (SERVER-81923). It appears that scons will not create the output directory for targets not explicitly requested on the CLI, triggering the following error:

      rm build/fast -r; python3 ./buildscripts/scons.py BAZEL_BUILD_ENABLED=1 --build-profile=fast --ninja=disabled --link-model=dynamic -j 200 --modules= build/fast/mongo/platform/libvisibility_test_libcommon.a
       
      ...
      Running bazel build command: /home/ubuntu/mongo/bazelisk build //src/mongo/platform:visibility_test_libcommon //src/mongo/db/commands:fsync_locked --//bazel/config:compiler_type=clang --dynamic_mode=fully
       
      INFO: Analyzed 2 targets (0 packages loaded, 0 targets configured).
      INFO: Found 2 targets...
      INFO: Elapsed time: 0.333s, Critical Path: 0.00s
      INFO: 1 process: 1 internal.
      INFO: Build completed successfully, 1 total action
       
      scons: *** [build/fast/mongo/platform/libvisibility_test_libcommon.a] /home/ubuntu/mongo/build/fast/mongo/db/commands/libfsync_locked.a: No such file or directory
      scons: building terminated because of errors.
      

      Attachments

        Activity

          People

            zack.winter@mongodb.com Zack Winter
            zack.winter@mongodb.com Zack Winter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: