bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14025: Configure problem in coreutils 8.13


From: Pádraig Brady
Subject: bug#14025: Configure problem in coreutils 8.13
Date: Fri, 22 Mar 2013 14:10:10 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 03/21/2013 04:55 PM, Ellis N. Thomas wrote:
>     Configure problem in coreutils 8.13
> 
> To: <address@hidden>
> 
> 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:
>     address@hidden
> 
> Ellis N. Thomas/21-Mar-2013

So here on GNU/Linux AC_SEARCH_LIBS indicates that GMP is not
available unless the gmp-devel package is installed.
The devel package makes _both_ the header available to the compiler,
and the lib available to the linker.

$ ld -lgmp
ld: cannot find -lgmp
$ sudo yum install gmp-devel
$ ld -lgmp
linking...

So it seems on your system that the lib is available to the linker
but the header is not.  We can work around that in configure
with the attached patch.

thanks,
Pádraig.

Attachment: osx-gmp.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]