New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 787223 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

gn should not generate ninja files that have absolute path names in them

Project Member Reported by thomasanderson@chromium.org, Nov 21 2017

Issue description

If you move your src directory (or mount it with a different absolute path inside a VM or chroot), running ninja will fail with an error like:
dev/chromium_official/src/buildtools/linux64/gn: No such file or directory

I did a string replace in build.ninja and toolchain.ninja to change all of the absolute paths to relative ones like ../../buildtools/linux64/gn (there were only a few replacements) and now the build works on all of my different mount points.  gn should be using relative paths by default.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 28 2017

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

commit 0412593176bbe398315036d4220dac780101d5e6
Author: Tom Anderson <thomasanderson@chromium.org>
Date: Tue Nov 28 03:13:13 2017

Relativize paths in build files

BUG= 787223 
R=dpranke@chromium.org
TBR=jam@chromium.org

Change-Id: I53e3069033a0ff41525ca80fa60504b3fc3c3c14
Reviewed-on: https://chromium-review.googlesource.com/784351
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519540}
[modify] https://crrev.com/0412593176bbe398315036d4220dac780101d5e6/build/nocompile.gni
[modify] https://crrev.com/0412593176bbe398315036d4220dac780101d5e6/chrome/installer/linux/BUILD.gn
[modify] https://crrev.com/0412593176bbe398315036d4220dac780101d5e6/extensions/shell/installer/linux/BUILD.gn
[modify] https://crrev.com/0412593176bbe398315036d4220dac780101d5e6/headless/BUILD.gn
[modify] https://crrev.com/0412593176bbe398315036d4220dac780101d5e6/remoting/host/installer/linux/BUILD.gn
[modify] https://crrev.com/0412593176bbe398315036d4220dac780101d5e6/third_party/breakpad/BUILD.gn
[modify] https://crrev.com/0412593176bbe398315036d4220dac780101d5e6/third_party/instrumented_libraries/BUILD.gn
[modify] https://crrev.com/0412593176bbe398315036d4220dac780101d5e6/third_party/protobuf/BUILD.gn

Project Member

Comment 2 by bugdroid1@chromium.org, Dec 1 2017

Status: Fixed (was: Assigned)
Should be fixed when gn rolls.

I think we should consider getting rid of single argument rebase_path() as it was a source of the issues fixed by the CL in c#1.  AFAICT, nothing really needs to pass an absolute path to scripts etc

Sign in to add a comment