因为各种你懂的原因,访问google的服务总是出错,先是hosts不工作,代理也不好使,最后终于可以短暂访问了。我的版本还是采用svn维护的,直接svn update也不行。试试git吧,一晚上才下载了120M,这得要猴年马月才能下完那。找找tarball吧,TNND,尽然google删除了tarball!好在可以通过git的tgz方式变通的拿到tarball,一更新得到提示:ubuntu14.04不支持,算了,再整个30G的空间装个Ubuntu12.04吧,“尝尽了生活的苦,找不到可以相信的人”,
下了个dep_tool又不通了。一运行gclient报错:
gclient runhooks:
/.gclient: line 8: solutions: command not found
./.gclient: line 9: name: command not found算了,那就不更新吧,直接在老版本上build吧:
./build/install-build-deps.sh
提示我64位的kernel编译32位的代码不再获得推荐:
We no longer recommend that you use this script to install
32bit libraries on a 64bit system. Instead, consider using
the install-chroot.sh script to help you set up a 32bit
environment for building and testing 32bit versions of Chrome.
If you nonetheless want to try installing 32bit libraries
directly, you can do so by explicitly passing the --lib32
option to install-build-deps.sh.
Exiting without installing any 32bit libraries.
逗我玩呢,劝我改用install-chroot.sh?
./build/install-chroot.sh
The following targets are available to be installed in a chroot:
1: breezy
2: dapper
3: edgy
26: stable
27: testing
28: trusty
29: unstable
30: utopic
31: vivid
32: warty
33: wheezy
34: woody
You are running a 64bit kernel. This allows you to install either a
32bit or a 64bit chroot environment. Which one do you want (32, 64) 32
I: Retrieving Release
W: Cannot check Release signature; keyring file not available /usr/share/keyrings/debian-archive-keyring.gpg
I: Retrieving Packages
算了,还是取消用这个编译吧:加上--lib32
./build/install-build-deps.sh --lib32
build/gyp_chromium -Dflag1=value1 -Dflag2=value2
然后编译:make chrome -j4
出错了:
net/base/x509_certificate_nss.cc: In function ‘void net::{anonymous}::ParsePrincipal(CERTName*, net::CertPrincipal*)’:
net/base/x509_certificate_nss.cc:75:46: error: invalid conversion from ‘char* (*)(const CERTName*) {aka char* (*)(const CERTNameStr*)}’ to ‘CERTGetNameFunc {aka char* (*)(CERTNameStr*)}’ [-fpermissive]
改之:
// Get CN, L, S, and C. #if Michael_Chromium_Patch CERTGetNameFunc get_name_funcs[4] = { (char*(*)(CERTNameStr*))CERT_GetCommonName, (char*(*)(CERTNameStr*))CERT_GetLocalityName, (char*(*)(CERTNameStr*))CERT_GetStateName, (char*(*)(CERTNameStr*))CERT_GetCountryName }; #else CERTGetNameFunc get_name_funcs[4] = { CERT_GetCommonName, CERT_GetLocalityName, CERT_GetStateName, CERT_GetCountryName }; #endif
AR(target) out/Debug/obj.target/third_party/WebKit/Source/WebKit/chromium/libwebkit.a
COPY out/Debug/chrome-wrapper
ACTION Generating manpage out/Debug/chrome.1
COPY out/Debug/xdg-mime
COPY out/Debug/xdg-settings
COPY out/Debug/product_logo_48.png
CXX(target) out/Debug/obj.target/chrome/chrome/app/chrome_main.o
CXX(target) out/Debug/obj.target/chrome/chrome/app/chrome_exe_main_gtk.o
CXX(target) out/Debug/obj.target/chrome/chrome/app/chrome_main_delegate.o
LINK(target) out/Debug/chrome
^[ LINK(target) out/Debug/chrome: Finished
谢天谢地,终于过了!
cd out/Debug and run chrome
My god! crash :(
[2560:2560:1091621926:FATAL:field_trial.cc(183)] Check failed: next_group_number_ > kDefaultGroupNumber + 1 (1 vs. 1)
Backtrace:
base::debug::StackTrace::StackTrace() [0x55555743f072]
logging::LogMessage::~LogMessage() [0x555557469635]
base::FieldTrial::SetForced() [0x55555742d1b2]
VariationsService::CreateTrialFromStudy() [0x55555713a558]
VariationsService::CreateTrialsFromSeed() [0x555557138e28]
ChromeBrowserMainParts::SetupMetricsAndFieldTrials() [0x5555570da3bd]
ChromeBrowserMainParts::PreCreateThreadsImpl() [0x5555570ddf1a]
ChromeBrowserMainParts::PreCreateThreads() [0x5555570dcfea]
content::BrowserMainLoop::CreateThreads() [0x555559b7c890]
(anonymous namespace)::BrowserMainRunnerImpl::Initialize() [0x555559b7e97f]
BrowserMain() [0x555559b7b34b]
content::RunNamedProcessTypeMain() [0x5555573aff00]
content::ContentMainRunnerImpl::Run() [0x5555573b0b74]
content::ContentMain() [0x5555573af573]
ChromeMain [0x55555668447d]
main [0x55555668443c]
0x7ffff203f76d
0x555556684349
调试一下吧:
gdb chrome and show call stack:
[32321:32321:43801153618:WARNING:zygote_host_impl_linux.cc(165)] Running without the SUID sandbox! See http://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[32347:32347:43817254895:INFO:gl_context_glx.cc(135)] Offscreen context was direct.
Segmentation fault (core dumped)
删除这个Local State,chrome就跑起来了,原因就是第一次run起来chrome后,我点击了“是否恢复上次的网页”的是按钮,导致本地状态解析出错,请看此文件末端的一堆seed数据(它就是老鼠):
Local State: