"Dr A Olowofoyeku" wrote:
Actually, that's good news. ;-) The GPC sources contain a workaround for a mingw problem. Apparently, the mingw problem has been solved now, so the workaround doesn't work anymore. But if you remove the workaround, i.e. the following lines in rts/file.c, it should work:
#if defined (_WIN32) && !defined (CYGWIN32) #define mkdir(path,mode) mkdir(path) #endif
Removing those 3 lines did it.
Fine. I'll remove them from the official sources as well.
The process then chokes on compiling 'files.pas', with these errors; line 257: function 'Sleepmicroseconds' argument does not match conformant array formal parameter invalid use of void expression argument does not match conformant array formal parameter too few arguments to function 'Ioselect'
Strange, this was a bug, but it has been fixed. A possible reason why it still occurs is that there is an older GPC version installed which is used to compile the RTS. This does not work.
Can you make sure by looking at the make output whether this is the case. Normally, the GPC just created (called `xgpc') should be used.
If it isn't used, you can try giving the parameter `GPC_FOR_TARGET=<file name with full path of xgpc>' to make, but then we should try to find out why that's necessary.
You're using the gpc-19990813 sources, aren't you?
line 310: function 'Stringtfdd_rewrite' assignment from incompatible pointer type
I have looked at 'files.pas', and it is not obvious why there should be a problem with those lines. However, I will continue to work on it. In the meantime, I am open to suggestions ;)
There's indeed a bug here. Here's the fix:
--- p/rts/files.pas.orig Mon Sep 13 04:21:57 1999 +++ p/rts/files.pas Mon Sep 13 04:22:02 1999 @@ -307,7 +307,7 @@ Buf.Chars := GPC_PChars (@s[1]); Buf.Truncate := True; (**) Buf.StringType := AnyStringLong; - Buf.PLongLength := @GPC_PString (@s)^.Length; + Buf.PLongLength := @Cardinal (GPC_PString (@s)^.Length); AnyStringTFDD_Rewrite (f, Buf) end;
My mistake. It was 2 parameters, but I got confused by all the stars and commas, etc.
I can imagine that well... :-)
Frank
On 13 Sep 99, at 4:26, Frank Heckenbach wrote:
The process then chokes on compiling 'files.pas', with these errors; line 257: function 'Sleepmicroseconds' argument does not match conformant array formal parameter invalid use of void expression argument does not match conformant array formal parameter too few arguments to function 'Ioselect'
Strange, this was a bug, but it has been fixed. A possible reason why it still occurs is that there is an older GPC version installed which is used to compile the RTS. This does not work.
There is an older GPC version.
Can you make sure by looking at the make output whether this is the case. Normally, the GPC just created (called `xgpc') should be used.
Can't find any "xgpc". It doesn't seem to be created. So, there seems to be a problem somewhere :(
In the meantime, I commented out the line, just to see how far I would get. It goes as far as 'getopt.pas' and then dies there, complaining about line 157 (inside the GetOpt function). I commented out that line, and proceeded. It succeeded in compiling up to 'random.pas'. It starts compiling 'init.pas' and then the installed GPC dies a death complaining of an internal error. This is the old EGCS bug in 'typeck.c' (new'ing a pFile or ^Text or something like that). So I guess I have to installed the gcc 2.8.1 mingw32 compiler. But I also guess that there is a fundamental problem in that 'xgpc' is not being created, so GCC has to use an (old) installed GPC. Is this correct?
You're using the gpc-19990813 sources, aren't you?
Yes.
There's indeed a bug here. Here's the fix:
--- p/rts/files.pas.orig Mon Sep 13 04:21:57 1999 +++ p/rts/files.pas Mon Sep 13 04:22:02 1999 @@ -307,7 +307,7 @@
[...]
Seems fine now.
Best regards, The Chief -------- Dr. Abimbola A. Olowofoyeku (The African Chief) Email: laa12@keele.ac.uk Homepage: http://ourworld.compuserve.com/homepages/African_Chief/ Author of: Chief's Installer Pro v5.20a for Win32 ftp://ftp.demon.co.uk/pub/ibmpc/win95/apps/chief32/chief52a.zip
Hi guys
Okay. So, I commented out 'New (StdFile);' on line 92 of 'init.pas', and proceeded with 'make'. End result? I end up with a whole load of 'o', and 'gpi' files, 'gpc.gpm', and 'libgpc.a'. And then 'make' stops (seems to me to be a premature stoppage, but I don't know). It seems that I am not too far off (if the problems with the lines that I commented out are dealt with) from being able to compile GPC for Cygwin32 (whether it will work or not is another matter - but we shall see). So, where do I go from here?
Best regards, The Chief -------- Dr. Abimbola A. Olowofoyeku (The African Chief) Email: laa12@keele.ac.uk Homepage: http://ourworld.compuserve.com/homepages/African_Chief/ Author of: Chief's Installer Pro v5.20a for Win32 ftp://ftp.demon.co.uk/pub/ibmpc/win95/apps/chief32/chief52a.zip