www.digitalmars.com         C & C++   DMDScript  

D.gnu - setup-gcc.sh fails to patch tree-sra.c

reply Jason House <jason.james.house gmail.com> writes:
I have tried to build gdc, but no matter what version of gcc I use, the patch
to tree-sra.c always fails.  I have tried with 4.0.4 and 4.1.2

With 4.0.4, here's what I get:

gcc-4.0.4$ gcc/d/setup-gcc.sh
patching file Makefile.def
patching file Makefile.in
patching file configure
Hunk #4 succeeded at 5152 (offset 6 lines).
patching file configure.in
Hunk #4 succeeded at 2181 (offset 6 lines).
patching file cgraph.c
patching file config/i386/i386.c
Hunk #2 succeeded at 16034 (offset 59 lines).
patching file config/rs6000/rs6000.c
Hunk #1 succeeded at 15326 (offset 43 lines).
patching file dwarf2.h
patching file dwarf2out.c
Hunk #1 succeeded at 5165 (offset -1 lines).
Hunk #2 succeeded at 11890 (offset 9 lines).
patching file expr.c
Hunk #1 succeeded at 8221 (offset 4 lines).
patching file function.c
patching file function.h
patching file gcc.c
patching file gcc.h
patching file gimplify.c
Hunk #1 succeeded at 3861 (offset 17 lines).
patching file tree-dump.c
patching file tree-gimple.c
Hunk #1 succeeded at 71 (offset -2 lines).
Hunk #2 succeeded at 144 (offset -2 lines).
patching file tree-inline.c
patching file tree-nested.c
patching file tree-pretty-print.c
patching file tree-sra.c
Hunk #1 FAILED at 196.
Hunk #2 FAILED at 207.
2 out of 2 hunks FAILED -- saving rejects to file tree-sra.c.rej
patching file tree.def
Hunk #1 succeeded at 529 (offset 1 line).
patching file real.c

PS: What's the best way for me to report issues like this?
Aug 13 2007
next sibling parent reply Carlos Santander <csantander619 gmail.com> writes:
Jason House escribió:
 I have tried to build gdc, but no matter what version of gcc I use, the patch
to tree-sra.c always fails.  I have tried with 4.0.4 and 4.1.2
 
 With 4.0.4, here's what I get:
 
 gcc-4.0.4$ gcc/d/setup-gcc.sh
 patching file Makefile.def
 patching file Makefile.in
 patching file configure
 Hunk #4 succeeded at 5152 (offset 6 lines).
 patching file configure.in
 Hunk #4 succeeded at 2181 (offset 6 lines).
 patching file cgraph.c
 patching file config/i386/i386.c
 Hunk #2 succeeded at 16034 (offset 59 lines).
 patching file config/rs6000/rs6000.c
 Hunk #1 succeeded at 15326 (offset 43 lines).
 patching file dwarf2.h
 patching file dwarf2out.c
 Hunk #1 succeeded at 5165 (offset -1 lines).
 Hunk #2 succeeded at 11890 (offset 9 lines).
 patching file expr.c
 Hunk #1 succeeded at 8221 (offset 4 lines).
 patching file function.c
 patching file function.h
 patching file gcc.c
 patching file gcc.h
 patching file gimplify.c
 Hunk #1 succeeded at 3861 (offset 17 lines).
 patching file tree-dump.c
 patching file tree-gimple.c
 Hunk #1 succeeded at 71 (offset -2 lines).
 Hunk #2 succeeded at 144 (offset -2 lines).
 patching file tree-inline.c
 patching file tree-nested.c
 patching file tree-pretty-print.c
 patching file tree-sra.c
 Hunk #1 FAILED at 196.
 Hunk #2 FAILED at 207.
 2 out of 2 hunks FAILED -- saving rejects to file tree-sra.c.rej
 patching file tree.def
 Hunk #1 succeeded at 529 (offset 1 line).
 patching file real.c
 
 PS: What's the best way for me to report issues like this?

Can you try building GDC, anyway? Maybe it works. I think I also got that message, but I'm not 100% sure. GDC works just fine for me. -- Carlos Santander Bernal
Aug 13 2007
parent reply Jason House <jason.james.house gmail.com> writes:
Carlos Santander Wrote:

 Jason House escribió:
 I have tried to build gdc, but no matter what version of gcc I use, the patch
to tree-sra.c always fails.  I have tried with 4.0.4 and 4.1.2
 
 With 4.0.4, here's what I get:
 
 gcc-4.0.4$ gcc/d/setup-gcc.sh
 patching file Makefile.def
 patching file Makefile.in
 patching file configure
 Hunk #4 succeeded at 5152 (offset 6 lines).
 patching file configure.in
 Hunk #4 succeeded at 2181 (offset 6 lines).
 patching file cgraph.c
 patching file config/i386/i386.c
 Hunk #2 succeeded at 16034 (offset 59 lines).
 patching file config/rs6000/rs6000.c
 Hunk #1 succeeded at 15326 (offset 43 lines).
 patching file dwarf2.h
 patching file dwarf2out.c
 Hunk #1 succeeded at 5165 (offset -1 lines).
 Hunk #2 succeeded at 11890 (offset 9 lines).
 patching file expr.c
 Hunk #1 succeeded at 8221 (offset 4 lines).
 patching file function.c
 patching file function.h
 patching file gcc.c
 patching file gcc.h
 patching file gimplify.c
 Hunk #1 succeeded at 3861 (offset 17 lines).
 patching file tree-dump.c
 patching file tree-gimple.c
 Hunk #1 succeeded at 71 (offset -2 lines).
 Hunk #2 succeeded at 144 (offset -2 lines).
 patching file tree-inline.c
 patching file tree-nested.c
 patching file tree-pretty-print.c
 patching file tree-sra.c
 Hunk #1 FAILED at 196.
 Hunk #2 FAILED at 207.
 2 out of 2 hunks FAILED -- saving rejects to file tree-sra.c.rej
 patching file tree.def
 Hunk #1 succeeded at 529 (offset 1 line).
 patching file real.c
 
 PS: What's the best way for me to report issues like this?

Can you try building GDC, anyway? Maybe it works. I think I also got that message, but I'm not 100% sure. GDC works just fine for me. -- Carlos Santander Bernal

