On 12 Apr 2001, at 8:50, Andris Pavenis wrote:
Subject: Re: Need GPC installation Date: Wed, 11 Apr 2001 22:44:28 +0200 From: Frank Heckenbach frank@g-n-u.de To: gpc@gnu.de
In your previous test report (forwarded by Maurice Lombardi), you also had the following errors in dialdef4.pas, fjf421l.pas and fjf421m.pas. I didn't understand them, and they didn't appear to occur now, so I suppose (hope ;-) it was some intermittent problem.
c:\djgpp\tmp\cceaaaaa: In function `pascal_main_program': fjf421m.pas:8: undefined reference to `_p_stdout' fjf421m.pas(.text+0x20): undefined reference to `_p_write' fjf421m.pas(.text+0x29): undefined reference to `_p_inoutres' fjf421m.pas(.text+0x31): undefined reference to `_p_check_inoutres' fjf421m.pas:9: undefined reference to `_p_atexit' fjf421m.pas(.text+0x82): undefined reference to `_p_initialize' fjf421m.pas(.text+0x91): undefined reference to `_p_finalize' collect2: ld returned 1 exit status failed
I didn't have some packages installed earlier (pdcurses, gpm, ...). Thist time related headers and related libraries were available both at build and tests time (it was on different machines).
So it seems that cross-building GPC for DJGPP under Linux worked for me without problems.
Andris
pavenis@lanet.lv wrote:
On 12 Apr 2001, at 8:50, Andris Pavenis wrote:
Subject: Re: Need GPC installation Date: Wed, 11 Apr 2001 22:44:28 +0200 From: Frank Heckenbach frank@g-n-u.de To: gpc@gnu.de
In your previous test report (forwarded by Maurice Lombardi), you also had the following errors in dialdef4.pas, fjf421l.pas and fjf421m.pas. I didn't understand them, and they didn't appear to occur now, so I suppose (hope ;-) it was some intermittent problem.
c:\djgpp\tmp\cceaaaaa: In function `pascal_main_program': fjf421m.pas:8: undefined reference to `_p_stdout' fjf421m.pas(.text+0x20): undefined reference to `_p_write' fjf421m.pas(.text+0x29): undefined reference to `_p_inoutres' fjf421m.pas(.text+0x31): undefined reference to `_p_check_inoutres' fjf421m.pas:9: undefined reference to `_p_atexit' fjf421m.pas(.text+0x82): undefined reference to `_p_initialize' fjf421m.pas(.text+0x91): undefined reference to `_p_finalize' collect2: ld returned 1 exit status failed
I didn't have some packages installed earlier (pdcurses, gpm, ...). Thist time related headers and related libraries were available both at build and tests time (it was on different machines).
This would explain the errors in fjf480[a-c].pas (which I've fixed meanwhile, so they'll given proper `SKIPPED' messages if librx is not installed), but dialdef4.pas, fjf421l.pas and fjf421m.pas don't use any additional packages.
So it seems that cross-building GPC for DJGPP under Linux worked for me without problems.
Also works for me (with 0 errors, and 2 skipped tests).
Frank
On Friday 13 April 2001 12:00, Frank Heckenbach wrote:
pavenis@lanet.lv wrote:
On 12 Apr 2001, at 8:50, Andris Pavenis wrote:
Subject: Re: Need GPC installation Date: Wed, 11 Apr 2001 22:44:28 +0200 From: Frank Heckenbach frank@g-n-u.de To: gpc@gnu.de
In your previous test report (forwarded by Maurice Lombardi), you also had the following errors in dialdef4.pas, fjf421l.pas and fjf421m.pas. I didn't understand them, and they didn't appear to occur now, so I suppose (hope ;-) it was some intermittent problem.
c:\djgpp\tmp\cceaaaaa: In function `pascal_main_program': fjf421m.pas:8: undefined reference to `_p_stdout' fjf421m.pas(.text+0x20): undefined reference to `_p_write' fjf421m.pas(.text+0x29): undefined reference to `_p_inoutres' fjf421m.pas(.text+0x31): undefined reference to `_p_check_inoutres' fjf421m.pas:9: undefined reference to `_p_atexit' fjf421m.pas(.text+0x82): undefined reference to `_p_initialize' fjf421m.pas(.text+0x91): undefined reference to `_p_finalize' collect2: ld returned 1 exit status failed
I didn't have some packages installed earlier (pdcurses, gpm, ...). Thist time related headers and related libraries were available both at build and tests time (it was on different machines).
This would explain the errors in fjf480[a-c].pas (which I've fixed meanwhile, so they'll given proper `SKIPPED' messages if librx is not installed), but dialdef4.pas, fjf421l.pas and fjf421m.pas don't use any additional packages.
It was not so. When I tried to run test on the same machine where I built gpc-20010417 (after rebooting Win98SE, as I built GPC under Linux) I run into the same trouble. Installing packages didn't help, but messing with command line options inside script test_run helped (for example adding "-v" caused test for dialdef1.pas to pass. So I guess we have some unitialized variable inside gpc1 (or something similar).
Andris
Andris Pavenis wrote:
On Friday 13 April 2001 12:00, Frank Heckenbach wrote:
pavenis@lanet.lv wrote:
On 12 Apr 2001, at 8:50, Andris Pavenis wrote:
Subject: Re: Need GPC installation Date: Wed, 11 Apr 2001 22:44:28 +0200 From: Frank Heckenbach frank@g-n-u.de To: gpc@gnu.de
In your previous test report (forwarded by Maurice Lombardi), you also had the following errors in dialdef4.pas, fjf421l.pas and fjf421m.pas. I didn't understand them, and they didn't appear to occur now, so I suppose (hope ;-) it was some intermittent problem.
c:\djgpp\tmp\cceaaaaa: In function `pascal_main_program': fjf421m.pas:8: undefined reference to `_p_stdout' fjf421m.pas(.text+0x20): undefined reference to `_p_write' fjf421m.pas(.text+0x29): undefined reference to `_p_inoutres' fjf421m.pas(.text+0x31): undefined reference to `_p_check_inoutres' fjf421m.pas:9: undefined reference to `_p_atexit' fjf421m.pas(.text+0x82): undefined reference to `_p_initialize' fjf421m.pas(.text+0x91): undefined reference to `_p_finalize' collect2: ld returned 1 exit status failed
I didn't have some packages installed earlier (pdcurses, gpm, ...). Thist time related headers and related libraries were available both at build and tests time (it was on different machines).
This would explain the errors in fjf480[a-c].pas (which I've fixed meanwhile, so they'll given proper `SKIPPED' messages if librx is not installed), but dialdef4.pas, fjf421l.pas and fjf421m.pas don't use any additional packages.
It was not so. When I tried to run test on the same machine where I built gpc-20010417 (after rebooting Win98SE, as I built GPC under Linux) I run into the same trouble. Installing packages didn't help, but messing with command line options inside script test_run helped (for example adding "-v" caused test for dialdef1.pas to pass. So I guess we have some unitialized variable inside gpc1 (or something similar).
Andris
May be. I have made a native building of the same gpc-20010417. This time dostest runs without error. In particular the y2k.pas error present in the previous gpc-20010409 when running in a W98se DOS box, and not in bare DOS, has disappeared. Such an erratic behaviour points to some erring pointer or uninitialized variable, but is it on gpc or on W98 dos box ? For reference the resulting gpc2953b.zip and the gcc2953s2.zip I have used (slight changes with respect to yours) have been uploaded to the directory
ftp://agnes.dida.physik.uni-essen.de/home/maurice
Hope this helps
Maurice
Maurice Lombardi wrote:
I have made a native building of the same gpc-20010417. This time dostest runs without error. In particular the y2k.pas error present in the previous gpc-20010409 when running in a W98se DOS box, and not in bare DOS, has disappeared. Such an erratic behaviour points to some erring pointer or uninitialized variable, but is it on gpc or on W98 dos box ? For reference the resulting gpc2953b.zip and the gcc2953s2.zip I have used (slight changes with respect to yours) have been uploaded to the directory
With the other problem it was (something like) an unitialized variable in GPC as Andris discovered. In this case I don't think so. (Though it's theoretically possible that an uninitialized variable in the compiler causes it to produce wrong code which makes the program fail at runtime like this, but this seems very unlikely, especially if the same executable fails reproducably in Windoze and not in plain Dos.)
Frank
Somehow the reply that you sent me is not related to the question that I tried to send to the gpc mailing list. My question was regarding trying to return a value from a pascal program.
I am trying to convert a PASCAL program from an IBM mainframe version to GNU Pascal. I fixed a couple of trival implementation details (such as <> instead of ^= and NOT for ^) but I have one problem left I can't figure out how to solve.
The original program had a return code, implemented by a call to RETCODE with a parameter. This was obviously an implementation supplied interface to allow the program to be a function.
How can I do this in GNU Pascal? My Pascal is 15 years rusty and I don't have a manual handy. I couldn't find anything in the binary distribution nor in the Web help. Am I going to have to do this by printing a value and then parsing the output?
Thanks, Ian Sinclair Software Development Engineer Nortel Networks, Belleville, ON CA
mailto:sinclair@nortelnetworks.com
Try
halt(retcode);
this works for BP at least.
George
On Wed, 18 Apr 2001, Ian Sinclair wrote:
Somehow the reply that you sent me is not related to the question that I tried to send to the gpc mailing list. My question was regarding trying to return a value from a pascal program.
I am trying to convert a PASCAL program from an IBM mainframe version to GNU Pascal. I fixed a couple of trival implementation details (such as <> instead of ^= and NOT for ^) but I have one problem left I can't figure out how to solve.
The original program had a return code, implemented by a call to RETCODE with a parameter. This was obviously an implementation supplied interface to allow the program to be a function.
How can I do this in GNU Pascal? My Pascal is 15 years rusty and I don't have a manual handy. I couldn't find anything in the binary distribution nor in the Web help. Am I going to have to do this by printing a value and then parsing the output?
Thanks, Ian Sinclair Software Development Engineer Nortel Networks, Belleville, ON CA
mailto:sinclair@nortelnetworks.com
Ian Sinclair wrote:
Somehow the reply that you sent me is not related to the question that I tried to send to the gpc mailing list. My question was regarding trying to return a value from a pascal program.
I'm not sure what you're referring to. I haven't seen any previous mail of yours on this list, and I don't know who sent to a reply. Anyway, this mail made it to the list, so I can reply. ;-)
The original program had a return code, implemented by a call to RETCODE with a parameter. This was obviously an implementation supplied interface to allow the program to be a function.
I suppose you mean a return value passed back to the calling process. In GPC you can do this with `Halt'. If called without a parameter, it terminates the program and returns 0, the same as when the program reaches the `end.'. Calling `Halt' with an integer parameter will return this value. If a program is terminated by a runtime error, it will return a non-zero value.
Frank