public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* mingw svn trunk failure
@ 2006-12-19 15:54 Bob Rossi
  2006-12-19 22:32 ` Bob Rossi
  0 siblings, 1 reply; 14+ messages in thread
From: Bob Rossi @ 2006-12-19 15:54 UTC (permalink / raw)
  To: gcc-help

Hi,

Is this the correct place to talk about problems compiling gcc on mingw?

If I checkout svn trunk, and do, 

mkdir gcc-builddir-1
cd gcc-builddir-1
../gcc/configure  --disable-werror  --with-gmp=/home/bobbybrasko/gcc/gmp/gmp \
--with-mpfr=/home/bobbybrasko/gcc/mpfr/prefixdir  --host=mingw32 \
--target=mingw32 --prefix=/c/mingw  --program-suffix="-4.1"  --with-gcc \
--with-gnu-ld  --with-gnu-as  --enable-threads=win32  --disable-nls \
--enable-languages=c,c++  --disable-win32-registry  --disable-shared \
--enable-static  --without-x  --enable-libstdcxx-debug \
2>&1 | tee configure-out.txt

then I do,

cd gcc-builddir-1
make  CFLAGS="-O2 -fomit-frame-pointer" \
CXXFLAGS="-mthreads -fno-omit-frame-pointer -O2"  LDFLAGS=-s \
bootstrap 2>&1 | tee make-out.txt

Now, when I compile gcc, I get this error,

make[4]: Entering directory `/home/bobbybrasko/gcc/svn-head/gcc-builddir-1/gcc'                         
/home/bobbybrasko/gcc/svn-head/gcc-builddir-1/./gcc/xgcc -B/home/bobbybrasko/gcc/svn-head/gcc-builddir-1
/./gcc/ -L/home/bobbybrasko/gcc/svn-head/gcc-builddir-1/mingw32/winsup/mingw -L/home/bobbybrasko/gcc/svn
-head/gcc-builddir-1/mingw32/winsup/w32api/lib -isystem /home/bobbybrasko/gcc/svn-head/gcc/winsup/mingw/
include -isystem /home/bobbybrasko/gcc/svn-head/gcc/winsup/w32api/include -B/c/mingw/mingw32/bin/ -B/c/m
ingw/mingw32/lib/ -isystem /c/mingw/mingw32/include -isystem /c/mingw/mingw32/sys-include -O2 -I../../gc
c/gcc/../winsup/w32api/include -O2 -O2 -fomit-frame-pointer  -DIN_GCC    -W -Wall -Wwrite-strings -Wstri
ct-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g -DHAVE_GTHR_DEFAULT -
DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../inclu
de -I../../gcc/gcc/../libcpp/include -I/home/bobbybrasko/gcc/gmp/gmp/include -I/home/bobbybrasko/gcc/mpf
r/prefixdir/include -I../../gcc/gcc/../libdecnumber -I../libdecnumber -DL_chkstk -xassembler-with-cpp -c
 ../../gcc/gcc/config/i386/cygwin.asm -o libgcc/./_chkstk.o                                             
cc1.exe: internal compiler error: in add_standard_paths, at c-incpath.c:173                             
Please submit a full bug report,                                                                        
with preprocessed source if appropriate.                                                                
See <URL:http://gcc.gnu.org/bugs.html> for instructions.                                                
make[4]: *** [libgcc/./_chkstk.o] Error 1                                                               
make[4]: Leaving directory `/home/bobbybrasko/gcc/svn-head/gcc-builddir-1/gcc'                          
make[3]: *** [libgcc.a] Error 2                                                                         
make[3]: Leaving directory `/home/bobbybrasko/gcc/svn-head/gcc-builddir-1/gcc'                          
make[2]: *** [all-stage1-gcc] Error 2                                                                   
make[2]: Leaving directory `/home/bobbybrasko/gcc/svn-head/gcc-builddir-1'                              
make[1]: *** [stage1-bubble] Error 2                                                                    
make[1]: Leaving directory `/home/bobbybrasko/gcc/svn-head/gcc-builddir-1'                              
make: *** [bootstrap] Error 2                                                                           

At c-incpath.c:173 I have,

              /* If the compiler is relocated, and this is a configured 
                 prefix relative path, then we use gcc_exec_prefix instead 
                 of the configured prefix.  */
              gcc_assert (strncmp (p->fname, cpp_PREFIX,
                                     cpp_PREFIX_len) == 0);

The values of the varaiables are,
  p->fname=/c/mingw/include cpp_PREFIX=c:/mingw cpp_PREFIX_len=8

I've also tried with --prefix=/mingw, and that simply changes the fname
to /mingw/include, and it still fails at the same point. If I change the
prefix to C:/mingw, I get totally different errors. I don't think the
Makefile is happy with the : there.

Should I report this as a bug? Is there any easy way someone can help me
debug this further to fix it?

Thanks,
Bob Rossi

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

* Re: mingw svn trunk failure
  2006-12-19 15:54 mingw svn trunk failure Bob Rossi
@ 2006-12-19 22:32 ` Bob Rossi
  2006-12-19 22:50   ` Carlos O'Donell
                     ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Bob Rossi @ 2006-12-19 22:32 UTC (permalink / raw)
  To: gcc-help; +Cc: carlos, mark

On Tue, Dec 19, 2006 at 10:53:54AM -0500, Bob Rossi wrote:
> Hi,
> 
> Is this the correct place to talk about problems compiling gcc on mingw?
> 
> If I checkout svn trunk, and do, 

I've reverted this patch,
  http://gcc.gnu.org/viewcvs?view=rev&revision=119017
and I am able to build svn trunk without a problem. It may not solve the
problem I'm having (making gcc relocatable), but it does build.

Mark or Carlos, do you have any idea why this patch is giving me an
assertion? What should I do?

Thanks,
Bob Rossi

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

* Re: mingw svn trunk failure
  2006-12-19 22:32 ` Bob Rossi
@ 2006-12-19 22:50   ` Carlos O'Donell
  2006-12-19 22:59     ` Bob Rossi
  2006-12-19 23:47   ` Carlos O'Donell
  2006-12-20  0:29   ` Bob Rossi
  2 siblings, 1 reply; 14+ messages in thread
From: Carlos O'Donell @ 2006-12-19 22:50 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gcc-help, mark

On Tue, Dec 19, 2006 at 05:32:24PM -0500, Bob Rossi wrote:
> On Tue, Dec 19, 2006 at 10:53:54AM -0500, Bob Rossi wrote:
> > Hi,
> > 
> > Is this the correct place to talk about problems compiling gcc on mingw?
> > 
> > If I checkout svn trunk, and do, 
> 
> I've reverted this patch,
>   http://gcc.gnu.org/viewcvs?view=rev&revision=119017
> and I am able to build svn trunk without a problem. It may not solve the
> problem I'm having (making gcc relocatable), but it does build.
> 
> Mark or Carlos, do you have any idea why this patch is giving me an
> assertion? What should I do?

It is giving you an assertion because the relocated toolchain is
referencing an external directory which is not relocatable. We did this
to make sure we had the logic right.

I will bet you used --with-slibdir or --with-gxx-include-dir that
references an absolute path?

I have a patch that will fix this. I'll post it this evening.

Bob, could you please provide your gcc configure options?

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716

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

* Re: mingw svn trunk failure
  2006-12-19 22:50   ` Carlos O'Donell
@ 2006-12-19 22:59     ` Bob Rossi
  2006-12-19 23:58       ` Carlos O'Donell
  0 siblings, 1 reply; 14+ messages in thread
From: Bob Rossi @ 2006-12-19 22:59 UTC (permalink / raw)
  To: Carlos O'Donell; +Cc: gcc-help, mark

On Tue, Dec 19, 2006 at 05:49:10PM -0500, Carlos O'Donell wrote:
> On Tue, Dec 19, 2006 at 05:32:24PM -0500, Bob Rossi wrote:
> > On Tue, Dec 19, 2006 at 10:53:54AM -0500, Bob Rossi wrote:
> > > Hi,
> > > 
> > > Is this the correct place to talk about problems compiling gcc on mingw?
> > > 
> > > If I checkout svn trunk, and do, 
> > 
> > I've reverted this patch,
> >   http://gcc.gnu.org/viewcvs?view=rev&revision=119017
> > and I am able to build svn trunk without a problem. It may not solve the
> > problem I'm having (making gcc relocatable), but it does build.
> > 
> > Mark or Carlos, do you have any idea why this patch is giving me an
> > assertion? What should I do?
> 
> It is giving you an assertion because the relocated toolchain is
> referencing an external directory which is not relocatable. We did this
> to make sure we had the logic right.
> 
> I will bet you used --with-slibdir or --with-gxx-include-dir that
> references an absolute path?
> 
> I have a patch that will fix this. I'll post it this evening.
> 
> Bob, could you please provide your gcc configure options?

Hi Carlos,

It's all here,
http://gcc.gnu.org/ml/gcc-help/2006-12/msg00279.html
What do you think?

Bob Rossi

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

* Re: mingw svn trunk failure
  2006-12-19 22:32 ` Bob Rossi
  2006-12-19 22:50   ` Carlos O'Donell
@ 2006-12-19 23:47   ` Carlos O'Donell
  2006-12-20  0:29   ` Bob Rossi
  2 siblings, 0 replies; 14+ messages in thread
From: Carlos O'Donell @ 2006-12-19 23:47 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gcc-help, mark

On Tue, Dec 19, 2006 at 05:32:24PM -0500, Bob Rossi wrote:
> On Tue, Dec 19, 2006 at 10:53:54AM -0500, Bob Rossi wrote:
> > Hi,
> > 
> > Is this the correct place to talk about problems compiling gcc on mingw?
> > 
> > If I checkout svn trunk, and do, 
> 
> I've reverted this patch,
>   http://gcc.gnu.org/viewcvs?view=rev&revision=119017
> and I am able to build svn trunk without a problem. It may not solve the
> problem I'm having (making gcc relocatable), but it does build.
> 
> Mark or Carlos, do you have any idea why this patch is giving me an
> assertion? What should I do?

As a workaround you can use this patch. After testing I will be sending
this to gcc-patches.

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716

Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 120053)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2006-12-19  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* gcc/c-incpath.c (add_standard_paths): Only assert when a path is 
+	not relocatable and we are cross-compiling. 
+
 2006-12-19  Paolo Bonzini  <bonzini@gnu.org>
 
 	PR bootstrap/29544
Index: gcc/c-incpath.c
===================================================================
--- gcc/c-incpath.c	(revision 120053)
+++ gcc/c-incpath.c	(working copy)
@@ -169,11 +169,23 @@ add_standard_paths (const char *sysroot,
 	      /* If the compiler is relocated, and this is a configured 
 		 prefix relative path, then we use gcc_exec_prefix instead 
 		 of the configured prefix.  */
-	      gcc_assert (strncmp (p->fname, cpp_PREFIX,
-				     cpp_PREFIX_len) == 0);
-	      str = concat (gcc_exec_prefix, p->fname
-			      + cpp_PREFIX_len, NULL);
-	      str = update_path (str, p->component);
+	      if (strncmp (p->fname, cpp_PREFIX, cpp_PREFIX_len) == 0)
+		{
+		  str = concat (gcc_exec_prefix, p->fname
+				+ cpp_PREFIX_len, NULL);
+		  str = update_path (str, p->component);
+		}
+	      else
+		{
+#ifndef CROSS_COMPILE
+		  str = update_path (p->fname, p->component);
+#else
+		  /* When cross-compiling, we do not want to search host
+		     paths, so we should have no paths outside of both
+		     the sysroot and the relocated prefix.  */
+		  abort ();
+#endif
+		}
 	    }
 	  else
 	    str = update_path (p->fname, p->component);

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

* Re: mingw svn trunk failure
  2006-12-19 22:59     ` Bob Rossi
@ 2006-12-19 23:58       ` Carlos O'Donell
  2006-12-20  0:24         ` Bob Rossi
  2006-12-20  1:56         ` Bob Rossi
  0 siblings, 2 replies; 14+ messages in thread
From: Carlos O'Donell @ 2006-12-19 23:58 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gcc-help, mark

On Tue, Dec 19, 2006 at 05:59:09PM -0500, Bob Rossi wrote:
> > Bob, could you please provide your gcc configure options?
> 
> Hi Carlos,
> 
> It's all here,
> http://gcc.gnu.org/ml/gcc-help/2006-12/msg00279.html
> What do you think?

-----
The values of the varaiables are,
  p->fname=/c/mingw/include cpp_PREFIX=c:/mingw cpp_PREFIX_len=8
-----

This is not at all what I expected. The problem here is that you are
configuring mingw under cygwin, and the cygwin paths are not translated.
I will have to think about this.

Could you tell me what errors you get when using --prefix='c:/mingw'?

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716

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

* Re: mingw svn trunk failure
  2006-12-19 23:58       ` Carlos O'Donell
@ 2006-12-20  0:24         ` Bob Rossi
  2006-12-20  1:23           ` Carlos O'Donell
  2006-12-20  1:56         ` Bob Rossi
  1 sibling, 1 reply; 14+ messages in thread
From: Bob Rossi @ 2006-12-20  0:24 UTC (permalink / raw)
  To: Carlos O'Donell; +Cc: gcc-help, mark

On Tue, Dec 19, 2006 at 06:58:26PM -0500, Carlos O'Donell wrote:
> On Tue, Dec 19, 2006 at 05:59:09PM -0500, Bob Rossi wrote:
> > > Bob, could you please provide your gcc configure options?
> > 
> > Hi Carlos,
> > 
> > It's all here,
> > http://gcc.gnu.org/ml/gcc-help/2006-12/msg00279.html
> > What do you think?
> 
> -----
> The values of the varaiables are,
>   p->fname=/c/mingw/include cpp_PREFIX=c:/mingw cpp_PREFIX_len=8
> -----
> 
> This is not at all what I expected. The problem here is that you are
> configuring mingw under cygwin, and the cygwin paths are not translated.
> I will have to think about this.
> 
> Could you tell me what errors you get when using --prefix='c:/mingw'?

No, I'm not configuring mingw under cygwin. I'm configuring it in a
native mingw sh shell. Yeah, I tried C:/mingw, and that gives me lot's 
Makefile errors. Is it a problem for the C:/ to be in the prefix for 
Makefile targets?

I'll rebuild with that as the prefix and tell you what the problems are.

Bob Rossi

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

* Re: mingw svn trunk failure
  2006-12-19 22:32 ` Bob Rossi
  2006-12-19 22:50   ` Carlos O'Donell
  2006-12-19 23:47   ` Carlos O'Donell
@ 2006-12-20  0:29   ` Bob Rossi
  2006-12-20  1:45     ` Carlos O'Donell
  2 siblings, 1 reply; 14+ messages in thread
From: Bob Rossi @ 2006-12-20  0:29 UTC (permalink / raw)
  To: gcc-help, carlos, mark

O  Tue, Dec 19, 2006 at 05:32:24PM -0500, Bob Rossi wrote:
> On Tue, Dec 19, 2006 at 10:53:54AM -0500, Bob Rossi wrote:
> > Hi,
> > 
> > Is this the correct place to talk about problems compiling gcc on mingw?
> > 
> > If I checkout svn trunk, and do, 
> 
> I've reverted this patch,
>   http://gcc.gnu.org/viewcvs?view=rev&revision=119017
> and I am able to build svn trunk without a problem. It may not solve the
> problem I'm having (making gcc relocatable), but it does build.
> 
> Mark or Carlos, do you have any idea why this patch is giving me an
> assertion? What should I do?

Hi Carlos, 

I'm sorry. I've run it 2 ways. With prefix=/c/mingw and with
prefix=/mingw. prefix=/mingw is the historically correct way to do this
from what I understand. I only tried it with /c/mingw once as a test to
see if it would work around the problem I found.

With --prefix=/mingw my configure line was,

mkdir gcc-builddir-0
cd gcc-builddir-0
../gcc/configure \
--disable-werror \
--with-gmp=/home/bobbybrasko/gcc/gmp/gmp \
--with-mpfr=/home/bobbybrasko/gcc/mpfr/prefixdir \
--host=mingw32 \
--target=mingw32 \
--prefix=/mingw \
--program-suffix="-4.1" \
--with-gcc \
--with-gnu-ld \
--with-gnu-as \
--enable-threads=win32 \
--disable-nls \
--enable-languages=c,c++ \
--disable-win32-registry \
--disable-shared \
--enable-static \
--without-x \
--enable-libstdcxx-debug \
2>&1 | tee configure-out.txt

Here was the build line,
cd gcc-builddir-0
make \
CFLAGS="-O2 -fomit-frame-pointer" \
CXXFLAGS="-mthreads -fno-omit-frame-pointer -O2" \
LDFLAGS=-s \
bootstrap 2>&1 | tee make-out.txt


And the debug info was found here,
  http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01356.html
p->fname=/mingw/include cpp_PREFIX=C:/mingw cpp_PREFIX_len=8

Sorry about the confusion.

Thanks,
Bob Rossi

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

* Re: mingw svn trunk failure
  2006-12-20  0:24         ` Bob Rossi
@ 2006-12-20  1:23           ` Carlos O'Donell
  0 siblings, 0 replies; 14+ messages in thread
From: Carlos O'Donell @ 2006-12-20  1:23 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gcc-help, mark

On Tue, Dec 19, 2006 at 07:24:15PM -0500, Bob Rossi wrote:
> > -----
> > The values of the varaiables are,
> >   p->fname=/c/mingw/include cpp_PREFIX=c:/mingw cpp_PREFIX_len=8
> > -----
> > 
> > This is not at all what I expected. The problem here is that you are
> > configuring mingw under cygwin, and the cygwin paths are not translated.
> > I will have to think about this.
> > 
> > Could you tell me what errors you get when using --prefix='c:/mingw'?
> 
> No, I'm not configuring mingw under cygwin. I'm configuring it in a
> native mingw sh shell. Yeah, I tried C:/mingw, and that gives me lot's 
> Makefile errors. Is it a problem for the C:/ to be in the prefix for 
> Makefile targets?

This is all a problem with your environment.

The path "/c/mingw" is not a valid Windows path, it is a cygwin style
path which is being mapped to a windows path. 

Are you using MSYS?

I think this question is probably more suited to the mailing lists on
http://www.mingw.org/

> I'll rebuild with that as the prefix and tell you what the problems are.

Why are you doing 'make bootstrap'?

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716

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

* Re: mingw svn trunk failure
  2006-12-20  0:29   ` Bob Rossi
@ 2006-12-20  1:45     ` Carlos O'Donell
  2006-12-20  4:53       ` Bob Rossi
  0 siblings, 1 reply; 14+ messages in thread
From: Carlos O'Donell @ 2006-12-20  1:45 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gcc-help, mark

On Tue, Dec 19, 2006 at 07:29:17PM -0500, Bob Rossi wrote:
> I'm sorry. I've run it 2 ways. With prefix=/c/mingw and with
> prefix=/mingw. prefix=/mingw is the historically correct way to do this
> from what I understand. I only tried it with /c/mingw once as a test to
> see if it would work around the problem I found.
> 
> With --prefix=/mingw my configure line was,
> 
> mkdir gcc-builddir-0
> cd gcc-builddir-0
> ../gcc/configure \
> --disable-werror \
> --with-gmp=/home/bobbybrasko/gcc/gmp/gmp \
> --with-mpfr=/home/bobbybrasko/gcc/mpfr/prefixdir \
> --host=mingw32 \
> --target=mingw32 \

What does your 'build' default to?

> --prefix=/mingw \
> --program-suffix="-4.1" \
> --with-gcc \
> --with-gnu-ld \
> --with-gnu-as \
> --enable-threads=win32 \
> --disable-nls \
> --enable-languages=c,c++ \
> --disable-win32-registry \
> --disable-shared \
> --enable-static \
> --without-x \
> --enable-libstdcxx-debug \
> 2>&1 | tee configure-out.txt
> 
> Here was the build line,
> cd gcc-builddir-0
> make \
> CFLAGS="-O2 -fomit-frame-pointer" \
> CXXFLAGS="-mthreads -fno-omit-frame-pointer -O2" \
> LDFLAGS=-s \
> bootstrap 2>&1 | tee make-out.txt
> 
> And the debug info was found here,
>   http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01356.html
> p->fname=/mingw/include cpp_PREFIX=C:/mingw cpp_PREFIX_len=8
> 
> Sorry about the confusion.

No worries. I'm sorry this broke the bootstrap process. We'll get it
fixed with a little more work :-)

I have a new patch for you if you want to try. This one is completely
untested, but I think it will do what you need.

If you can test this I would be *very* grateful, and then I can get this
upstream.

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716

2006-12-19  Carlos O'Donell  <carlos@codesourcery.com>

	* gcc/c-incpath.c (add_standard_paths): Only rewrite paths
	that start with the configured prefix.

Index: gcc/c-incpath.c
===================================================================
--- gcc/c-incpath.c	(revision 120053)
+++ gcc/c-incpath.c	(working copy)
@@ -164,13 +164,12 @@ add_standard_paths (const char *sysroot,
 	  /* Should this directory start with the sysroot?  */
 	  if (sysroot && p->add_sysroot)
 	    str = concat (sysroot, p->fname, NULL);
-	  else if (!p->add_sysroot && relocated)
+	  else if (!p->add_sysroot && relocated
+		   && strncmp (p->fname, cpp_PREFIX, cpp_PREFIX_len) == 0)
 	    {
 	      /* If the compiler is relocated, and this is a configured 
 		 prefix relative path, then we use gcc_exec_prefix instead 
 		 of the configured prefix.  */
-	      gcc_assert (strncmp (p->fname, cpp_PREFIX,
-				     cpp_PREFIX_len) == 0);
 	      str = concat (gcc_exec_prefix, p->fname
 			      + cpp_PREFIX_len, NULL);
 	      str = update_path (str, p->component);

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

* Re: mingw svn trunk failure
  2006-12-19 23:58       ` Carlos O'Donell
  2006-12-20  0:24         ` Bob Rossi
@ 2006-12-20  1:56         ` Bob Rossi
  2006-12-20  2:33           ` Carlos O'Donell
  1 sibling, 1 reply; 14+ messages in thread
From: Bob Rossi @ 2006-12-20  1:56 UTC (permalink / raw)
  To: Carlos O'Donell; +Cc: gcc-help, mark

On Tue, Dec 19, 2006 at 06:58:26PM -0500, Carlos O'Donell wrote:
> On Tue, Dec 19, 2006 at 05:59:09PM -0500, Bob Rossi wrote:
> > > Bob, could you please provide your gcc configure options?
> > 
> > Hi Carlos,
> > 
> > It's all here,
> > http://gcc.gnu.org/ml/gcc-help/2006-12/msg00279.html
> > What do you think?
> 
> -----
> The values of the varaiables are,
>   p->fname=/c/mingw/include cpp_PREFIX=c:/mingw cpp_PREFIX_len=8
> -----
> 
> This is not at all what I expected. The problem here is that you are
> configuring mingw under cygwin, and the cygwin paths are not translated.
> I will have to think about this.
> 
> Could you tell me what errors you get when using --prefix='c:/mingw'?

I'm not sure if you still care, but I had the below error messages with
the exact same configure and build line, except change --prefix=/mingw
to --prefix=C:/mingw.

I think it's because make doesn't handle the : well, but I have no idea.
Bob Rossi

echo | /home/bobbybrasko/gcc/svn-trunk-orig/gcc-builddir-0/./gcc/xgcc -B/home/bobbybrasko/gcc/svn-trunk-
orig/gcc-builddir-0/./gcc/ -L/home/bobbybrasko/gcc/svn-trunk-orig/gcc-builddir-0/mingw32/winsup/mingw -L
/home/bobbybrasko/gcc/svn-trunk-orig/gcc-builddir-0/mingw32/winsup/w32api/lib -isystem /home/bobbybrasko
/gcc/svn-trunk-orig/gcc/winsup/mingw/include -isystem /home/bobbybrasko/gcc/svn-trunk-orig/gcc/winsup/w3
2api/include -BC:/mingw/mingw32/bin/ -BC:/mingw/mingw32/lib/ -isystem C:/mingw/mingw32/include -isystem 
C:/mingw/mingw32/sys-include -E -dM - | \                                                               
  sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \                                                 
         -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \                                           
  sort -u > tmp-macro_list                                                                              
/bin/sh ../../gcc/gcc/../move-if-change tmp-macro_list macro_list                                       
echo timestamp > s-macro_list                                                                           
rm -rf include; mkdir include                                                                           
chmod a+rx include                                                                                      
if [ -d ../prev-gcc ]; then \                                                                           
  cd ../prev-gcc && \                                                                                   
  make real-install-headers-tar DESTDIR=`pwd`/../gcc/ \                                                 
    libsubdir=. ; \                                                                                     
else \                                                                                                  
  (TARGET_MACHINE='i386-pc-mingw32'; srcdir=`cd ../../gcc/gcc; ${PWDCMD-pwd}`; \                        
    SHELL='/bin/sh'; MACRO_LIST=`${PWDCMD-pwd}`/macro_list ; \                                          
    export TARGET_MACHINE srcdir SHELL MACRO_LIST && \                                                  
    cd ../build-mingw32/fixincludes && \                                                                
    /bin/sh ./fixinc.sh ../../gcc/include \                                                             
      `echo /mingw/include | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`  ); \                               
  rm -f include/syslimits.h; \                                                                          
  if [ -f include/limits.h ]; then \                                                                    
    mv include/limits.h include/syslimits.h; \                                                          
  else \                                                                                                
    cp ../../gcc/gcc/gsyslimits.h include/syslimits.h; \                                                
  fi; \                                                                                                 
fi                                                                                                      
make[4]: Entering directory `/home/bobbybrasko/gcc/svn-trunk-orig/gcc-builddir-0/prev-gcc'              
../../gcc/gcc/ada/Make-lang.in:430: *** multiple target patterns.  Stop.                                
make[4]: Leaving directory `/home/bobbybrasko/gcc/svn-trunk-orig/gcc-builddir-0/prev-gcc'               
make[3]: *** [stmp-fixinc] Error 2                                                                      
make[3]: Leaving directory `/home/bobbybrasko/gcc/svn-trunk-orig/gcc-builddir-0/gcc'                    
make[2]: *** [all-stage2-gcc] Error 2                                                                   
make[2]: Leaving directory `/home/bobbybrasko/gcc/svn-trunk-orig/gcc-builddir-0'                        
make[1]: *** [stage2-bubble] Error 2                                                                    
make[1]: Leaving directory `/home/bobbybrasko/gcc/svn-trunk-orig/gcc-builddir-0'                        
make: *** [bootstrap] Error 2                                                                           

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

* Re: mingw svn trunk failure
  2006-12-20  1:56         ` Bob Rossi
@ 2006-12-20  2:33           ` Carlos O'Donell
  0 siblings, 0 replies; 14+ messages in thread
From: Carlos O'Donell @ 2006-12-20  2:33 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gcc-help, mark

On Tue, Dec 19, 2006 at 08:56:10PM -0500, Bob Rossi wrote:
> > Could you tell me what errors you get when using --prefix='c:/mingw'?
> 
> I'm not sure if you still care, but I had the below error messages with
> the exact same configure and build line, except change --prefix=/mingw
> to --prefix=C:/mingw.
> 
> I think it's because make doesn't handle the : well, but I have no idea.
> Bob Rossi

We aren't interested in this case anymore. When bootstrapping *-mingw32
the paths are not going to match.

Thanks for looking into this.

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716

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

* Re: mingw svn trunk failure
  2006-12-20  1:45     ` Carlos O'Donell
@ 2006-12-20  4:53       ` Bob Rossi
  2006-12-20 17:24         ` Carlos O'Donell
  0 siblings, 1 reply; 14+ messages in thread
From: Bob Rossi @ 2006-12-20  4:53 UTC (permalink / raw)
  To: Carlos O'Donell; +Cc: gcc-help, mark

[-- Attachment #1: Type: text/plain, Size: 4192 bytes --]

On Tue, Dec 19, 2006 at 08:45:41PM -0500, Carlos O'Donell wrote:
> On Tue, Dec 19, 2006 at 07:29:17PM -0500, Bob Rossi wrote:
> > I'm sorry. I've run it 2 ways. With prefix=/c/mingw and with
> > prefix=/mingw. prefix=/mingw is the historically correct way to do this
> > from what I understand. I only tried it with /c/mingw once as a test to
> > see if it would work around the problem I found.
> > 
> > With --prefix=/mingw my configure line was,
> > 
> > mkdir gcc-builddir-0
> > cd gcc-builddir-0
> > ../gcc/configure \
> > --disable-werror \
> > --with-gmp=/home/bobbybrasko/gcc/gmp/gmp \
> > --with-mpfr=/home/bobbybrasko/gcc/mpfr/prefixdir \
> > --host=mingw32 \
> > --target=mingw32 \
> 
> What does your 'build' default to?

I'm not sure what you are asking, sorry. Is this what you want to know?
checking host system type... i386-pc-mingw32
checking target system type... i386-pc-mingw32
checking build system type... i386-pc-mingw32

> > --prefix=/mingw \
> > --program-suffix="-4.1" \
> > --with-gcc \
> > --with-gnu-ld \
> > --with-gnu-as \
> > --enable-threads=win32 \
> > --disable-nls \
> > --enable-languages=c,c++ \
> > --disable-win32-registry \
> > --disable-shared \
> > --enable-static \
> > --without-x \
> > --enable-libstdcxx-debug \
> > 2>&1 | tee configure-out.txt
> > 
> > Here was the build line,
> > cd gcc-builddir-0
> > make \
> > CFLAGS="-O2 -fomit-frame-pointer" \
> > CXXFLAGS="-mthreads -fno-omit-frame-pointer -O2" \
> > LDFLAGS=-s \
> > bootstrap 2>&1 | tee make-out.txt
> > 
> > And the debug info was found here,
> >   http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01356.html
> > p->fname=/mingw/include cpp_PREFIX=C:/mingw cpp_PREFIX_len=8
> > 
> > Sorry about the confusion.
> 
> No worries. I'm sorry this broke the bootstrap process. We'll get it
> fixed with a little more work :-)
> 
> I have a new patch for you if you want to try. This one is completely
> untested, but I think it will do what you need.
> 
> If you can test this I would be *very* grateful, and then I can get this
> upstream.

Yup, this get's me past the problem that I was having. I still have the
same problem I've had all along. Maybe you'll know the solution.  

If I do a 
  make DESTDIR=/home/bobbybrasko/gcc/svn-trunk-orig/destdir install
and then I do
  $ PATH=/home/bobbybrasko/gcc/svn-trunk-orig/destdir/mingw/bin:$PATH gcc-4.1 -o main main.c              
I can compile a C hello world program. But if I do,
  $ PATH=/home/bobbybrasko/gcc/svn-trunk-orig/destdir/mingw/bin:$PATH g++-4.1 -o main main.cpp            
  main.cpp:1:20: error: iostream: No such file or directory                                               
  main.cpp: In function 'int main(int, char**)':                                                          
  main.cpp:8: error: 'cout' was not declared in this scope                                                
  main.cpp:8: error: 'endl' was not declared in this scope                                                
I can't compile a C++ hello world program.

Now, if I do 'tar -cvf mingw.tar mingw' and move it to another windows
machine, and then untar binutils, w32api, and mingw-runtime into the
directory and run like,
  set PATH=V:\black\files\gcc\mingw\bin;C:\windows\system32
and then
  gcc-4.1 -o main main.c
it works fine, but
  g++-4.1 -o main main.cpp 
gives the error, can not find iostream. I've attached the output of
g++-4.1 -v -o main main.cpp. If I move the mingw directory on that
machine to C:/mingw, I get the same exact results.

Now, unfortunatly, I confiured svn trunk with suffix -4.1. If I actually
use the gcc 4.1 release, I can get gcc and g++ to work on another
windows machine if it's located in C:/mingw only. Not if it's located in
say C:/foo/mingw.

So, I think things have gone from good 3.x series (used to be completly
relocatable), to bad in 4.1 series (can't relocate to anywhere but
C:/mingw or --prefix perhaps) to worse in svn trunk (can't get it to
work at all.

Now this may be entirely my fault, but at least I can reproduce the
differences between gcc-4.1.1 and trunk.

Any ideas? If not, do you know where I could send in such a problem? No
one seems to be able to help me.

Thanks,
Bob Rossi

[-- Attachment #2: main.cpp.txt --]
[-- Type: text/plain, Size: 1768 bytes --]

Using built-in specs.
Target: mingw32
Configured with: ../gcc/configure --disable-werror --with-gmp=/home/bobbybrasko/gcc/gmp/gmp --with-mpfr=/home/bobbybrasko/gcc/mpfr/prefixdir --host=mingw32 --target=mingw32 --prefix=/mingw --program-suffix=-4.1 --with-gcc --with-gnu-ld --with-gnu-as --enable-threads=win32 --disable-nls --enable-languages=c,c++ --disable-win32-registry --disable-shared --enable-static --without-x --enable-libstdcxx-debug
Thread model: win32
gcc version 4.3.0 20061220 (experimental)
 v:/black/files/gcc/mingw/bin/../libexec/gcc/mingw32/4.3.0/cc1plus.exe -quiet -v -iprefix v:\black\files\gcc\mingw\bin\../lib/gcc/mingw32/4.3.0/ main.cpp -quiet -dumpbase main.cpp -mtune=i386 -auxbase main -version -o C:\DOCUME~1\KELLIR~1\LOCALS~1\Temp/ccsobsYK.s
ignoring nonexistent directory "v:/black/files/gcc/mingw/bin/../lib/gcc//include/c++/4.3.0"
ignoring nonexistent directory "v:/black/files/gcc/mingw/bin/../lib/gcc//include/c++/4.3.0/mingw32"
ignoring nonexistent directory "v:/black/files/gcc/mingw/bin/../lib/gcc//include/c++/4.3.0/backward"
ignoring nonexistent directory "v:/black/files/gcc/mingw/bin/../lib/gcc//lib/gcc/mingw32/4.3.0/include"
ignoring nonexistent directory "v:/black/files/gcc/mingw/bin/../lib/gcc//mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
 v:/black/files/gcc/mingw/bin/../lib/gcc/mingw32/4.3.0/include
 C:/mingw/include
 /mingw/include
 /mingw/include
End of search list.
GNU C++ version 4.3.0 20061220 (experimental) (mingw32)
	compiled by GNU C version 4.3.0 20061220 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: e4ce5a8d1ca57339ac0ea93b5e073770
main.cpp:1:20: error: iostream: No such file or directory

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

* Re: mingw svn trunk failure
  2006-12-20  4:53       ` Bob Rossi
@ 2006-12-20 17:24         ` Carlos O'Donell
  0 siblings, 0 replies; 14+ messages in thread
From: Carlos O'Donell @ 2006-12-20 17:24 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gcc-help, mark

On Tue, Dec 19, 2006 at 11:53:41PM -0500, Bob Rossi wrote:
> > What does your 'build' default to?
> 
> I'm not sure what you are asking, sorry. Is this what you want to know?
> checking host system type... i386-pc-mingw32
> checking target system type... i386-pc-mingw32
> checking build system type... i386-pc-mingw32

This is exactly what I wanted to know. Thanks.
 
> > I have a new patch for you if you want to try. This one is completely
> > untested, but I think it will do what you need.
> > 
> > If you can test this I would be *very* grateful, and then I can get this
> > upstream.
> 
> Yup, this get's me past the problem that I was having. I still have the
> same problem I've had all along. Maybe you'll know the solution.  
 
You need to use a sysroot.

You have a native compiler, without any of the standard native paths
available, and therefore it can't find the headers it needs.

Lastly, when you relocate the toolchain, all the configure prefix
relative paths are relocated aswell.

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716

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

end of thread, other threads:[~2006-12-20 17:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-19 15:54 mingw svn trunk failure Bob Rossi
2006-12-19 22:32 ` Bob Rossi
2006-12-19 22:50   ` Carlos O'Donell
2006-12-19 22:59     ` Bob Rossi
2006-12-19 23:58       ` Carlos O'Donell
2006-12-20  0:24         ` Bob Rossi
2006-12-20  1:23           ` Carlos O'Donell
2006-12-20  1:56         ` Bob Rossi
2006-12-20  2:33           ` Carlos O'Donell
2006-12-19 23:47   ` Carlos O'Donell
2006-12-20  0:29   ` Bob Rossi
2006-12-20  1:45     ` Carlos O'Donell
2006-12-20  4:53       ` Bob Rossi
2006-12-20 17:24         ` Carlos O'Donell

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