这是因为gpg key是Fedora 16版本的,降级回13的话需要用到13的key,上网搜索了下找到了之后放到/etc/pki/rpm-gpg/覆盖RPM-GPG-KEY-fedora-i386之后再重新运行上面的命令即可(记得备份原文件,降级完成后要把文件还原的,要不然系统升级会有问题)。
最后为了防止系统每次自动把make更新回3.82,我们在/etc/yum.conf里再添加一行来过滤掉make的自动升级
exclude=make
3. 缺失的系统工具
我的fedora16安装的时候选择的是software development的配置安装的,编译的时候出错需要安装的工具包括
sudo yum install gperf
4. 编译过程中的错误
a) perl错误
Can't locate Switch.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23. BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23. make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/html/DocTypeStrings.cpp] Error 2 make: *** Waiting for unfinished jobs.... target Generated: libwebcore <= external/webkit/Source/WebCore/platform/ColorData.gperf Can't locate Switch.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23. BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23. make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/platform/ColorData.cpp] Error 2 target Generated: libwebcore <= external/webkit/Source/WebCore/html/parser/HTMLEntityNames.in
这个错误是由于fedora16中新的perl版本将switch的module拿掉了,需要修改webkit的源码来编译通过:进入external/webkit的目录,打下面的patch
diff --git a/Source/WebCore/make-hash-tools.pl b/Source/WebCore/make-hash-tools.pl index 37639eb..2968beb 100644 --- a/Source/WebCore/make-hash-tools.pl +++ b/Source/WebCore/make-hash-tools.pl @@ -20,7 +20,8 @@ # Boston, MA 02110-1301, USA. use strict; -use Switch; +# use Switch; +use feature qw(switch); use File::Basename; my $outdir = $ARGV[0]; @@ -28,9 +29,9 @@ shift; my $option = basename($ARGV[0],".gperf"); -switch ($option) { +given ($option) { -case "DocTypeStrings" { +when ("DocTypeStrings") { my $docTypeStringsGenerated = "$outdir/DocTypeStrings.cpp"; my $docTypeStringsGperf = $ARGV[0]; @@ -40,7 +41,7 @@ case "DocTypeStrings" { } # case "DocTypeStrings" -case "ColorData" { +when ("ColorData") { my $colorDataGenerated = "$outdir/ColorData.cpp"; my $colorDataGperf = $ARGV[0];
b) mutable错误
external/oprofile/libpp/format_output.h:94:22: error: reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive]