编译Chromium 遇到的问题
2011-08-19 10:47 sunblackshine 阅读(1812) 评论(0) 编辑 收藏 举报下载源码,编译步骤按照
http://www.chromium.org/developers
1、出现如下错误
CXX(target) out/Debug/obj.target/content_utility/content/utility/utility_main.o CXX(target) out/Debug/obj.target/content_utility/content/utility/utility_thread.o AR(target) out/Debug/obj.target/content/libcontent_utility.a ACTION Generating manpage out/Debug/chrome.1 COPY out/Debug/chrome-wrapper 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_main_posix.o CXX(target) out/Debug/obj.target/chrome/chrome/app/chrome_exe_main_gtk.o CXX(target) out/Debug/obj.target/chrome/content/common/content_switches.o LINK(target) out/Debug/chrome /usr/bin/ld: failed to set dynamic section sizes: Memory exhausted collect2: ld returned 1 exit status make: *** [out/Debug/chrome] Error 1
由于自动安装编译工具的时候
.../chromium/src $ ./build/install-build-deps.sh
没有使用 gold-ld ,用原有的ld去链接内存会吃不消。
所以再用apt安装 gold-ld ,ok
再次编译链接,出现
sunshine@linux:~/sunshine/workspace/chromium/src$ make out/Debug/chrome ACTION Extracting last change to /home/zhangyang09/sda8/home/sunshine/workspace/chromium/src/out/Debug/obj/gen/build/LASTCHANGE out/Debug/obj/gen/build/LASTCHANGE.always LINK(target) out/Debug/chrome /usr/bin/ld: fatal error: out/Debug/chrome: mmap: failed to allocate 948178766 bytes for output file: Cannot allocate memory
找到http://code.google.com/p/chromium/issues/detail?id=82056
switch to gold-cvs
去http://www.gnu.org/software/binutils/
cvs 下载最新版本 gold
按照http://aur.archlinux.org/packages/gold-cvs/PKGBUILD
编译命令编译后安装。
再次编译链接Chromium 成功。