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

Bazel build can't remove a file because it's read-only

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Build
    • ALL
    • Hide

      Build in Windows 11

      python 3.10

      python buildscripts/scons.py -build-profile=opt BAZEL_FLAGS=-config=local

      Show
      Build in Windows 11 python 3.10 python buildscripts/scons.py - build-profile=opt BAZEL_FLAGS= -config=local

      Os : Windows 11

      python v3.10

      Command prompt is set to Admin mode

      os.remove(file) fails because the file are read-only.

      Traceback (most recent call last):
        File "C:\Users\hsous\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
          self.run()
        File "C:\Users\hsous\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run
          self._target(*self._args, **self._kwargs)
        File "E:\mongo\site_scons\site_tools\integrate_bazel.py", line 497, in bazel_build_thread_func
          os.remove(file)
      PermissionError: [WinError 5] Access is denied: 'bazel-out\\x64_windows-dbg\\bin\\src\\mongo\\bson\\bson_validate_gen_gen_source_tag.gen_source_list'
      Bazel Build failed with 1! 

      I have made a small change to integrate_bazel.py, pushing it shortly ...

            Assignee:
            Unassigned Unassigned
            Reporter:
            h.sousou97@gmail.com maths soso N/A
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: