public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/49502] New: Unable to build gcc with gmp/mpc/mpfr in its tree and flag "--enable-cxx"
@ 2011-06-22 12:56 franck.z.bugzilla at orange dot fr
  2011-06-22 13:30 ` [Bug bootstrap/49502] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: franck.z.bugzilla at orange dot fr @ 2011-06-22 12:56 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Unable to build gcc with gmp/mpc/mpfr in its tree and
                    flag "--enable-cxx"
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: franck.z.bugzilla@orange.fr


*** the exact version of GCC;

configure:4184: gcc --version >&5
gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)


*** the system type; 

uname -m = i686
uname -r = 1.7.9(0.237/5/3)
uname -s = CYGWIN_NT-5.1
uname -v = 2011-03-29 10:10

My Cygwin is recent (one week old).
My Cygwin version of libtool is 2.4-1.

It was run on a Dual Core, Windows XP SP 3, with Cygwin environment.

*** the options given when GCC was configured/built; 

  $ /cygdrive/c/gcc-4.6.0/configure --enable-cxx

*** the complete command line that triggers the bug; 

$ make

more precisely:

It's a failure with a tag passed to libtool.

Took place in objdir/gmp/mpn.
With the command:
/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I.
-I/cygdrive/c/gcc-4.6.0/gmp/mpn -I.. -D__GMP_WITHIN_GMP
-I/cygdrive/c/gcc-4.6.0/gmp -DOPERATION_`echo fib_table | sed 's/_$//'` 
-DNO_ASM -g -fkeep-inline-functions -c -o fib_table.lo fib_table.c


*** the compiler output (error messages, warnings, etc.); and 

messages sent:
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'

backtraces from "make"s rewinding from /home/Défaut/objdir/gmp/mpn (make[5]) to
/home/Défaut/objdir (make):
[fib_table.lo] Error 1 (in mpn)
[all-recursive] Error 1 (in gmp)
[all] Error 2 (in gmp)
[all-stage1-gmp] Error 2 (in objdir)
[stage1-bubble] Error 2 (in objdir)
[all] Error 2


*** the preprocessed file (*.i*) that triggers the bug, generated by adding
-save-temps to the complete compilation command, or, in the case of a bug
report for the GNAT front end, a complete set of source files (see below). 

not relevant (?) it's an issue with how the "libtool" utility was generated by
gmp's "configure" script with the parameters it got from gcc's makefile.
Namely, as found in gmp/config.log :
 $ /cygdrive/c/gcc-4.6.0/gmp/configure --cache-file=./config.cache --enable-cxx
--enable-languages=c,c++,fortran,java,lto,objc --program-transform-name=s,y,y,
--disable-option-checking --build=i686-pc-cygwin --host=none-pc-cygwin
--target=none-pc-cygwin --srcdir=/cygdrive/c/gcc-4.6.0/gmp
--disable-intermodule --enable-checking=yes,types --disable-coverage
--enable-languages=c,lto --disable-shared


*** Extra-precision about the source compiled.

I have the same source tree for gcc, gcc/gmp, gcc/mpc and gcc/mpfr as the one
advised in the pre-requisite web page at gcc.gnu.org (4.6.0, 4.3.2, 0.9 and
3.0.1).

(see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49072 , for history, but all
the information for reproduceability has been reproduced here.)

gcc output is in an "objdir" directory separate from my gcc source directory.

As far as I can remember from my various attempts, a configure command with
--enable-cxx flag when I built gmp separately from gcc worked. I'll try it
again if you wish so as to make sure it's not a gmp issue.


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

* [Bug bootstrap/49502] Unable to build gcc with gmp/mpc/mpfr in its tree and flag "--enable-cxx"
  2011-06-22 12:56 [Bug bootstrap/49502] New: Unable to build gcc with gmp/mpc/mpfr in its tree and flag "--enable-cxx" franck.z.bugzilla at orange dot fr
@ 2011-06-22 13:30 ` rguenth at gcc dot gnu.org
  2011-06-23 12:03 ` franck.z.bugzilla at orange dot fr
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-22 13:30 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011.06.22 13:30:04
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-22 13:30:04 UTC ---
Why do you use --enable-cxx and what do you think it does?  Please do not use
it.


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

* [Bug bootstrap/49502] Unable to build gcc with gmp/mpc/mpfr in its tree and flag "--enable-cxx"
  2011-06-22 12:56 [Bug bootstrap/49502] New: Unable to build gcc with gmp/mpc/mpfr in its tree and flag "--enable-cxx" franck.z.bugzilla at orange dot fr
  2011-06-22 13:30 ` [Bug bootstrap/49502] " rguenth at gcc dot gnu.org
@ 2011-06-23 12:03 ` franck.z.bugzilla at orange dot fr
  2011-06-23 13:59 ` redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: franck.z.bugzilla at orange dot fr @ 2011-06-23 12:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Franck Z <franck.z.bugzilla at orange dot fr> 2011-06-23 12:03:31 UTC ---
Several weeks ago, with the trunk, and gmp/mpc/mpfr/ppl/cloog-ppl in the gcc
source root tree, a "configure" then "make" sequence without options was
stopped because one of the configuration checkings launched by "make" would
fail when checking for the right version of gmp.

Namely, the gmpxx.h file was said to be missing. Along with this error message,
came a reminder not to forget to use "--enable-cxx" flag when configuring gcc.

So I obeyed then. I expected it would generate the proper files needed for a
C++ binding to gmp. However, I was stalled later in the compilation by the
issue of this PR. I ended up with relying on the compiled libs provided with
the Cygwin package. I once managed to end a stage-1 compilation of gcc, but a
subsequent "svn update" from the trunk lead to new build issues.

I would leave my attempts with gcc for 3-4 weeks. Now, with a newer "svn
update" of the trunk (one-two weeks old), stage-1 compilation still doesn't
end.

I try now with gcc 4.6.0. If it fails, I'll fall back to older releases of gcc.

As long as the bootstrap ends, it's enough for my needs for now. I just aim at
trying to outline a "intelligent agent" layer in the source of gcc, so as to
improve disk use and opt out duplicate compilations during a make session. So,
I don't have any specific need for "--enable-cxx". I was just believing to do
the right thing.

Unfortunately, I may have lost track of which "configure" script was needing
gmpxx.h. My ppl/cloog-ppl libs were compliant with those advised in the
pre-requisites (0.11.2 and 0.15.10).

Thank you for any help with my configuration.


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

* [Bug bootstrap/49502] Unable to build gcc with gmp/mpc/mpfr in its tree and flag "--enable-cxx"
  2011-06-22 12:56 [Bug bootstrap/49502] New: Unable to build gcc with gmp/mpc/mpfr in its tree and flag "--enable-cxx" franck.z.bugzilla at orange dot fr
  2011-06-22 13:30 ` [Bug bootstrap/49502] " rguenth at gcc dot gnu.org
  2011-06-23 12:03 ` franck.z.bugzilla at orange dot fr
