Issue
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.
.
Solution
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, - handles things like the build dependencies, so you don’t have to worry about that, and
- 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
Answered By – mattdm
Answer Checked By – Gilberto Lyons (BugsFixing Admin)