New issue
Advanced search Search tips

Issue 725439 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression


Participants' hotlists:
Hotlist-1


Sign in to add a comment

gn build: bootstrap.py fails to link gn on macos

Reported by ionlupa...@gmail.com, May 23 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Steps to reproduce the problem:
1. run `python ./bootstrap/bootstrap.py -s` on osx
2. an error occured

Issues:
1. The line "'base/time/time_posix.cc'," should be removed from gn/bootstrap/bootstrap.py
2. resolve the chromium dependency "third_party/apple_apsl" introduced by https://codereview.chromium.org/2713553002

Before I could build gn standalone with addin the minimum dependency list by using the following script:
#!/bin/bash

set -e
set -v

# Get the sources
#rm -fr gn-standalone
if [ ! -d "gn-standalone" ]; then
  mkdir gn-standalone
  cd gn-standalone
  mkdir tools
  cd tools
  git clone https://chromium.googlesource.com/chromium/src/tools/gn
  cd ..
  git clone https://chromium.googlesource.com/chromium/src/base
  git clone https://chromium.googlesource.com/chromium/src/build
  git clone https://chromium.googlesource.com/chromium/src/build/config
  mkdir testing
  cd testing
  git clone https://chromium.googlesource.com/chromium/testing/gtest
  cd ../..
fi

# Build
cd gn-standalone/tools/gn
if hash python2 2>/dev/null; then
  python2 ./bootstrap/bootstrap.py -s
else
  python ./bootstrap/bootstrap.py -s
fi

# At this point, the resulting binary is at:
# gn-standalone/out/Release/gn

What is the expected behavior?
to make gn build standalone with minimum dependencies

What went wrong?
1. The line "'base/time/time_posix.cc'," should be removed from gn/bootstrap/bootstrap.py
2. resolve the chromium dependency "third_party/apple_apsl" introduced by https://codereview.chromium.org/2713553002

Did this work before? Yes 

Chrome version: 58.0.3029.110  Channel: stable
OS Version: OS X 10.12.4
Flash Version: Shockwave Flash 25.0 r0

I would appreciate to have gn build standalone in build bots
 

Comment 1 Deleted

Comment 2 by hdodda@chromium.org, May 24 2017

Labels: TE-NeedsTriageHelp
Components: -Platform>DevTools
Cc: rsesek@chromium.org
rsesek@ - wondering what you make of this.
Status: Available (was: Unconfirmed)
Components: Build
any news?
Hello guys... any progress on this?
I still missing this fix. Any news?
Hello! any news?
Cc: -rsesek@chromium.org
Hello,

Could you please apply the following patch:
diff --git a/bootstrap/bootstrap.py b/bootstrap/bootstrap.py
index ff2ae57..dcba435 100755
--- a/bootstrap/bootstrap.py
+++ b/bootstrap/bootstrap.py
@@ -436,6 +436,7 @@ def write_gn_ninja(path, root_gen_dir, options):
       'base/memory/ref_counted_memory.cc',
       'base/memory/singleton.cc',
       'base/memory/shared_memory_handle.cc',
+      'base/memory/shared_memory_tracker.cc',
       'base/memory/weak_ptr.cc',
       'base/message_loop/incoming_task_queue.cc',
       'base/message_loop/message_loop.cc',
@@ -603,10 +604,13 @@ def write_gn_ninja(path, root_gen_dir, options):
         'base/threading/thread_local_storage_posix.cc',
         'base/threading/worker_pool_posix.cc',
         'base/time/time_conversion_posix.cc',
-        'base/time/time_exploded_posix.cc',
-        'base/time/time_now_posix.cc',
         'base/trace_event/heap_profiler_allocation_register_posix.cc',
     ])
+    if not is_mac:
+        static_libraries['base']['sources'].extend([
+            'base/time/time_exploded_posix.cc',
+            'base/time/time_now_posix.cc',
+        ])
     static_libraries['libevent'] = {
         'sources': [
             'base/third_party/libevent/buffer.c',


with the above patch I manage to compile on mac. it may affect posix and windows.
I had to include apple_apsl to manage to compile.

Thank you in advance.
Ion
My previous patch may conflict with already pending patch: https://chromium-review.googlesource.com/c/594067
Any luck to fix this issue?
Hello guys... Could somebody respond to this issue?

Comment 16 Deleted

Rather than waiting for busy Googlers to respond, it will be great to submit your patch through the google source for review.

Review:
https://chromium-review.googlesource.com/c/chromium/src/+/611776

Commit:
https://chromium.googlesource.com/chromium/src/tools/gn/+/5c0f23b3e5dbf935bc240ba48cf308d363dee5ce
https://chromium-review.googlesource.com/c/chromium/src/+/611776 is merged, but latest code (dc2380c2) still failed with errors:


Building gn manually in a temporary directory for bootstrapping...
ninja: Entering directory `/tmp/tmpNpYqqk'
ninja: error: '/home/halton/work/projects/github/nodejs/node-gn/third_party/base/tracked_objects.cc', needed by 'base/tracked_objects.o', missing and no known rule to make it
Command '['ninja', '-C', '/tmp/tmpNpYqqk', '-w', 'dupbuild=err', 'gn']' returned non-zero exit status 1

https://chromium-review.googlesource.com/c/chromium/src/tools/gn/+/670077 is added for the tracked_objects. issue.
Owner: thomasanderson@chromium.org
Status: Fixed (was: Available)
Should be fixed now

Sign in to add a comment