@ 2011-06-23 13:59 ` redi at gcc dot gnu.org
  2011-06-23 18:45 ` franck.z.bugzilla at orange dot fr
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2011-06-23 13:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-06-23 13:58:41 UTC ---
(In reply to comment #2)
> Namely, the gmpxx.h file was said to be missing. Along with this error message,
> came a reminder not to forget to use "--enable-cxx" flag when configuring gcc.

I don't know where that message came from, because --enable-cxx is not a gcc
configure option, see http://gcc.gnu.org/install/configure.html

> So I obeyed then. I expected it would generate the proper files needed for a
> C++ binding to gmp.

GCC doesn't need a C++ binding to GMP.

> Unfortunately, I may have lost track of which "configure" script was needing
> gmpxx.h. My ppl/cloog-ppl libs were compliant with those advised in the
> pre-requisites (0.11.2 and 0.15.10).

cloog and ppl are optional, if you can't get it to build with them why not try
without them?


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

* [Bug bootstrap/49502] Unable to build gcc with gmp/mpc/mpfr in its tree and flag "--enable-cxx"
  2011-06-22 12:56 [Bug bootstrap/49502] New: Unable to build gcc with gmp/mpc/mpfr in its tree and flag "--enable-cxx" franck.z.bugzilla at orange dot fr
                   ` (2 preceding siblings ...)
  2011-06-23 13:59 ` redi at gcc dot gnu.org
@ 2011-06-23 18:45 ` franck.z.bugzilla at orange dot fr
  2011-06-23 19:41 ` redi at gcc dot gnu.org
  2011-06-24  8:54 ` franck.z.bugzilla at orange dot fr
  5 siblings, 0 replies; 7+ messages in thread
From: franck.z.bugzilla at orange dot fr @ 2011-06-23 18:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Franck Z <franck.z.bugzilla at orange dot fr> 2011-06-23 18:45:33 UTC ---
(In reply to comment #3)

gotcha!

It's in PPL's configure script.
When checking for the correct version of gmp, the line:

#include <gmpxx.h>

is used several times and this is what choked my building session.

Later the script analyses the error and advises --enable-cxx (it's around the
middle of the script):

if test x"$have_gmp" = xno
then
  as_fn_error "Cannot find GMP version 4.1.3 or higher.
GMP is the GNU Multi-Precision library:
see http://www.swox.com/gmp/ for more information.
When compiling the GMP library, do not forget to enable the C++ interface:
add --enable-cxx to the configuration options." "$LINENO" 5
else
  if test x"$have_gmpxx" = xno
  then
    as_fn_error "GMP compiled without enabling the C++ interface.
GMP is the GNU Multi-Precision library:
see http://www.swox.com/gmp/ for more information.
When compiling the GMP library, do not forget to enable the C++ interface:
add --enable-cxx to the configuration options." "$LINENO" 5
  fi
fi

Now, apparently, as I separate the output of the compilation in a special
"objdir" directory, gmpxx.h can't be found with the paths in objdir/gmp/
because only gmp.h and mp.h are placed there. gmpxx.h is copied later from the
source directory by gmp with the "make install" command.

I should write also that this script didn't mention the absence of gmpxx.h in
objdir when a system version of gmp was already installed, for instance in
/usr/local/lib & /usr/local/include. Ominous, no?

That being said. I'll keep away from PPL and Cloog as you suggests... ^o^ ...
until I know more my way in gcc.

(--enable-cxx is indeed referenced in the pdf manual of gmp, p.6)


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

* [Bug bootstrap/49502] Unable to build gcc with gmp/mpc/mpfr in its tree and flag "--enable-cxx"
  2011-06-22 12:56 [Bug bootstrap/49502] New: Unable to build gcc with gmp/mpc/mpfr in its tree and flag "--enable-cxx" franck.z.bugzilla at orange dot fr
                   ` (3 preceding siblings ...)
  2011-06-23 18:45 ` franck.z.bugzilla at orange dot fr
@ 2011-06-23 19:41 ` redi at gcc dot gnu.org
  2011-06-24  8:54 ` franck.z.bugzilla at orange dot fr
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2011-06-23 19:41 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-06-23 19:40:42 UTC ---
(In reply to comment #4)
> When compiling the GMP library, do not forget to enable the C++ interface:

When compiling *GMP* not when compiling GCC.

> add --enable-cxx to the configuration options." "$LINENO" 5
>   fi
> fi
> 
> Now, apparently, as I separate the output of the compilation in a special
> "objdir" directory, gmpxx.h can't be found with the paths in objdir/gmp/
> because only gmp.h and mp.h are placed there. gmpxx.h is copied later from the
> source directory by gmp with the "make install" command.

Are you trying to build ppl and cloog in-tree? that doesn't work, notice that
the prerequisites page says you can put gmp, mpfr and mpc in-tree, but not ppl
and cloog:
http://gcc.gnu.org/install/prerequisites.html

To build ppl you need GMP already installed, with C++ support.

If you build GCC with GMP in-tree, you don't get GMP installed, it's just
linked into GCC.

So of course PPL finds the system gmpxx.h because that's the only one you have
installed.


> I should write also that this script didn't mention the absence of gmpxx.h in
> objdir when a system version of gmp was already installed, for instance in
> /usr/local/lib & /usr/local/include. Ominous, no?
> 
> That being said. I'll keep away from PPL and Cloog as you suggests... ^o^ ...
> until I know more my way in gcc.

I think that's best.

> (--enable-cxx is indeed referenced in the pdf manual of gmp, p.6)

Of course, it's a GMP configure option. It's not a valid GCC one, thus this PR
is invalid.


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

* [Bug bootstrap/49502] Unable to build gcc with gmp/mpc/mpfr in its tree and flag "--enable-cxx"
  2011-06-22 12:56 [Bug bootstrap/49502] New: Unable to build gcc with gmp/mpc/mpfr in its tree and flag "--enable-cxx" franck.z.bugzilla at orange dot fr
                   ` (4 preceding siblings ...)
  2011-06-23 19:41 ` redi at gcc dot gnu.org
@ 2011-06-24  8:54 ` franck.z.bugzilla at orange dot fr
  5 siblings, 0 replies; 7+ messages in thread
From: franck.z.bugzilla at orange dot fr @ 2011-06-24  8:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Franck Z <franck.z.bugzilla at orange dot fr> 2011-06-24 08:53:50 UTC ---
Agreed. :-)


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

end of thread, other threads:[~2011-06-24  8:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-22 12:56 [Bug bootstrap/49502] New: Unable to build gcc with gmp/mpc/mpfr in its tree and flag "--enable-cxx" franck.z.bugzilla at orange dot fr
2011-06-22 13:30 ` [Bug bootstrap/49502] " rguenth at gcc dot gnu.org
2011-06-23 12:03 ` franck.z.bugzilla at orange dot fr
2011-06-23 13:59 ` redi at gcc dot gnu.org
2011-06-23 18:45 ` franck.z.bugzilla at orange dot fr
2011-06-23 19:41 ` redi at gcc dot gnu.org
2011-06-24  8:54 ` franck.z.bugzilla at orange dot fr

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).