Building APR 1.4.6 on Scientific Linux 5.7

2012/03/05

Out of the box, SL 5.7 isn’t able to build the APR 1.4.6 RPM directly from the tar – throwing errors like:

/usr/src/redhat/BUILD/apr-1.4.6/libtool: line 854: X--mode=compile: command not found
/usr/src/redhat/BUILD/apr-1.4.6/libtool: line 854: X--mode=compile: command not found
/usr/src/redhat/BUILD/apr-1.4.6/libtool: line 854: X--mode=compile: command not found
/usr/src/redhat/BUILD/apr-1.4.6/libtool: line 854: X--mode=compile: command not found
/usr/src/redhat/BUILD/apr-1.4.6/libtool: line 854: X--mode=compile: command not found
/usr/src/redhat/BUILD/apr-1.4.6/libtool: line 854: X--mode=compile: command not found
/usr/src/redhat/BUILD/apr-1.4.6/libtool: line 1020: *** Warning: inferring the mode of operation is deprecated.: command not found
/usr/src/redhat/BUILD/apr-1.4.6/libtool: line 1021: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
/usr/src/redhat/BUILD/apr-1.4.6/libtool: line 1164: Xgcc: command not found
/usr/src/redhat/BUILD/apr-1.4.6/libtool: line 1020: *** Warning: inferring the mode of operation is deprecated.: command not found
/usr/src/redhat/BUILD/apr-1.4.6/libtool: line 1021: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
/usr/src/redhat/BUILD/apr-1.4.6/libtool: line 1164: X-pthread: command not found
/usr/src/redhat/BUILD/apr-1.4.6/libtool: line 1164: Xgcc: command not found

Turns out this is down to m4 being too old and unable to re-autoconf before build starts. You can see this a bit earlier on in the build:

buildconf: creating include/arch/unix/apr_private.h.in ...
configure.in:1385: /usr/bin/m4: builtin `mkstemp' requested by frozen file is not supported
autom4te: /usr/bin/m4 failed with exit status: 1
autoheader: /usr/bin/autom4te failed with exit status: 1
buildconf: creating configure ...
configure.in:1385: /usr/bin/m4: builtin `mkstemp' requested by frozen file is not supported
autom4te: /usr/bin/m4 failed with exit status: 1

Unfortunately these failures don’t abort the build.

This can be fixed by upgrading the m4 in SL, and there’s a source rpm for that:

[root@dev7 ~]# wget ftp://ftp.scientificlinux.org/linux/scientific/5x/SRPMS/SL/m4-1.4.8-1.src.rpm
--2012-03-05 17:17:39--  ftp://ftp.scientificlinux.org/linux/scientific/5x/SRPMS/SL/m4-1.4.8-1.src.rpm
           => `m4-1.4.8-1.src.rpm'
Resolving ftp.scientificlinux.org... 131.225.110.147
Connecting to ftp.scientificlinux.org|131.225.110.147|:21... connected.
...
[root@dev7 ~]# rpmbuild --rebuild m4-1.4.8-1.src.rpm
Installing m4-1.4.8-1.src.rpm
...
[root@dev7 ~]# rpm -Uvh /usr/src/redhat/RPMS/x86_64/m4-1.4.8-1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:m4                     ########################################### [100%]

Then your rpmbuild of APR should go fine.

Comments