Makefile‘混和的隐含和普通规则’错误的解决

在使用Fedora 17编译内核时(v2.6.21)报如下错误:
引用:
Makefile:418: *** mixed implicit and normal rules. Stop.

Google后得到的结果是makefile的规则问题,fedora 1 7的make版本较新,GNU Make自fedora 14就升级到3.82版本了。
代码:
[jarson@fedora ~]$ make --version
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Copyright (C) 2010   Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

有两种解决方法:
1.修改内核的Makefile 网上搜一搜全是这种方法,具体就 不说了(Makefile规则的修改也许会有不同)
2.降级fodera软件包,降到Fedora 13 的make版本
这两种方法各有优点,视项目开发环境所需,然而,即使是ubunt u目前较新的发布版ubuntu 12.04,GNU Make的版本仍保持为3.81(看来fedora确实较为激进些^_^),所以,选择软件降级的方法也许更好一些。

fedora 14及更高版本降级make的方法:
代码:
sudo yum downgrade make --releasever=13 --nogpg


这里的 –nogpg 一定要加上否则会报如下错误(没有rsa的key)
引用:
......
Downloading Packages:
make-3.81-19.fc13.x86_64.rpm | 389 kB 00:02
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID e8e40fde: NOKEY
Public key for make-3.81-19.fc13.x86_64.rpm is not installed
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-x86_64

The GPG keys listed for the "Fedora 13 - x86_64 - Updates" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.

Failing package is: 1:make-3.81-19.fc13.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-x86_64


安装完后再查看一下make的版本:
代码:
[jarson@fedora ~]$ make --version
GNU Make 3.81
Copyright (C) 2006   Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-redhat-linux-gnu
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值