chromium 28 for linux 编译

56 篇文章 31 订阅

在编译好chromium for android后,http://blog.csdn.net/longji/article/details/53012985;进行如下操作,可以正常编译chromium for linux。

切换到release分支,参考:http://www.chromium.org/developers/how-tos/get-the-code/working-with-release-branches

git checkout -b b2785linux branch-heads/2785
git reset --hard c0db0f8f

sudo apt-get -y install libexpat1-dev libfreetype6-dev libbz2-dev libcups2-dev

build/install-build-deps.sh

gclient runhooks

gn gen out/gnLinux

ninja -C out/gnLinux chrome

out/gnLinux/chrome
编译成功后,运行是提示:
./chrome: error while loading shared libraries: libgcrypt.so.11: cannot open shared object file: No such file or directory

到ubuntu官网找libgcrypt11
https://launchpad.net/ubuntu/+source/libgcrypt11

下载并安装libgcrypt11_1.5.3-2ubuntu4_amd64.deb
http://launchpadlibrarian.net/160013007/libgcrypt11_1.5.3-2ubuntu4_amd64.deb

在运行out/gnLinux/chrome

# 如果要生产arm64,需要运行  build/linux/sysroot_scripts/install-sysroot.py --arch=arm64 ,貌似只能 is_clang=true
build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
# --arch="arm64" --sysroot="//build/linux/debian_jessie_arm64_sysroot"
gn gen out/ReleaseLinuxArm64 --ide="vs2015" --args="target_os=\"linux\" target_cpu=\"arm64\" is_component_build=false is_debug=false is_official_build=true google_api_key=false google_default_client_id=false google_default_client_secret=false proprietary_codecs=true media_use_ffmpeg=true ffmpeg_branding=\"Chrome\" enable_nacl=false enable_mse_mpeg2ts_stream_parser=true enable_hls_sample_aes=true chrome_pgo_phase=0 use_debug_fission=false is_clang=true"
# 直接像上面在命令行制定 sysroot 不行
ninja -C out/ReleaseLinuxArm64 chrome


# 运行 build/linux/sysroot_scripts/install-sysroot.py --arch=arm 后,在执行gn gen,貌似只能 is_clang=true
build/linux/sysroot_scripts/install-sysroot.py --arch=arm
# --arch="arm" --sysroot="//build/linux/debian_wheezy_arm-sysroot" 
gn gen out/ReleaseLinuxArm86 --ide="vs2015" --args="target_os=\"linux\" target_cpu=\"arm\" is_component_build=false is_debug=false is_official_build=true google_api_key=false google_default_client_id=false google_default_client_secret=false proprietary_codecs=true media_use_ffmpeg=true ffmpeg_branding=\"Chrome\" enable_nacl=false enable_mse_mpeg2ts_stream_parser=true enable_hls_sample_aes=true chrome_pgo_phase=0 use_debug_fission=false is_clang=true"
ninja -C out/ReleaseLinuxArm86 chrome


build/linux/sysroot_scripts/install-sysroot.py --arch=amd64
# --arch="amd64" --sysroot="//build/linux/debian_wheezy_amd64-sysroot" 
gn gen out/ReleaseLinuxX64 --ide="vs2015" --args="target_os=\"linux\" target_cpu=\"x64\" is_component_build=false is_debug=false is_official_build=true google_api_key=false google_default_client_id=false google_default_client_secret=false proprietary_codecs=true media_use_ffmpeg=true ffmpeg_branding=\"Chrome\" enable_nacl=false enable_mse_mpeg2ts_stream_parser=true enable_hls_sample_aes=true chrome_pgo_phase=0 use_debug_fission=false is_clang=true"

ninja -C out/ReleaseLinuxX64 chrome


# 编译成功,运行找不到动态库
build/linux/sysroot_scripts/install-sysroot.py --arch=i386
# --arch="i386" --sysroot="//build/linux/debian_wheezy_i386-sysroot" 
gn gen out/ReleaseLinuxX86 --ide="vs2015" --args="target_os=\"linux\" target_cpu=\"x86\" is_component_build=false is_debug=false is_official_build=true google_api_key=false google_default_client_id=false google_default_client_secret=false proprietary_codecs=true media_use_ffmpeg=true ffmpeg_branding=\"Chrome\" enable_nacl=false enable_mse_mpeg2ts_stream_parser=true enable_hls_sample_aes=true chrome_pgo_phase=0 use_debug_fission=false is_clang=true"

ninja -C out/ReleaseLinuxX86 chrome


# 在chromium下运行成功,`--arch=\"amd64\" --sysroot=\"//build/linux/debian_wheezy_amd64-sysroot\"
gn gen out/DebugX64 --ide="eclipse" --args="target_os=\"linux\" target_cpu=\"x64\" is_component_build=true is_debug=true is_official_build=true google_api_key=false google_default_client_id=false google_default_client_secret=false proprietary_codecs=true media_use_ffmpeg=true ffmpeg_branding=\"Chrome\" enable_nacl=false enable_mse_mpeg2ts_stream_parser=true enable_hls_sample_aes=true chrome_pgo_phase=0 use_debug_fission=false is_clang=true"
# 编译成功,运行coredump
ninja -C out/DebugX64 chrome

03 问题

异常问题的解决
error: LLVMgold.so: could not load plugin library: LLVMgold.so: cannot open shared object file: No such file or directory

解决办法: sudo apt reinstall llvm-dev

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值