Tag Archives: autotools

Why is gettext not an ordinary library?

Not being a regular library causes no end of constant build problems.

Like this crap because we did “gettextize” without doing “autoconf” (or vice versa):

make[2]: Entering directory `/builddir/build/BUILD/libguestfs-1.14.7/po'
*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.17 but the autoconf macros are from gettext version 0.18

I just don’t get why gettext can’t be a regular, ordinary, plain library so we don’t have to constantly suffer from this sort of thing. There is surely no other library that needs to rewrite your entire build system.

8 Comments

Filed under Uncategorized

auto-buildrequires

I just pushed a new release of auto-buildrequires, a super little tool for finding the BuildRequires that your package needs automatically. Just replace rpmbuild with auto-br-rpmbuild:

$ auto-br-rpmbuild -ta auto-buildrequires-0.9.tar.gz
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.wphzM5
[ lots of stuff here ... ]
+ exit 0
BuildRequires: bash = 3.2.30.fc10.x86_64
BuildRequires: binutils = 2.18.50.0.9.8.fc10.x86_64
BuildRequires: coreutils = 6.12.19.fc10.x86_64
BuildRequires: cpio = 2.9.90.2.fc10.x86_64
BuildRequires: diffutils = 2.8.1.21.fc9.x86_64
BuildRequires: elfutils = 0.140.1.fc10.x86_64
BuildRequires: file = 4.26.4.fc10.x86_64
BuildRequires: filesystem = 2.4.19.1.fc10.x86_64
BuildRequires: findutils = 1:4.4.0.1.fc10.x86_64
BuildRequires: gawk = 3.1.6.2.fc10.x86_64
BuildRequires: gcc = 4.3.2.7.x86_64
BuildRequires: glibc-devel = 2.9.3.x86_64
BuildRequires: glibc-headers = 2.9.3.x86_64
BuildRequires: grep = 2.5.1a.61.fc10.x86_64
BuildRequires: gzip = 1.3.12.7.fc10.x86_64
BuildRequires: kernel-headers = 2.6.27.19.170.2.35.fc10.x86_64
BuildRequires: make = 1:3.81.14.fc10.x86_64
BuildRequires: net-tools = 1.60.91.fc10.x86_64
BuildRequires: sed = 4.1.5.11.fc10.x86_64
BuildRequires: tar = 2:1.20.5.fc10.x86_64

It currently lists everything that your package needs. It doesn’t know which dependencies are in the core mock / Koji system, because these don’t seem to be listed anywhere as far as I can tell.

The program works using an LD_PRELOAD hack that intercepts any system calls that try to read or write files, and at the end a small Perl script works out which installed packages each file belongs to.

There are currently some problems. For example, autoconf tends to check for a C++ and FORTRAN compiler if one is installed, even if it is never requested or used, so you’ll get these as false requirements. Nevertheless it’s a great tool that I have been using all the time as a replacement for plain rpmbuild and as a final check that I’ve got the BuildRequires approximately right.

Developers, please see the git repository.

12 Comments

Filed under Uncategorized