New issue
Advanced search Search tips

Issue 832744 link

Starred by 2 users

Issue metadata

Status: Unconfirmed
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Building gn from source fails due to hardcoded paths

Reported by adrian.g...@googlemail.com, Apr 13 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0

Steps to reproduce the problem:
Building gn from source is not possible since the build system has hard-coded paths:

glaubitz@deb4g:/srv/glaubitz$ git clone https://chromium.googlesource.com/chromium/src/tools/gn
Cloning into 'gn'...
remote: Total 9606 (delta 7047), reused 9606 (delta 7047)
Receiving objects: 100% (9606/9606), 2.54 MiB | 7.87 MiB/s, done.
Resolving deltas: 100% (7047/7047), done.
glaubitz@deb4g:/srv/glaubitz$ cd gn/
glaubitz@deb4g:/srv/glaubitz/gn$ ./bootstrap/bootstrap.py 
Building gn manually in a temporary directory for bootstrapping...
/usr/bin/python: can't open file '/srv/build/write_buildflag_header.py': [Errno 2] No such file or directory
Command '['/usr/bin/python', '/srv/build/write_buildflag_header.py', '--output', 'base/synchronization/synchronization_buildflags.h', '--gen-dir', '/tmp/tmpEeGkAa/gen', '--definitions', '/tmp/tmpEeGkAa/gen/base/synchronization/synchronization_buildflags.h.tmp']' returned non-zero exit status 2
glaubitz@deb4g:/srv/glaubitz/gn$

What is the expected behavior?
Building a simple C++ like gn from source should be possible on any modern Linux system with a reasonable recent version of gcc which is the case on the Debian unstable where I tested the build.

What went wrong?
The build script tries to load Python code from a non-existing path, /srv/build.

Did this work before? N/A 

Chrome version: 66.0.3359.26  Channel: n/a
OS Version: Debian unstable
Flash Version: N/A
 
Components: Build

Comment 2 by lrn1...@gmail.com, Apr 30 2018

That's because gn is tied to chromium source code, while not being part of chromium source tree per se (if you download a snapshot of chromium source code, gn won't be in the "tools' subdir). It requires a number of files from the chrome build subdirectory.

This is probably one of the reasons why gn is not available as a package in Debian, for exampl.

Sign in to add a comment