Build failed when is_official_build = true, seems related to internal branch restriction

82 views
Skip to first unread message

Shitong

unread,
Apr 25, 2017, 12:30:45 AM4/25/17
to Chromium-dev
Hi All,

So I'm trying to build an official/distribution version of Chromium on Ubuntu 14.04. After following the instructions given by https://www.chromium.org/developers/gn-build-configuration, I keep getting errors as:

> const&): error: undefined reference to 'local_ntp::SendLocalFileResource(std::string const&, base::Callback<void (base::RefCountedMemory*)> const&)'
obj/chrome/browser/browser/most_visited_iframe_source.o:../../chrome/browser/search/most_visited_iframe_source.cc:function MostVisitedIframeSource::StartDataRequest(std::string const&, int, int, base::Callback<void (base::RefCountedMemory*)> const&): error: undefined reference to 'local_ntp::SendLocalFileResourceWithOrigin(std::string const&, std::string const&, base::Callback<void (base::RefCountedMemory*)> const&)'
obj/chrome/browser/browser/local_ntp_source.o:../../chrome/browser/search/local_ntp_source.cc:function LocalNtpSource::StartDataRequest(std::string const&, int, int, base::Callback<void (base::RefCountedMemory*)> const&): error: undefined reference to 'local_ntp::SendLocalFileResource(std::string const&, base::Callback<void (base::RefCountedMemory*)> const&)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

at the final [1/1] LINK ./chrome step. And the following is the gn args I'm using right now:

is_debug = false
symbol_level = 0
enable_nacl = false
remove_webcore_debug_symbols = true
is_component_build = false
is_official_build = true
is_debug = false
target_cpu = "x64"
enable_remoting = false

I'm now actually on the commit fe308b3359314164d5a74633dfbcf52c6367630b becasue there's some legacy code in my project. According to the description on Chromium's own website this is_official_build = true parameter is only available to its internal branch, but it seems to me the errors I got have nothing to do with this restriction. 

Any help will be appreciated! Apologies in advance if this documented somewhere else...

Shitong

unread,
Apr 25, 2017, 12:31:32 AM4/25/17
to Chromium-dev
Sorry guys it should be "unrelated to internal branch restriction"...

Lei Zhang

unread,
Apr 25, 2017, 12:48:04 AM4/25/17
to stzh...@gmail.com, Chromium-dev
The problem with your build of Chromium source code from 18 months ago
was fixed 17 months ago in https://crrev.com/362144 .
> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "Chromium-dev" group.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/4b84dbff-ce65-460c-9329-17886f22e8f0%40chromium.org.

Shitong Zhu

unread,
Apr 25, 2017, 12:53:14 AM4/25/17
to Lei Zhang, Chromium-dev
Thanks, I'll check it out - looks like I'll have to make some changes to my code for ensuring its compatibility. BTW, I'm still wondering if the is_official_build and is_chrome_branded build parameters are really available to public branch checkout?

Lei Zhang

unread,
Apr 25, 2017, 1:06:04 AM4/25/17
to Shitong Zhu, Chromium-dev
The is_official_build build parameter _should_ be usable from a public
checkout. Various developers have put in effort to make sure modern
Chromium can be built with is_official_build, but there are
occasionally breakages. By modern, I mean the latest code, not the
2015 revision your checkout is on.

The is_chrome_branded build parameter is not usable, because Chrome
branding is not public.

The two parameters are declared and documented in
build/config/BUILDCONFIG.gn, and build/config/chrome_build.gni,
respectively.

Shitong Zhu

unread,
Apr 25, 2017, 1:18:19 AM4/25/17
to Lei Zhang, Chromium-dev
Thank you for the very responsive clarification. Now it's working! Have a good one :).
Reply all
Reply to author
Forward
0 new messages