'rpmbuild' kernel source code failed due to the verison conflicts of rpm

Issues related to applications and software problems
Post Reply
sharpro
Posts: 5
Joined: 2019/10/31 02:28:32

'rpmbuild' kernel source code failed due to the verison conflicts of rpm

Post by sharpro » 2020/02/04 08:08:09

Hi, guys

my base OS verison is CentOS 7.6 aarch64 , and I want to install the 4.19 kernel source code.
But I have got a problem that after I installed kernel-4.19.94-300.el7.src.rpm (or kernel-4.19.72-300.el7.src.rpm), and used 'rpmbuild -bp /root/rpmbuild/SPECS/kernel.spec, I got the following :
error: Failed build dependencies:
rpm < 4.13.0.1-19 conflicts with kernel-4.19.94-300.el7.aarch64

the problem is the newest version in the yum server is 4.11, and I found it's hard to install rpm from rpmfind or other plases, as there are so many other related packages to install.

any ideas?

User avatar
TrevorH
Forum Moderator
Posts: 28095
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: 'rpmbuild' kernel source code failed due to the verison conflicts of rpm

Post by TrevorH » 2020/02/04 08:18:57

You definitely shouldn't be touching rpm. If there's a problem then it's in your spec file not in your installed system.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

sharpro
Posts: 5
Joined: 2019/10/31 02:28:32

Re: 'rpmbuild' kernel source code failed due to the verison conflicts of rpm

Post by sharpro » 2020/02/06 07:49:59

TrevorH wrote:
2020/02/04 08:18:57
You definitely shouldn't be touching rpm. If there's a problem then it's in your spec file not in your installed system.
I got the spec file exactly from the src package. you mean I need to do some change to the spec file or some else?

here's my steps:
(1) install the src package
rpm -ivh kernel-4.19.94-300.el7.src.rpm
(2) build the souce code
after the first step, I got the spec file in ~/rpmbuild/SPECS/
then I run 'rpmbuild -bp /root/rpmbuild/SPECS/kernel.spec' , and I got the error:
error: Failed build dependencies:
rpm < 4.13.0.1-19 conflicts with kernel-4.19.94-300.el7.aarch64

sml
Posts: 112
Joined: 2020/01/17 09:01:44

Re: 'rpmbuild' kernel source code failed due to the verison conflicts of rpm

Post by sml » 2020/02/06 16:37:36

If the spec file contains file triggers and/or boolean dependencies you need to adjust it manually as these features were introduced in rpm 4.13 and not present in the rpm on CentOS 7.

User avatar
TrevorH
Forum Moderator
Posts: 28095
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: 'rpmbuild' kernel source code failed due to the verison conflicts of rpm

Post by TrevorH » 2020/02/06 16:44:05

Are you trying to build with debuginfo enabled?
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

sharpro
Posts: 5
Joined: 2019/10/31 02:28:32

Re: 'rpmbuild' kernel source code failed due to the verison conflicts of rpm

Post by sharpro » 2020/02/12 08:27:51

I need to add some feature like 4k page_size and build with new driver code

User avatar
TrevorH
Forum Moderator
Posts: 28095
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: 'rpmbuild' kernel source code failed due to the verison conflicts of rpm

Post by TrevorH » 2020/02/12 09:49:33

The question about debuginfo is relevant. The kernel package rebuilds fine using mock --rebuild ~/rpmbuild/SRPMS/kernel-4.19.94-300.el7.src.rpm without any complaint. When I asked about the rpm requirement I was told that this occurs if you try to do a debuginfo build.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - Software Support”