're2/stringpiece.h' file not found when doing a Ninja build

454 views
Skip to first unread message

Umar Hansa

unread,
May 20, 2013, 7:23:17 PM5/20/13
to chromi...@chromium.org
Hi

I'm trying to build Chromium using:
ninja -C src/out/Release chrome

But I'm getting the error:
../../third_party/re2/re2/re2.h:186:10: fatal error: 're2/stringpiece.h' file not found

This happened after an update using:
gclient sync --jobs=16

I'm on Mac OS X, I was able to successfully build before the update.

Is this something specific to my checkout or are others getting this problem? I checked out Chromium using:
fetch blink

If this is a known problem, what would be the best way to get Chromium building again?

Thanks.

David Grogan

unread,
May 20, 2013, 7:30:04 PM5/20/13
to umar....@gmail.com, Chromium-dev
Can you paste more of the compile error?


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
 
 
 

Nico Weber

unread,
May 20, 2013, 7:30:21 PM5/20/13
to umar....@gmail.com, Chromium-dev
Do you have GYP_GENERATORS set to ninja? What's the output of `echo $GYP_GENERATORS`?


On Mon, May 20, 2013 at 4:23 PM, Umar Hansa <umar....@gmail.com> wrote:

--

Umar Hansa

unread,
May 20, 2013, 9:38:18 PM5/20/13
to chromi...@chromium.org, umar....@gmail.com
echo $GYP_GENERATORS gives me ninja as I had done export GYP_GENERATORS=ninja.

Here is the output:

$ ninja -C src/out/Release chrome
ninja: Entering directory `src/out/Release'
[29/1378] CXX obj/third_party/leveldatabase/leveldatabase.env_chromium.o
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/leveldatabase/leveldatabase.env_chromium.o.d -DLEVELDB_PLATFORM_CHROMIUM=1 -DUSE_SNAPPY=1 -DCHROMIUM_BUILD -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_CONFIGURATION_POLICY -DENABLE_INPUT_SPEECH -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DENABLE_GPU=1 -DENABLE_EGLIMAGE=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_BACKGROUND=1 -DENABLE_AUTOMATION=1 -DENABLE_GOOGLE_NOW=1 -DENABLE_LANGUAGE_DETECTION=1 -DENABLE_PRINTING=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_MANAGED_USERS=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../.. -I../../third_party/snappy/mac -I../../third_party/snappy/src -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -O3 -gdwarf-2 -fvisibility=hidden -Werror -Wnewline-eof -mmacosx-version-min=10.6 -arch i386 -Wendif-labels -Wno-unused-parameter -Wno-missing-field-initializers -Wheader-hygiene -Wno-c++11-narrowing -Wno-reserved-user-defined-literal -Wno-char-subscripts -Wno-unused-function -Wno-covered-switch-default -Wstring-conversion -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /Users/umarhansa/development/chrome-test/src/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -fcolor-diagnostics -fno-strict-aliasing -std=gnu++11  -c ../../third_party/leveldatabase/env_chromium.cc -o obj/third_party/leveldatabase/leveldatabase.env_chromium.o
In file included from ../../third_party/leveldatabase/env_chromium.cc:30:
../../third_party/re2/re2/re2.h:186:10: fatal error: 're2/stringpiece.h' file not found
#include "re2/stringpiece.h"
         ^
1 error generated.
[29/1378] CXX obj/third_party/webkit/source/core/accessibility/webcore_remaining.axobjectcache.o
ninja: build stopped: subcommand failed.

Before I carried out an update, ninja builds were working and I could run Chromium.

Thanks

Umar

Nico Weber

unread,
May 20, 2013, 11:19:16 PM5/20/13
to Umar Hansa, Chromium-dev
What does `ls -l out/Release/build.ninja` say?

Since all bots are happy, it seems that something in your local setup broke.

Umar Hansa

unread,
May 21, 2013, 12:22:37 PM5/21/13
to chromi...@chromium.org, Umar Hansa
Ok I can't explain why this is happening, but here's what I've noticed in regards to the error I mentioned earlier:

Previously I had been editing some CSS files within Blink on master, when I do a gclient sync --jobs=16 - I get:

_____ src/third_party/WebKit at refs/heads/master
Cannot fast-forward merge, attempt to rebase? (y)es / (q)uit / (s)kip : y
Attempting rebase onto refs/remotes/origin/master...
First, rewinding head to replay your work on top of it...

I have found one way to get working builds though, it's to run this command (I had assumed this command was something you run just once - maybe I have to do it after each sync it seems):
$ GYP_GENERATORS=ninja GYP_DEFINES=clang=1 ./build/gyp_chromium

The disadvantage being, the next $ ninja -C src/out/Release chrome takes a lot longer. 

So I can get a working build of Chromium by running ./build/gyp_chromium after each update and then running the ninja command.  Interestingly enough each sync presents me with a slightly different error message when trying to do a ninja build, my current error:
clang: error: no such file or directory: '../../third_party/angle/src/compiler/DetectRecursion.cpp'

Oh and $ ls -l out/Release/build.ninja
-rw-r--r--  1 umarhansa  staff  102910 20 May 21:35 out/Release/build.ninja

Maybe you're right, something has broken in my repo, I'll try checking out a fresh copy and try to not edit files in master! (that's the only thing I can imagine which has caused this problem)

Thanks 

Umar

Christian Biesinger

unread,
May 21, 2013, 3:32:18 PM5/21/13
to umar....@gmail.com, chromium-dev
So I'm not sure exactly what's going on for you, but gyp_chromium does
have to run after every sync. But "gclient sync" is supposed to run it
for you.

Maybe gclient does run it for you, but it doesn't have your
environment variables so it updates a different configuration? But
ninja should be the default now...

-christian

Nico Weber

unread,
May 21, 2013, 3:34:11 PM5/21/13
to Christian Biesinger, umar....@gmail.com, chromium-dev
On Tue, May 21, 2013 at 12:32 PM, Christian Biesinger <cbies...@chromium.org> wrote:
So I'm not sure exactly what's going on for you, but gyp_chromium does
have to run after every sync. But "gclient sync" is supposed to run it
for you.

Maybe gclient does run it for you, but it doesn't have your
environment variables so it updates a different configuration? But
ninja should be the default now...

Only on Linux. This is a Mac build (see e.g. the -isysroot flag).

But yes, be sure GYP_GENERATORS is set while you run `gclient sync`.
Reply all
Reply to author
Forward
0 new messages