[Bug bootstrap/49502] Unable to build gcc with gmp/mpc/mpfr in its tree and flag --enable-cxx

2011-06-24 Thread franck.z.bugzilla at orange dot fr
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. :-)


[Bug bootstrap/49502] Unable to build gcc with gmp/mpc/mpfr in its tree and flag --enable-cxx

2011-06-23 Thread franck.z.bugzilla at orange dot fr
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.


[Bug bootstrap/49502] Unable to build gcc with gmp/mpc/mpfr in its tree and flag --enable-cxx

2011-06-23 Thread franck.z.bugzilla at orange dot fr
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)


[Bug bootstrap/49072] Error building the compiler

2011-06-22 Thread franck.z.bugzilla at orange dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49072

--- Comment #7 from Franck Z franck.z.bugzilla at orange dot fr 2011-06-22 
09:21:41 UTC ---
In reply to comment #6)
  Hope this piece of information is useful. :-)
 Not really, if you don't say which versions of GCC and GMP/MFPR/MPC you're
 using, and your exact configure command, then it's not reproducable or
 verifiable.

My Cygwin is recent (one week old).
I have the same source tree for gcc, gcc/gmp, gcc/mpc and gcc/mpfr as the one
advised here (4.6.0, 4.3.2, 0.9 and 3.0.1).

Along with Cygwin comes:
- libgmp, libgmp3, libgmpxx4 and libgmp-devel 4.3.1-3
- libmpc1 and libmpc-devel 0.8-1
- libmpfr1 and libmpfr-devel 2.4.1-4
I edited /usr/local/include/gmpxx.h to added choke me in order to verify if
it's used by gcc's make despite gmp's source being in my source tree.

gcc output is in an objdir directory separate from my gcc source directory.
Configure script (after a make distclean command in objdir), with objdir
as my present working directory :
/path to my source/configure --enable-cx

then:
make

That's the configuration I'm testing now (make isn't finished). The first
build failures I refer too were done with pretty much the same configuration,
but for a trunk version of gcc and a one-two months old Cygwin. As I've lost
track of this precise configuration, I'm trying again with the configuration
described above.

 It also seems to be completely unrelated to this bug report, which is about
 segfaults (almost certainly due to faulty hardware) not incorrectly-detected
 system properties during configuration.

I won't fight on this point, ;-).
If my bug shows up again, I'll submit a specific bug report, so as not to
pollute this one.

Thank you.


[Bug bootstrap/49072] Error building the compiler

2011-06-22 Thread franck.z.bugzilla at orange dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49072

--- Comment #8 from Franck Z franck.z.bugzilla at orange dot fr 2011-06-22 
11:07:52 UTC ---
(In reply to comment #7)

Failure. But with a tag passed to libtool.
My Cygwin version of libtool is 2.4-1.

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

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

backtraces from makes 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

Should I file in a new bug for this one with is different?


[Bug bootstrap/49502] New: Unable to build gcc with gmp/mpc/mpfr in its tree and flag --enable-cxx

2011-06-22 Thread franck.z.bugzilla at orange dot fr
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: unassig...@gcc.gnu.org
ReportedBy: franck.z.bugzi...@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 makes 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.


[Bug bootstrap/49072] Error building the compiler

2011-06-21 Thread franck.z.bugzilla at orange dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49072

Franck Z franck.z.bugzilla at orange dot fr changed:

   What|Removed |Added

 CC||franck.z.bugzilla at orange
   ||dot fr

--- Comment #5 from Franck Z franck.z.bugzilla at orange dot fr 2011-06-21 
10:31:45 UTC ---
(In reply to comment #4)

During my first attempts to compile gcc, I also encountered problem with
in-tree compilation of GMP/MPFR/MPC, up to the point that I used the compiled
(but not up-to-date) version provided with the Cygwin distribution.

It took then place with the trunk.

Amont the weird things I observed stood out:
- a file gmpxx.h could be found and stopped compilation (with or without
--enable-xx flag in gcc's configure script)
- the architecture recognized by gmp's configure script was different when this
script was launched by me (pentium4--something from what I recall...) or by
gcc's makefile. When with gcc's makefile, gmp opted for a cross-compilation for
i686-pc-cygwin to none-pc-cygwin - although my gcc build was native.

About the architecture point, I can't tell much. But about the gmpxx.h file, I
suspect that it is a mostly silent bug and that a file
/usr/local/include/gmpxx.h provided by Cygwin is used if present.
Apparently, gmp's scripts create a gmp.h file when configure is run, but the
gmpxx.h wrapper is copied only when a command make install is issued, so that
gcc multi-stage compilation process may not have it, and this as soon as mpfr
(or mpc, I can't remember) needs to link to gmp. The failure telling that
gmpxx.h was missing occured during a configure script in mpfr (or mpc, again).

When the unavailability of gmpxx.h was by-passed by a local installation of gmp
from Cygwin, I also got a division by zero error or such later in the build
process.

I'm trying to confirm it with 4.6.0 release. I've added a choke me line at
the beginning of /usr/local/include/gmpxx.h. Right now, the gcc make command
is running (it's entered configuring stage 1 in ./gmp). It may take time
before I can get an answer.

Hope this piece of information is useful. :-)
I can't propose a patch for this if it confirms, for want of skills in
makefiles as big as gcc's.