Doesn't look like it... Or maybe I should say that I get another error... gcc/configure: line 15228: gcc/c-config-lang.in: No such file or directory Here's the full output of configure: $ gcc/configure checking build system type... i686-pc-cygwin checking host system type... i686-pc-cygwin checking target system type... i686-pc-cygwin checking LIBRARY_PATH variable... ok checking GCC_EXEC_PREFIX variable... ok checking whether to place generated files in the source directory... no checking whether a default linker was specified... no checking whether a default assembler was specified... no checking for gcc... gcc checking for C compiler default output file name... a.exe checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... .exe checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking whether gcc and cc understand -c and -o together... yes checking how to run the C preprocessor... gcc -E checking for inline... inline checking for long long int... yes checking for __int64... no checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for void *... yes checking size of void *... 4 checking for short... yes checking size of short... 2 checking for int... yes checking size of int... 4 checking for long... yes checking size of long... 4 checking for long long... yes checking size of long long... 8 checking whether gcc accepts -Wno-long-long... yes checking whether gcc accepts -Wno-variadic-macros... no checking whether gcc accepts -Wold-style-definition... yes checking valgrind.h usability... no checking valgrind.h presence... no checking for valgrind.h... no checking whether make sets $(MAKE)... yes checking for gawk... gawk checking whether ln -s works... yes checking whether ln works... yes checking for ranlib... ranlib checking for a BSD compatible install... /usr/bin/install -c checking for cmp's capabilities... gnucompare checking for mktemp... yes checking for makeinfo... makeinfo checking for modern makeinfo... yes checking for recent Pod::Man... yes checking for flex... no checking for bison... no checking for nm... nm checking for ar... ar checking for GNU C library... no checking for ANSI C header files... (cached) yes checking whether time.h and sys/time.h may both be included... yes checking whether string.h and strings.h may both be included... yes checking for sys/wait.h that is POSIX.1 compatible... yes checking for limits.h... yes checking for stddef.h... yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking for stdlib.h... (cached) yes checking for time.h... yes checking for iconv.h... no checking for fcntl.h... yes checking for unistd.h... (cached) yes checking for sys/file.h... yes checking for sys/time.h... yes checking for sys/mman.h... yes checking for sys/resource.h... yes checking for sys/param.h... yes checking for sys/times.h... yes checking for sys/stat.h... (cached) yes checking for direct.h... no checking for malloc.h... yes checking for langinfo.h... yes checking for ldfcn.h... no checking for locale.h... yes checking for wchar.h... yes checking for thread.h... no checking for pthread.h... yes checking for CHAR_BIT... yes checking whether byte ordering is bigendian... no checking for collect2 libraries... none required checking for library containing exc_resume... no checking for library containing ldexp... none required checking for inttypes.h... yes checking for times... yes checking for clock... yes checking for dup2... yes checking for kill... yes checking for getrlimit... yes checking for setrlimit... yes checking for atoll... yes checking for atoq... no checking for sysconf... yes checking for strsignal... yes checking for getrusage... yes checking for nl_langinfo... yes checking for scandir... yes checking for alphasort... yes checking for gettimeofday... yes checking for mbstowcs... yes checking for wcswidth... yes checking for mmap... yes checking for mincore... no checking for setlocale... yes checking for clearerr_unlocked... no checking for feof_unlocked... no checking for ferror_unlocked... no checking for fflush_unlocked... no checking for fgetc_unlocked... no checking for fgets_unlocked... no checking for fileno_unlocked... no checking for fprintf_unlocked... no checking for fputc_unlocked... no checking for fputs_unlocked... no checking for fread_unlocked... no checking for fwrite_unlocked... no checking for getchar_unlocked... yes checking for getc_unlocked... yes checking for putchar_unlocked... yes checking for putc_unlocked... yes checking whether mbstowcs works... yes checking for ssize_t... yes checking for uid_t in sys/types.h... yes checking type of array argument to getgroups... gid_t checking whether the printf functions support %p... yes checking for sys/mman.h... (cached) yes checking for mmap... (cached) yes checking whether read-only mmap of a plain file works... yes checking whether mmap from /dev/zero works... no checking for MAP_ANON(YMOUS)... yes checking whether mmap with MAP_ANON(YMOUS) works... no checking for pid_t... yes checking for unistd.h... (cached) yes checking for vfork.h... no checking for fork... yes checking for vfork... yes checking for working fork... yes checking for working vfork... (cached) yes checking for ld used by GCC... /usr/i686-pc-cygwin/bin/ld.exe checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes checking for shared library run path origin... done checking for iconv... no, consider installing GNU libiconv checking for LC_MESSAGES... yes checking for nl_langinfo and CODESET... yes checking whether getenv is declared... yes checking whether atol is declared... yes checking whether sbrk is declared... yes checking whether abort is declared... yes checking whether atof is declared... yes checking whether getcwd is declared... yes checking whether getwd is declared... yes checking whether strsignal is declared... yes checking whether strstr is declared... yes checking whether errno is declared... yes checking whether snprintf is declared... yes checking whether vasprintf is declared... yes checking whether malloc is declared... yes checking whether realloc is declared... yes checking whether calloc is declared... yes checking whether free is declared... yes checking whether basename is declared... no checking whether getopt is declared... no checking whether clock is declared... yes checking whether getpagesize is declared... yes checking whether clearerr_unlocked is declared... no checking whether feof_unlocked is declared... no checking whether ferror_unlocked is declared... no checking whether fflush_unlocked is declared... no checking whether fgetc_unlocked is declared... no checking whether fgets_unlocked is declared... no checking whether fileno_unlocked is declared... no checking whether fprintf_unlocked is declared... no checking whether fputc_unlocked is declared... no checking whether fputs_unlocked is declared... no checking whether fread_unlocked is declared... no checking whether fwrite_unlocked is declared... no checking whether getchar_unlocked is declared... yes checking whether getc_unlocked is declared... yes checking whether putchar_unlocked is declared... yes checking whether putc_unlocked is declared... yes checking whether getrlimit is declared... yes checking whether setrlimit is declared... yes checking whether getrusage is declared... yes checking whether ldgetname is declared... no checking whether times is declared... yes checking for struct tms... yes checking for clock_t... yes checking for .preinit_array/.init_array/.fini_array support... no checking if mkdir takes one argument... no Using `gcc/config/i386/i386.c' for machine-specific logic. Using `gcc/config/i386/i386.md' as machine description file. Using the following target machine macro files: gcc/config/i386/i386.h gcc/config/i386/unix.h gcc/config/i386/bsd.h gcc/config/i386/gas.h gcc/config/dbxcoff.h gcc/config/i386/cygming.h gcc/config/i386/cygwin.h Using `gcc/config/ i386/xm-cygwin.h' as host machine macro file. Using host-cygwin.o for host machine hooks. checking whether NLS is requested... no checking whether windows registry support is requested... yes checking for library containing RegOpenKeyExA... no checking registry key on windows hosts... 4.0.4 gcc/configure: line 12516: cd: /cygdrive/d/My: No such file or directory checking what assembler to use... /usr/bin/as.exe checking what linker to use... /usr/i686-pc-cygwin/bin/ld.exe checking what nm to use... nm.exe checking what objdump to use... objdump.exe checking assembler for .balign and .p2align... yes checking assembler for .p2align with maximum skip... yes checking assembler for working .subsection -1... no checking assembler for .weak... yes checking assembler for .nsubspa comdat... no checking assembler for .hidden... no checking linker for .hidden support... yes checking assembler for .sleb128 and .uleb128... yes checking assembler for eh_frame optimization... no checking assembler for section merging support... no checking assembler for section merging support... (cached) no checking assembler for COMDAT group support... no checking assembler for COMDAT group support... no checking assembler for thread-local storage support... no checking linker -Bstatic/-Bdynamic option... yes checking assembler for .secrel32 relocs... yes checking assembler for filds and fists mnemonics... yes checking assembler for cmov syntax... no checking assembler for GOTOFF in data... yes checking assembler for dwarf2 debug_line support... yes checking assembler for buggy dwarf2 .file directive... no checking assembler for --gdwarf2 option... yes checking assembler for --gstabs option... yes checking linker read-only and read-write section mixing... read-write checking linker PT_GNU_EH_FRAME support... no checking linker position independent executable support... yes checking linker --as-needed support... yes Using ggc-page for garbage collection. checking whether to enable maintainer-specific portions of Makefiles... no gcc/configure: line 15228: gcc/c-config-lang.in: No such file or directory
Aug 13 2007
parent Carlos Santander <csantander619 gmail.com> writes:
Jason House escribió:
 Carlos Santander Wrote:

 Jason House escribió:
 I have tried to build gdc, but no matter what version of gcc I use, the 



 With 4.0.4, here's what I get:

 gcc-4.0.4$ gcc/d/setup-gcc.sh
 patching file Makefile.def
 patching file Makefile.in
 patching file configure
 Hunk #4 succeeded at 5152 (offset 6 lines).
 patching file configure.in
 Hunk #4 succeeded at 2181 (offset 6 lines).
 patching file cgraph.c
 patching file config/i386/i386.c
 Hunk #2 succeeded at 16034 (offset 59 lines).
 patching file config/rs6000/rs6000.c
 Hunk #1 succeeded at 15326 (offset 43 lines).
 patching file dwarf2.h
 patching file dwarf2out.c
 Hunk #1 succeeded at 5165 (offset -1 lines).
 Hunk #2 succeeded at 11890 (offset 9 lines).
 patching file expr.c
 Hunk #1 succeeded at 8221 (offset 4 lines).
 patching file function.c
 patching file function.h
 patching file gcc.c
 patching file gcc.h
 patching file gimplify.c
 Hunk #1 succeeded at 3861 (offset 17 lines).
 patching file tree-dump.c
 patching file tree-gimple.c
 Hunk #1 succeeded at 71 (offset -2 lines).
 Hunk #2 succeeded at 144 (offset -2 lines).
 patching file tree-inline.c
 patching file tree-nested.c
 patching file tree-pretty-print.c
 patching file tree-sra.c
 Hunk #1 FAILED at 196.
 Hunk #2 FAILED at 207.
 2 out of 2 hunks FAILED -- saving rejects to file tree-sra.c.rej
 patching file tree.def
 Hunk #1 succeeded at 529 (offset 1 line).
 patching file real.c

 PS: What's the best way for me to report issues like this?

I think I also got that message, but I'm not 100% sure. GDC works just fine


 --
 Carlos Santander Bernal

Doesn't look like it... Or maybe I should say that I get another error... gcc/configure: line 15228: gcc/c-config-lang.in: No such file or directory Here's the full output of configure: $ gcc/configure

I can't help with that error, but I'm wondering about that command line. Are you running something like gcc-4.1.2/gcc/configure ? Shouldn't you be running gcc-4.1.2/configure ? -- Carlos Santander Bernal
Aug 13 2007
prev sibling parent Downs <default_357-line yahoo.de> writes:
Jason House wrote:
 I have tried to build gdc, but no matter what version of gcc I use, the patch
to tree-sra.c always fails.  I have tried with 4.0.4 and 4.1.2

I've encountered the same problem. The solution is to patch the file manually (apply the edits in tree-sra.c.rej to tree-sra.c, it's only two blocks); it seems some line number offsets in the patch are screwed up. If you patch it manually, it seems to work. Definitely a gdc problem, though. --downs
Aug 14 2007