New issue
Advanced search Search tips

Issue 762073 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug

Blocked on:
issue 800518

Blocking:
issue 495204



Sign in to add a comment

mini_installer_archive doesn't work in linux->win cross builds

Project Member Reported by thakis@chromium.org, Sep 5 2017

Issue description

[3/296] ACTION //chrome/installer/mini_installer:mini_installer_archive(//build/toolchain/win:win_clang_x86)
FAILED: chrome.7z setup.ex_ gen/chrome/installer/mini_installer/mini_installer/packed_files.rc 
python ../../chrome/tools/build/win/create_installer_archive.py --build_dir . --staging_dir gen/chrome/installer/mini_installer/mini_installer --input_file ../../chrome/installer/mini_installer/chrome.release --resource_file_path gen/chrome/installer/mini_installer/mini_installer/packed_files.rc --target_arch=x86 --distribution=_google_chrome --output_dir . --chrome_runtime_deps gen/chrome_component.runtime_deps --setup_runtime_deps gen/setup.runtime_deps --enable_hidpi=1 --component_build=1 --depfile gen/chrome/installer/mini_installer/archive.d
Traceback (most recent call last):
  File "../../chrome/tools/build/win/create_installer_archive.py", line 665, in <module>
    sys.exit(main(options))
  File "../../chrome/tools/build/win/create_installer_archive.py", line 557, in main
    options.chrome_runtime_deps, current_version)
  File "../../chrome/tools/build/win/create_installer_archive.py", line 487, in DoComponentBuildTasks
    os.mkdir(installer_dir)
OSError: [Errno 2] No such file or directory: 'gen/chrome/installer/mini_installer/mini_installer/temp_installer_archive/Chrome-bin/63.0.3206.0/Installer'
 
This is at least in part due to the trailing backslashes in chrome/installer/mini_installer/chrome.release
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 5 2017

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

commit c6faad1e4c378ef1e2bb39240da3db9f9e835bbf
Author: Nico Weber <thakis@chromium.org>
Date: Tue Sep 05 23:30:13 2017

Make create_installer_archive.py work a bit better on non-Win hosts.

- copy api-ms-* files with r bit set so that the installer script
  can read them when it tries to copy them
- convert \ to / when reading chrome/installer/mini_installer/chrome.release
- use 7za instead of 7za.exe (and assume it's already installed)

Also don't create the same directory twice in MakeStagingDirectories(), see
https://codereview.chromium.org/8615002/diff/3005/chrome/tools/build/win/create_installer_archive.py#newcode154
(this is unrelated to the cross-build).

Still doesn't work in cross-builds because of (at least) makecab.exe,
and I don't have a good idea on how to tackle that yet, but this seems
like a good intermediate step.

Bug:  762073 
Change-Id: I297ea0c87afe6a67246c018e188ac4edf4a3b865
Reviewed-on: https://chromium-review.googlesource.com/650839
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499794}
[modify] https://crrev.com/c6faad1e4c378ef1e2bb39240da3db9f9e835bbf/build/vs_toolchain.py
[modify] https://crrev.com/c6faad1e4c378ef1e2bb39240da3db9f9e835bbf/chrome/tools/build/win/create_installer_archive.py

Project Member

Comment 5 by bugdroid1@chromium.org, Jan 9 2018

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

commit fd8e1c8da7222a1ac2391d2e7504bca3e3df0453
Author: Nico Weber <thakis@chromium.org>
Date: Tue Jan 09 16:16:10 2018

Make create_installer_archive.py work in win/cross builds.

create_installer_archive.py used to use the Windows excecutable
makecab.exe, which doesn't exist on non-Windows hosts.

Replace it with a partial reimplementation in Python that can
run everywhere.  The reimplementation always uses deflate
encoding for implementation simplicity.  I read up on LZX and
wrote a working decompressor, but then I realized that we don't
ship the cab file produced by this script -- the signing server
uncompresses the cab, signs it, and re-compresses it with
makecab.exe on the server side.  Deflate is a good bit faster
and produces a good bit larger binaries, but in release builds
at least we're talking 1.8s vs 0.2s and 1.3MB vs 0.95MB, so
the difference is fairly small in absolute terms.

Bug:  762073 
Change-Id: Ica7060cc6a7e1a9a98d18b1f9bbe071024ee3402
Reviewed-on: https://chromium-review.googlesource.com/853243
Reviewed-by: Greg Thompson <grt@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528011}
[modify] https://crrev.com/fd8e1c8da7222a1ac2391d2e7504bca3e3df0453/chrome/installer/mini_installer/BUILD.gn
[modify] https://crrev.com/fd8e1c8da7222a1ac2391d2e7504bca3e3df0453/chrome/tools/build/win/create_installer_archive.py
[add] https://crrev.com/fd8e1c8da7222a1ac2391d2e7504bca3e3df0453/chrome/tools/build/win/makecab.py
[add] https://crrev.com/fd8e1c8da7222a1ac2391d2e7504bca3e3df0453/chrome/tools/build/win/makecab_test.py

Comment 6 by thakis@chromium.org, Jan 10 2018

Blockedon: 800518
Project Member

Comment 7 by bugdroid1@chromium.org, Jan 10 2018

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

commit 4833466dcd6d0edbec0200c17761af86c7d22ebe
Author: Nico Weber <thakis@chromium.org>
Date: Wed Jan 10 17:31:30 2018

Address review comments on https://chromium-review.googlesource.com/c/chromium/src/+/853243

No intended behavior change (except for minor changes to error message output).

Bug:  762073 
Change-Id: I156b0a2ce401c2bbabfdc94763e3303cb8d9629b
Reviewed-on: https://chromium-review.googlesource.com/860177
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Chris Sharp <csharp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528346}
[modify] https://crrev.com/4833466dcd6d0edbec0200c17761af86c7d22ebe/chrome/tools/build/win/makecab.py
[modify] https://crrev.com/4833466dcd6d0edbec0200c17761af86c7d22ebe/chrome/tools/build/win/makecab_test.py

Comment 8 by thakis@chromium.org, Jan 10 2018

Status: Fixed (was: Untriaged)

Sign in to add a comment