This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Segmentation Fault building GCC for i686-pc-mingw32


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

TJ Laurenzo wrote:
> I'm getting a segmentation fault in the GCC build from today's CVS
> HEAD.  I am building the suite for mingw using a cross compiler from
> Linux.  This setup was working fine prior to updating to the latest
> CVS head today.  My old sources, which were working correctly, were
> from 9/1/2005.  In both cases, I had applied patch-rev4.diff from bug
> 21766 prior to building.
> 
> If I disable optimizations by removing -O2 arguments and rerunning the
> command manually, the file compiles without error.
> 
> Let me know if there is anything else that I can provide to help nail
> down this problem.

Yes, you can provide a stacktrace and probably debug this yourself.

Read http://gcc.gnu.org/wiki/DebuggingGCC first and get the "debugx"
and "debug" scripts referred to from there.

Change to the folder:

`/home/tlaurenzo/gcc_build/gcjhcross/build/gcc-4.1-head-i686-pc-mingw32/i686-pc-mingw32/boehm-gc'

and execute once again the command that seemed to fail:

i686-pc-mingw32-gcc -DHAVE_CONFIG_H
- -I/home/tlaurenzo/gcc_build/gcjhcross/src/gcc-4.1-head/boehm-gc/include
- -fexceptions -Iinclude -I././targ-include -I.//libc/include -O2 -O2
- -g0 -pipe -fexceptions -Iinclude -I././targ-include -I.//libc/include
- -c
/home/tlaurenzo/gcc_build/gcjhcross/src/gcc-4.1-head/boehm-gc/mark_rts.c
 -DDLL_EXPORT -DPIC -o .libs/mark_rts.o

If it reproduces, execute the command once again but add "debugx cc1"
in the beginning - this will start GDB and you'd be able to debug the
actual compiler "cc1". Now enter "run" within GDB and when the fault
occurs, use "backtrace" to get a stack trace that might give you/others
more information.

HTH,
Ranjit.

> -------------------------------------------------
> make[2]: Entering directory
> `/home/tlaurenzo/gcc_build/gcjhcross/build/gcc-4.1-head-i686-pc-mingw32/i686-pc-mingw32/boehm-gc'
> /bin/sh ./libtool --mode=compile i686-pc-mingw32-gcc  -DHAVE_CONFIG_H
> -I/home/tlaurenzo/gcc_build/gcjhcross/src/gcc-4.1-head/boehm-gc/include
>  -fexceptions -Iinclude -I././targ-include -I.//libc/include -O2 -O2
> -g0 -pipe  -fexceptions -Iinclude -I././targ-include -I.//libc/include
>  -c -o mark_rts.lo
> /home/tlaurenzo/gcc_build/gcjhcross/src/gcc-4.1-head/boehm-gc/mark_rts.c
>  i686-pc-mingw32-gcc -DHAVE_CONFIG_H
> -I/home/tlaurenzo/gcc_build/gcjhcross/src/gcc-4.1-head/boehm-gc/include
> -fexceptions -Iinclude -I././targ-include -I.//libc/include -O2 -O2
> -g0 -pipe -fexceptions -Iinclude -I././targ-include -I.//libc/include
> -c /home/tlaurenzo/gcc_build/gcjhcross/src/gcc-4.1-head/boehm-gc/mark_rts.c
>  -DDLL_EXPORT -DPIC -o .libs/mark_rts.o
> /home/tlaurenzo/gcc_build/gcjhcross/src/gcc-4.1-head/boehm-gc/mark_rts.c:
> In function 'GC_approx_sp':
> /home/tlaurenzo/gcc_build/gcjhcross/src/gcc-4.1-head/boehm-gc/mark_rts.c:379:
> warning: function returns address of local variable
> /home/tlaurenzo/gcc_build/gcjhcross/src/gcc-4.1-head/boehm-gc/mark_rts.c:
> In function 'GC_add_roots_inner':
> /home/tlaurenzo/gcc_build/gcjhcross/src/gcc-4.1-head/boehm-gc/mark_rts.c:175:
> internal compiler error: Segmentation fault
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> make[2]: *** [mark_rts.lo] Error 1
> make[2]: Leaving directory
> `/home/tlaurenzo/gcc_build/gcjhcross/build/gcc-4.1-head-i686-pc-mingw32/i686-pc-mingw32/boehm-gc'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/home/tlaurenzo/gcc_build/gcjhcross/build/gcc-4.1-head-i686-pc-mingw32/i686-pc-mingw32/boehm-gc'
> make: *** [all-target-boehm-gc] Error 2
> -------------------------------------------------------------
> 


- --
Ranjit Mathew       Email: rmathew AT gmail DOT com

Bangalore, INDIA.     Web: http://ranjitmathew.hostingzero.com/




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDMWrgYb1hx2wRS48RAl6GAJ4/KT8jIu58Z0LmOdFBS+hpjCWrbACfX03I
mkhVx1Us3MtDbOy7+JaIJuM=
=Byoz
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]