New issue
Advanced search Search tips

Issue 907469 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 3
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 2
Type: Bug-Regression

Blocking:
issue 495204



Sign in to add a comment

chrome/credential_provider:gcp_installer doesn't work in win/cross builds

Project Member Reported by thakis@chromium.org, Nov 21

Issue description

https://logs.chromium.org/logs/chromium/bb/chromium.clang/linux-win_cross-rel/4700/+/recipes/steps/compile/0/stdout

[26615/51845] ACTION //chrome/credential_provider:gcp_installer(//build/toolchain/win:win_clang_x64)
FAILED: gcp_installer.exe 
python ../../chrome/credential_provider/build/make_setup.py ../../ ../../chrome/credential_provider . gen/chrome/credential_provider
Traceback (most recent call last):
  File "../../chrome/credential_provider/build/make_setup.py", line 128, in <module>
    sys.exit(main())
  File "../../chrome/credential_provider/build/make_setup.py", line 113, in main
    with open('nul') as nul_file:
IOError: [Errno 2] No such file or directory: 'nul'


https://cs.chromium.org/chromium/src/chrome/credential_provider/build/make_setup.py?q=make_setup.py&sq=package:chromium&dr&l=113

  with open('nul') as nul_file:


This needs to use /dev/null on non-Windows hosts. But the cross-platform way is

  with open(os.devnull) as nul_file:


  command = 'copy /b %s + %s %s > nul' % (sfx_fn, gcp_7z_fn, gcp_installer_fn)

won't work either; probably want shutil.copy or shutil.copy2?

And the 7zr.exe needs tweaking too, see e.g. https://cs.chromium.org/chromium/src/chrome/tools/build/win/create_installer_archive.py?type=cs&q=7zr&sq=package:chromium&g=0&l=142

def GetLZMAExec(build_dir):
  if sys.platform == 'win32':
    lzma_exec = os.path.join(build_dir, "..", "..", "third_party",
                             "lzma_sdk", "Executable", "7za.exe")
  else:
    lzma_exec = '7zr'  # Use system 7zr.
  return lzma_exec


See https://cs.chromium.org/chromium/src/docs/win_cross.md?type=cs&q=win_cross.md&sq=package:chromium&l=34 for background on the cross build.
 
Status: Assigned (was: Untriaged)
Ping. If this takes a while, can we guard the gcp_installer target behind `if (host_os == "win"` for now to get https://ci.chromium.org/buildbot/chromium.clang/linux-win_cross-rel/ past compile again?
Sorry for delay.  I can take a look at this on monday.
Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e316cafeae2b76973e0b7bcd21f87953105b8d1f

commit e316cafeae2b76973e0b7bcd21f87953105b8d1f
Author: Roger Tawa <rogerta@chromium.org>
Date: Mon Dec 03 20:54:16 2018

Fix win/cross of the credential provider.

Bug:  907469 
Change-Id: I11eef2154474685461408d7932a4406001ee0174
Reviewed-on: https://chromium-review.googlesource.com/c/1359066
Commit-Queue: Roger Tawa <rogerta@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613238}
[modify] https://crrev.com/e316cafeae2b76973e0b7bcd21f87953105b8d1f/chrome/credential_provider/build/make_setup.py

Status: Fixed (was: Started)

Sign in to add a comment