Subject: Configure problem in coreutils 8.13

From: "Ellis N. Thomas" <[email-masked]>
Date: Thu, 21 Mar 2013 16:55:16 +0000

Configure problem in coreutils 8.13

To: <[email-masked]>

1 Background

	The release used was NOT the latest, so it is quite likely that these  
matters
have been previously addressed.  On the other hand, it is possible that
installation has not been attempted for this actual Unix version.

Running Mac OS X:

   System Version:	Mac OS X 10.5.8 (9L30)
   Kernel Version:	Darwin 9.8.0
   >uname -mpv
   Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009;  
root:xnu-1228.15.4~1/RELEASE_I386 i386 i386

	The reason for installing 8.13 was that version 8.21 from the ftp area
(ftp://ftp.gnu.org/gnu/coreutils/) was an xz version and there seemed  
to be
no support for that format on this machine.  The latest gz was 8.13 from
Sep 2011, so also downloaded version 8.13, and proceeded to install  
this.

	This problem was formerly included in bug#13912, but has now been
split off from other topics covered there.

2 Failure

	When `make' was run, many errors were reported, concerning expr.c
The first error is
expr.c:54:18: error: gmp.h: No such file or directory

	Noted that config.status has
     D["HAVE_GMP"]=" 1"
and the expr.c source tests this.  It seems that configure has
incorrectly decided that gmp is available, and expr.c fails to find  
the header,
and all other errors arise from this.

	Since the expr.c source allowed for the test failing, it seemed  
possible to
proceed without gmp.  So config.status was modified so that
     D["HAVE_GMP"]=" 0"
then make reran OK.  This seems to confirm that the problem is in  
configure.

3 Extra Information

	It was only later that it was realised that configure --help included:
**** From --help ****
   --without-gmp           do not use the GNU MP library for arbitrary
                                       precision calculation (default:  
use it if available)

**** End from --help ****

	The optional nature of gmp and this option ought to be included in the
README.  However, the decision made by configure "use it if available"
still seems incorrect.

	Although gmp was not installed at the time, there was a source download
in a nearby directory.  The download of gcc-4.7.2 was being prepared for
building.  It had previously been established that gmp was a  
Prerequisite,
so it was placed ready to be installed along with the gcc sources.

Directories:

/Gnu/coreutils/coreutils-8.13	Being used to build coreutils.

/Gnu/gcc/src/gcc-4.7.2/	Sources preparing for installation
/Gnu/gcc/obj/				Area for building

/Gnu/gmp/gmp-5.1.0		Sources preparing for installation

The gcc directory includes a link for gmp
/Gnu/gcc/src/gcc-4.7.2/gmp -> /Gnu/gmp/gmp-5.1.0

(As suggested in the gcc downloading information:
"Likewise the GMP, MPFR and MPC libraries can be automatically built
together with GCC.  Unpack the GMP, MPFR and/or MPC source distributions
in the directory containing the GCC sources and rename their  
directories to
gmp, mpfr and mpc, respectively (or use symbolic links with the same  
name)."

	It is possible that one of these gmp directories was identified
by configure.

4 Conclusion

	The config.log file is available (5.3MB), plus config.status (96kB).   
There
is also a file from redirecting standard output during the run of  
configure (60kB).

	If extra information about the matters reported above would be of
value please contact:
	[email-masked]

Ellis N. Thomas/21-Mar-2013