Home > other >  How to deal with build dependencies in source RPM?
How to deal with build dependencies in source RPM?

Time:01-28

I don't usually use Fedora or RPMs, so I'm flying blind here. There are lots of similar questions around here, but none that I found are to the exact point where I'm stuck.

I have the source RPM for an old game program on Fedora ("six" is the game). I want to add a couple of features, but first I want to make sure I know how to compile it so that any future problems are new. I have not made any changes yet at all.

I'm not completely helpless -- when I did

rpmbuild --recompile six-*.src.rpm

I got a complaint about a missing dependency: "kdelibs3-devel", but

dnf install kdelibs3-devel

took care of that.

However, now the complaints are more nuanced. When I retried rpmbuild, it ended with

checking crt_externs.h usability... no
checking crt_externs.h presence... no
checking for crt_externs.h... no
checking for _NSGetEnviron... no
checking for vsnprintf... yes
checking for snprintf... yes
checking for X... libraries /usr/lib64, headers .
checking for IceConnectionNumber in -lICE... yes
checking for libXext... yes
checking for pthread_create in -lpthread... yes
checking for extra includes... no
checking for extra libs... no
checking for libz... -lz
checking for libpng... -lpng -lz -lm
checking for libjpeg6b... no
checking for libjpeg... no
configure: WARNING: libjpeg not found. disable JPEG support.
checking for perl... /usr/bin/perl
checking for Qt... configure: error: Qt (>= Qt 3.3 and < 4.0) (library qt-mt) not found. Please check your installation!
For more details about this problem, look at the end of config.log.
Make sure that you have compiled Qt with thread support!
error: Bad exit status from /var/tmp/rpm-tmp.y8dvN5 (%build)  

RPM build errors:
    user mockbuild does not exist - using root
    user mockbuild does not exist - using root
    user mockbuild does not exist - using root
    user mockbuild does not exist - using root
    Bad exit status from /var/tmp/rpm-tmp.y8dvN5 (%build)

Several things here seem odd, but the obvious biggie is the failure to find Qt between 3.3 and 4.0. This obviously compiled for the Fedora maintainers, so the right thing should be available, but I have no idea what its exact name would be, or how to find it and make it available.

Help, please. .

CodePudding user response:

The best thing to do here is use higher-level tools. Specifically, use mock. This is a tool which manages a build environment (either a chroot or container-based) so you don't have to worry about that and handles things like the build dependencies so you don't have to worry about that. It also makes sure that your build is "clean" rather than influenced by your own user environment so you don't have to worry about that.

In short: mock --rebuild six-*.src.rpm

CodePudding user response:

If you see errors about a specific library missing, you can use dnf itself to find out the name. For example, on Fedora 35:

$ sudo dnf repoquery --whatprovides '*qt-mt*'
qt3-0:3.3.8b-88.fc35.i686
qt3-0:3.3.8b-88.fc35.x86_64
qt3-devel-0:3.3.8b-88.fc35.i686
qt3-devel-0:3.3.8b-88.fc35.x86_64

I guess you just need to dnf install qt3-devel.

As for libjpeg, do you have libjpeg-turbo-devel installed? Configure programs generally look for the -devel stuff rather than just the library (libjpeg). If you have it installed and it's still not picked up, maybe the software is just not compatible with libjpeg-turbo. Fixing that would be a separate challenge.

  •  Tags:  
  • Related