This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: build failure, GMP not available


On Thu, 2 Nov 2006, Gerald Pfeifer wrote:

> On Mon, 30 Oct 2006, Geoffrey Keating wrote:
> > configure: error: Building GCC requires GMP 4.1+ and MPFR 2.2+.  Try the
> > --with-gmp and/or --with-mpfr options.
>
> Indeed, as a user I ran into problems with this on a system where both of
> these actually were installed.
>
> This is because I had the run-time libraries, but not headers which at
> some distros (such as openSUSE) are in different packages such as pkg.rpm
> versus pkg-devel.rpm.
>
> I predicit this is going to hit quite many naive users (such as myself).
>
> Kaveh, would you mind looking into whether we could referine the autoconf
> magic you added?  Something like first checking for the libraries being
> present, and then for headers, and in the case we've got the former but
> not the latter issue an appropriate warning?
> Gerald

Hi Gerald,

I was taking a second look at this issue.  I am convinced there is a
problem as I can see how this can be a source of confusion for users who
insist to themselves they installed the libraries and wonder why it still
fails.  Note however the configure check clearly says it's looking for the
header file.  Still I'd like to see how we can solve it.

I'm a little reluctant to reorder the tests because the current library
check, preserved from before my efforts, requires a mpfr_t type declared
in the headers and calls a function prototyped from them also.  I'm not
sure if this kind of test is necessary, we could simply look for the
library, but I saw no reason to eliminate it when I began my work.  If we
were to preserve it, we would need to have a generic library check, then
look for the headers, then the more elaborate test as it exists now.
Seems like overkill.

I'm wondering, can we can solve this with a better error message?  That
should tickle enough brain cells to hopefully lower the chance of someone
being bit by this.  Let me know your thoughts.

		Thanks,
		--Kaveh


--- orig/egcc-SVN20061115/configure.in	2006-11-13 20:01:53.000000000 -0500
+++ egcc-SVN20061115/configure.in	2006-11-16 10:14:34.638989521 -0500
@@ -1122,7 +1122,10 @@ if test -d ${srcdir}/gcc && test x$have_
 Try the --with-gmp and/or --with-mpfr options to specify their locations.
 Copies of these libraries' source code can be found at their respective
 hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
-See also http://gcc.gnu.org/install/prerequisites.html for additional info.])
+See also http://gcc.gnu.org/install/prerequisites.html for additional info.
+If you obtained GMP and/or MPFR from a vendor distribution package, make
+sure that you have installed both the libraries and the header files.
+They may be located in separate packages.])
 fi

 # Flags needed for both GMP and/or MPFR


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]