On Thu, 16 Nov 2006, Matt Fago wrote:
> I have been struggling with this issue, and now that I have
> successfully built GCC I thought I would share my results. Hopefully
> it can help someone better versed in autotools to improve the build
> of GCC with GMP/MPFR.
>
> For reference, a few older threads I've found:
> <a href="http://gcc.gnu.org/ml/gcc/2006-01/msg00333.html">http://
> gcc.gnu.org/ml/gcc/2006-01/msg00333.html</a>
> <a href="http://gcc.gnu.org/ml/gcc-bugs/2006-03/
> msg00723.html">http://gcc.gnu.org/ml/gcc-bugs/2006-03/msg00723.html</a>
>
> The long and short of it: my builds of the latest versions of GMP and
> MPFR were perfectly fine, although not ideal for building GCC.
> However, the GCC 4.1.1 configure script incorrectly decided that it
> _had_ located useful copies of GMP and MPFR, while in fact the
> GFortran build fails 90 minutes later with the error message (as in
> the second thread above):
Thanks for the report. I believe some of your issues can be addressed.
I'll add what I can to my TODO list. However I don't know if anything
will be done for the 4.1.x series given the restriction for regression
fixes only. I guess it depends on your definition of "regression", these
problems have always existed since we started relying on gmp/mpfr in 4.0.
However the 3.4 series didn't need these libraries so it never had these
kind of problems building fortran. :-)
It may be possible to get something into 4.2 since it hasn't been released
yet.
> One issue here is that '--with-mpfr=path' assumes that 'libmpfr.a' is
> in 'path/lib' (not true for how I installed it), while '--with-mpfr-
> dir=path' assumes that 'libmpfr.a' is in 'path', rather than
> 'path/.libs' (can this work for anyone?). Note that '--with-gmp-
> dir=path' does look in 'path/.libs'.
This problem appears in the 4.0 series all the way through current
mainline. I do believe it should be fixed and it is simple to do so. I'll
take care of it.
> My comments:
>
> 1) It would have been very useful to have explicit configure options
> such as --with-gmp-lib=path and --with-gmp-include=path (etc) that
> explicitly locate the *.a and *.h directories, rather than (or in
> addition to) the existing "install directory" and "build directory"
> options.
Yes, the configure included in mpfr itself has this for searching for GMP
which it relies on. I'll add something for this in GCC also.
> 2) Ideally IMHO the top-level configure (or at least the libgfortran
> configure) would test the execution of some or all of the required
> functions in GMP/MPFR. I vaguely recall that this is possible with
> autoconf, and should be more robust. Would it add too much complexity
> to the top-level configure?
> Thanks,
> - Matt
I tend to be reluctant about run tests because they don't work with a
cross-compiler. Would you please tell me specifically what problem
checking at runtime would prevent that the existing compile test doesn't
detect?
Thanks,
--Kaveh
--
Kaveh R. Ghazi [EMAIL PROTECTED]