Hello, I've got problems with compiling gpc snapshot from 12.5 and latest cygwin with gcc 2.95.3-4 I did like described in the faq, and I had some problems I solved: -There was no patch for gcc 2.95.3-4 so I took the one for 2.95.3 -GPLUSPLUS_INCLUDE_DIR and TOOL_INCDLUDE_DIR wasn't declared in gpcpp.c, I found an #undeclare in cygwin.h and deletet it.
After that compiling worked, but if I use the compile now, the following appears: (gpc -v test.pas)
Reading specs from /usr/lib/gcc-lib/i586-pc-cygwin32/2.95.3-4/specs gpc version 20010512, based on 2.95.3-4 (cygwin special) /usr/lib/gcc-lib/i586-pc-cygwin32/2.95.3-4/gpcpp.exe -lang-pascal -v -famtmpfile=/PlatteC/WINDOWS/TEMP/cc985291 -fdelphi-comments -D__GNU_PASCAL__ -undef -D__GNUC__=2 -D__GNUC_MINOR__=95 -D__GPC__=2 -D__GPC_MINOR__=0 -D__GPC_RELEASE__=20010512 -D__BITS_LITTLE_ENDIAN__=1 -D__BYTES_LITTLE_ENDIAN__=1 -D__WORDS_LITTLE_ENDIAN__=1 -D_X86_=1 -D_X86_=1 -Asystem(winnt) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di586 -Dpentium -D__i586 -D__i586__ -D__pentium -D__pentium__ -D__stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__)) -D_stdcall=__attribute__((__stdcall__)) -D_cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix -isystem /usr/local/include -idirafter /usr/include -idirafter /usr/include/w32api test.pas /PlatteC/WINDOWS/TEMP/cca85291 GNU Pascal Compiler PreProcessor version 20010512, based on gcc-2.95.3-4 (cygwin special) (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/local/include /include /usr/lib/gcc-lib/i586-pc-cygwin32/2.95.3-4/include /usr/include /usr/include /usr/include/w32api End of search list. /usr/lib/gcc-lib/i586-pc-cygwin32/2.95.3-4/gpc1.exe /PlatteC/WINDOWS/TEMP/cca85291 -quiet -dumpbase test.pas -version -famtmpfile=/PlatteC/WINDOWS/TEMP/cc985291 -o /PlatteC/WINDOWS/TEMP/ccb85291 GNU Pascal version 2.95.3-4 (cygwin special) (i586-pc-cygwin32) compiled by GNU C version 2.95.3-3 (cygwin special). GNU Pascal version is actually 20010512, based on gcc-2.95.3-4 (cygwin special) as -o /PlatteC/WINDOWS/TEMP/ccc85291 /PlatteC/WINDOWS/TEMP/ccb85291 gpc.exe: Internal compiler error in `do_spec_1', at p/gpc.c:4500 Please submit a full bug report. See URL:http://www.gnu.org/software/gcc/bugs.html for instructions.
On 15 May 2001, at 16:39, Matthias Braun wrote:
Hello, I've got problems with compiling gpc snapshot from 12.5 and latest cygwin with gcc 2.95.3-4 I did like described in the faq, and I had some problems I solved: -There was no patch for gcc 2.95.3-4 so I took the one for 2.95.3 -GPLUSPLUS_INCLUDE_DIR and TOOL_INCDLUDE_DIR wasn't declared in gpcpp.c, I found an #undeclare in cygwin.h and deletet it.
I am not sure that you should do that. I think you should trust that whoever undeclared it knew what they were doing. I normally can compile GPC for both Cygwin and Mingw without touching anything other than to apply the GPC patch.
After that compiling worked, but if I use the compile now, the following appears: (gpc -v test.pas)
Do you have all the latest GNU tools and headers and libraries? You shouldn't have had to change cygwin.h to be able to build GPC successfully.
[...]
GNU Pascal version 2.95.3-4 (cygwin special) (i586-pc-cygwin32) compiled by GNU C version 2.95.3-3 (cygwin special). GNU Pascal version is actually 20010512, based on gcc-2.95.3-4 (cygwin special) as -o /PlatteC/WINDOWS/TEMP/ccc85291 /PlatteC/WINDOWS/TEMP/ccb85291 gpc.exe: Internal compiler error in `do_spec_1', at p/gpc.c:4500
I have never seen this problem before. The GPC that you built is obviously broken. Why? I have no idea. Could it be a problem with your "specs" file? Perhaps Peter or Frank might have an idea what this error means.
Best regards, The Chief --------- Prof. Abimbola Olowofoyeku (The African Chief) Author of Chief's Installer Pro for Win32 Email: African_Chief@bigfoot.com http://www.bigfoot.com/~african_chief/
On Wed, 16 May 2001, Prof. A Olowofoyeku (The African Chief) wrote:
On 15 May 2001, at 16:39, Matthias Braun wrote:
Hello, I've got problems with compiling gpc snapshot from 12.5 and latest cygwin with gcc 2.95.3-4 I did like described in the faq, and I had some problems I solved: -There was no patch for gcc 2.95.3-4 so I took the one for 2.95.3 -GPLUSPLUS_INCLUDE_DIR and TOOL_INCDLUDE_DIR wasn't declared in gpcpp.c, I found an #undeclare in cygwin.h and deletet it.
I am not sure that you should do that. I think you should trust that whoever undeclared it knew what they were doing. I normally can compile GPC for both Cygwin and Mingw without touching anything other than to apply the GPC patch.
So I looked into the cccp.c file which seems to be the c counterpart to gpcpp.c, here they did a #ifdef TOOL_INCLUDE_DIR around the critical parts, so I did the same for gpcpp.c and restored original cygwin.h. But this gives the same effect as before.
After that compiling worked, but if I use the compile now, the following appears: (gpc -v test.pas)
Do you have all the latest GNU tools and headers and libraries? You shouldn't have had to change cygwin.h to be able to build GPC successfully.
Yes, I used the setup utility from cygwin.com and installed experimental releases (gcc package isn't marked experimental anyway). I installed all the tools there.
[...]
GNU Pascal version 2.95.3-4 (cygwin special) (i586-pc-cygwin32) compiled by GNU C version 2.95.3-3 (cygwin special). GNU Pascal version is actually 20010512, based on gcc-2.95.3-4 (cygwin special) as -o /PlatteC/WINDOWS/TEMP/ccc85291 /PlatteC/WINDOWS/TEMP/ccb85291 gpc.exe: Internal compiler error in `do_spec_1', at p/gpc.c:4500
I have never seen this problem before. The GPC that you built is obviously broken. Why? I have no idea. Could it be a problem with your "specs" file? Perhaps Peter or Frank might have an idea what this error means.
I reinstalled everything, I did some tests, compiling works if I use the following sequence: gpc -c -o test.o test.pas gcc test.o -o test.exe -lgpc So It seems only an error reading the specs file, but I don't understand the spec file syntax :/. So I've attached it along with the changed gpcpp.c to this mail.
Matze
Matthias Braun wrote:
-GPLUSPLUS_INCLUDE_DIR and TOOL_INCDLUDE_DIR wasn't declared in gpcpp.c, I found an #undeclare in cygwin.h and deletet it.
They're usually passed from the Makefile (see Makefile.in, rule for gpcpp.o).
[...]
GNU Pascal version 2.95.3-4 (cygwin special) (i586-pc-cygwin32) compiled by GNU C version 2.95.3-3 (cygwin special). GNU Pascal version is actually 20010512, based on gcc-2.95.3-4 (cygwin special) as -o /PlatteC/WINDOWS/TEMP/ccc85291 /PlatteC/WINDOWS/TEMP/ccb85291 gpc.exe: Internal compiler error in `do_spec_1', at p/gpc.c:4500
I have never seen this problem before. The GPC that you built is obviously broken. Why? I have no idea. Could it be a problem with your "specs" file? Perhaps Peter or Frank might have an idea what this error means.
I reinstalled everything, I did some tests, compiling works if I use the following sequence: gpc -c -o test.o test.pas gcc test.o -o test.exe -lgpc So It seems only an error reading the specs file, but I don't understand the spec file syntax :/. So I've attached it along with the changed gpcpp.c to this mail.
No, you haven't.
You might want to put something like `fprintf (stderr, "spec: %i %s\n", c, p[-1]);' (untested) before the abort in p/gpc.c:4500 to see where in the specs it fails.
Frank