public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/51935] New: Configure fails on included mpc/mpfr
@ 2012-01-21 17:57 psmith at gnu dot org
  2012-01-21 18:23 ` [Bug bootstrap/51935] " psmith at gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: psmith at gnu dot org @ 2012-01-21 17:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51935

             Bug #: 51935
           Summary: Configure fails on included mpc/mpfr
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: psmith@gnu.org


Created attachment 26404
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26404
Add /src to mpfr directories in configure.ac

I was trying to follow the advice of various people by including GMP/MPC/MPFR
into the GCC source tree (GCC 4.6.2 / GMP 5.0.2 / MPFR 3.1.0 / MPC 0.9),
however this failed during configure:

    checking whether time.h and sys/time.h may both be included... yes
    checking for creal in -lm... yes
    checking for __gmpz_init in -lgmp... yes
    checking for MPFR... yes
    checking for recent GMP... yes
    checking for recent MPFR... no
    configure: error: MPFR version >= 2.4.2 required
    make[4]: *** [configure-stage1-mpc] Error 1
    make[4]: Leaving directory `/usr/src/gcc/obj-stage1/gcc'
    make[3]: *** [stage1-bubble] Error 2
    make[3]: Leaving directory `/usr/src/gcc/obj-stage1/gcc'
    make[2]: *** [all] Error 2
    make[2]: Leaving directory `/usr/src/gcc/obj-stage1/gcc'
    make[1]: *** [/usr/src/gcc/.stamp/stage1.install] Error 2

Investigating, I found the configure was using the wrong path to location mpfr
headers and libraries; for example mpc/config.log says:

    configure:11278: checking for recent MPFR
    configure:11290: gcc -c -g -fkeep-inline-functions
-I/usr/src/gcc/obj-stage1/gcc
    /./gmp -I/usr/src/gcc/gcc-4.6.2/mpfr  conftest.c >&5
    conftest.c:34:3: error: #error "Minimal MPFR version is 2.4.2"
    conftest.c:35: error: expected '=', ',', ';', 'asm' or '__attribute__' at
end of
     input
    configure:11290: $? = 1

This is due to the configure script assuming that MPFR headers are in the root
MPFR directory, but they're not: they live the "src" subdirectory in MPFR.  If
you fix the headers then it will fail during link because it's looking for
libmpfr.a in the wrong place, too.

I have an MPFR installed natively on the system, but it's version 2.2.1.  My
suspicion is that most people who test this already have a "new enough" MPFR
installed in /usr/include so they don't notice that this path is wrong, since
configure finds the one in /usr/include and is happy with it.

The attached patch to configure.ac that fixes things.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/51935] Configure fails on included mpc/mpfr
  2012-01-21 17:57 [Bug bootstrap/51935] New: Configure fails on included mpc/mpfr psmith at gnu dot org
@ 2012-01-21 18:23 ` psmith at gnu dot org
  2012-01-21 18:24 ` psmith at gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: psmith at gnu dot org @ 2012-01-21 18:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51935

--- Comment #1 from psmith at gnu dot org 2012-01-21 18:15:24 UTC ---
Created attachment 26406
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26406
Handle both old and new MPFR dir layouts

Added a new patch that works with both old and new layouts.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/51935] Configure fails on included mpc/mpfr
  2012-01-21 17:57 [Bug bootstrap/51935] New: Configure fails on included mpc/mpfr psmith at gnu dot org
  2012-01-21 18:23 ` [Bug bootstrap/51935] " psmith at gnu dot org
@ 2012-01-21 18:24 ` psmith at gnu dot org
  2012-01-21 18:41 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: psmith at gnu dot org @ 2012-01-21 18:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51935

--- Comment #2 from psmith at gnu dot org 2012-01-21 18:17:23 UTC ---
BTW, this is a duplicate of bug #50461


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/51935] Configure fails on included mpc/mpfr
  2012-01-21 17:57 [Bug bootstrap/51935] New: Configure fails on included mpc/mpfr psmith at gnu dot org
  2012-01-21 18:23 ` [Bug bootstrap/51935] " psmith at gnu dot org
  2012-01-21 18:24 ` psmith at gnu dot org
@ 2012-01-21 18:41 ` pinskia at gcc dot gnu.org
  2012-01-21 18:55 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-21 18:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51935

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-21 18:23:20 UTC ---
Dup of bug 50461 so closing.

*** This bug has been marked as a duplicate of bug 50461 ***


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/51935] Configure fails on included mpc/mpfr
  2012-01-21 17:57 [Bug bootstrap/51935] New: Configure fails on included mpc/mpfr psmith at gnu dot org
                   ` (2 preceding siblings ...)
  2012-01-21 18:41 ` pinskia at gcc dot gnu.org
@ 2012-01-21 18:55 ` redi at gcc dot gnu.org
  2012-01-21 20:18 ` psmith at gnu dot org
  2012-01-21 23:47 ` psmith at gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2012-01-21 18:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51935

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-21 18:27:18 UTC ---
The prerequisites page says:
"While any sufficiently new version of required tools usually work, library
requirements are generally stricter. Newer versions may work in some cases, but
it's safer to use the exact versions documented."

The contrib/download_prerequisites script gets the exact versions documented.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/51935] Configure fails on included mpc/mpfr
  2012-01-21 17:57 [Bug bootstrap/51935] New: Configure fails on included mpc/mpfr psmith at gnu dot org
                   ` (3 preceding siblings ...)
  2012-01-21 18:55 ` redi at gcc dot gnu.org
@ 2012-01-21 20:18 ` psmith at gnu dot org
  2012-01-21 23:47 ` psmith at gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: psmith at gnu dot org @ 2012-01-21 20:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51935

--- Comment #5 from psmith at gnu dot org 2012-01-21 18:54:37 UTC ---
It's fine to close this bug as a dup as it's later than the other, but note
I've attached a fix to this bug (there's no fix attached to the other) so
please don't lose the patch.

Cheers!


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/51935] Configure fails on included mpc/mpfr
  2012-01-21 17:57 [Bug bootstrap/51935] New: Configure fails on included mpc/mpfr psmith at gnu dot org
                   ` (4 preceding siblings ...)
  2012-01-21 20:18 ` psmith at gnu dot org
@ 2012-01-21 23:47 ` psmith at gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: psmith at gnu dot org @ 2012-01-21 23:47 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51935

--- Comment #6 from psmith at gnu dot org 2012-01-21 23:24:18 UTC ---
Created attachment 26407
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26407
Fix typo


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-01-21 23:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-21 17:57 [Bug bootstrap/51935] New: Configure fails on included mpc/mpfr psmith at gnu dot org
2012-01-21 18:23 ` [Bug bootstrap/51935] " psmith at gnu dot org
2012-01-21 18:24 ` psmith at gnu dot org
2012-01-21 18:41 ` pinskia at gcc dot gnu.org
2012-01-21 18:55 ` redi at gcc dot gnu.org
2012-01-21 20:18 ` psmith at gnu dot org
2012-01-21 23:47 ` psmith at gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).