Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1557255
  • 博文数量: 290
  • 博客积分: 3468
  • 博客等级: 中校
  • 技术积分: 3461
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-28 22:21
文章分类

全部博文(290)

文章存档

2016年(13)

2015年(3)

2014年(42)

2013年(67)

2012年(90)

2011年(75)

分类: 嵌入式

2013-12-20 18:32:35

os :ubuntu 12.04.3 x86_64

# lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 12.04.3 LTS
Release:    12.04
Codename:    precise

1.下载源码:
icecat


firefox
ftp://ftp.mozilla.org/pub/firefox/releases/
ftp://ftp.mozilla.org/pub/firefox/releases/17.0.11esr/source/

测试版本为: 17.0.11esr, 24.2.0esr

2.编译 build:
官方文档 (英文) : http://developer.mozilla.org/en/docs/Build_Documentation
官方文档 (中文): https://developer.mozilla.org/zh-CN/docs/%E7%BC%96%E8%AF%91%E6%89%8B%E5%86%8C?redirectlocale=zh-CN&redirectslug=Build_Documentation

a. 安装依赖 Dependency:
https://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions/Linux_Prerequisites

  硬件要求  Hardware
2G RAM with lots of available swap space. Additional RAM will significantly decrease build time.
For debug builds: at least 8 GB free disk space
For optimized builds: at least 1 GB free disk space (6 GB recommended)

安装编译工具与依赖包  Build Tools and Dependencies
# wget && python bootstrap.py

配置 Configure:
https://developer.mozilla.org/en-US/docs/Configuring_Build_Options
虽然可以通过configure 进行配置,但推荐采用mozconfig 文件

# touch .mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-obj
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --disable-shared
ac_add_options --disable-tests

# ./configure  --prefix=/opt/usr/firefix-17.11
# make -j4

编译出错:
/usr/bin/ld:/home/water/project/open_source/mozilla-esr17/security/nss/lib/util/nssutil.def:1: syntax error in VERSION script
collect2: ld returned 1 exit status
make[5]: *** [/home/water/project/open_source/mozilla-esr17/security/nss/lib/util/libnssutil3.so] Error 1
make[5]: Leaving directory `/home/water/project/open_source/mozilla-esr17/security/nss/lib/util'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/home/water/project/open_source/mozilla-esr17/security/nss/lib'
make[3]: *** [libs] Error 2
make[3]: Leaving directory `/home/water/project/open_source/mozilla-esr17/security/build'
make[2]: *** [libs_tier_platform] Error 2
make[2]: Leaving directory `/home/water/project/open_source/mozilla-esr17'
make[1]: *** [tier_platform] Error 2
make[1]: Leaving directory `/home/water/project/open_source/mozilla-esr17'

解决方法:
# for i in `find | grep -e '\.def$'`; do mv -v $i $i.orig; cat $i.orig | sed 's/;+//' | sed 's/;;//' | sed 's/ DATA //' | grep -v ";-" | sed 's/;.*/;/' > $i; doneos
ps: 得先在干净的源码中执行上面的命令而后再执行 touch .mozconfig 等编译过程

# make install

24.2.0esr
出错信息:
/home/water/project/open_source/mozilla-esr24/js/src/vm/ArgumentsObject.cpp:634:2: fatal error: opening dependency file .deps/ArgumentsObject.o.pp: No such file or directory
compilation terminated.
make[3]: *** [ArgumentsObject.o] Error 1
make[3]: Leaving directory `/home/water/project/open_source/mozilla-esr24/js/src'
make[2]: *** [default] Error 2
make[2]: Leaving directory `/home/water/project/open_source/mozilla-esr24/js/src'
make[1]: *** [tier_js] Error 2
make[1]: Leaving directory `/home/water/project/open_source/mozilla-esr24'
make: *** [default] Error 2
解决方法:
# mkdir -p  ./js/src/.deps

参考链接:



参考文档:

阅读(2264) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~