Well, I did some more experimenting last night ...
As expected, the "bill.pas" and "confarr9.pas" tests were OK with the "--automake" option. Although, thinking about it again now, I'm not sure why the required units for these programs weren't supplying the "missing" identifiers, since the failures reported below occurred on the second run of the script file, so the relevant units would/should have been available in compiled form.
Not surprisingly, the "--automake" option didn't make any difference to the "fjf623.pas" test program.
At this point, I had another look at all the files in the test directory and discovered one called "README" <G>. As you may have guessed by now, I was just running the "test_run" script file (executable files are highlighted in bright green on my directory listings, so the script files were what I had noticed, and the "test_run" script file in particular, looked like the right thing to run).
So, running the mysterious "make" command instead (which seemed to supply a number of option flags to GPC, including "--automake"), no errors were reported (there were 8 tests skipped, because of some stuff I haven't installed)! I don't yet know which option flag fixed the "fjf623.pas" failure, although I suspect it might be the "-Wall" flag. I may investigate further, for curiosity.
It seems to me therefore, that the build process was a success, thanks to the nice clear instructions on the web site! Since I'm new to Linux and since this was my first attempt to build GPC, I'm amazed! :-)
I will check the FAQ again about the executable file size. I recall previous discussions about using "strip", but this only shrunk the file to over 200K. I don't have "upx" (yet), so I then simply zipped the 200K file, to see how compressible it was. I can't recall the exact result, but it was still much, much larger than the 13K executable produced by GPC, when it compiled the C version of the "hello" program.
Joe.
-----Original Message----- From: Frank Heckenbach [SMTP:frank@g-n-u.de] Sent: Tuesday, April 23, 2002 10:57 PM To: gpc@gnu.de Subject: Re: GPC 2.1 RC 6 released
da Silva, Joe wrote:
Well, just an update on my attempts to build GPC 20020410 on Mandrake (based on the SuSE GCC 2.95.3 source archive) ...
I followed the instructions from the web pages verbatim, and as the Chief said, it's "quite straightforward". As far as I could tell, there were no errors in building gpc-20020410, just a warning or two, which AFAIK is "normal" with C programs.
Maybe, maybe not. Without seeing the text of the warnings, it could be anything.
I then ran the test script, expecting this would produce a summary at the end.
What exactly did you do? Simply make, or make pascal.check-long or whatever?
It didn't, so I ran this again but this time I redirected the output to a file. After this, I searched the file for the word
"failed"
and extracted the following :
TEST bill.pas: ./bill.pas: In main program: ./bill.pas:7: undeclared identifier `Dectobin' (first use in this
routine)
./bill.pas:7: (Each undeclared identifier is reported only once ./bill.pas:7: for each routine it appears in.) failed
TEST confarr9.pas: ./confarr9.pas: In main program: ./confarr9.pas:7: undeclared identifier `Test' (first use in this
routine)
./confarr9.pas:7: (Each undeclared identifier is reported only once ./confarr9.pas:7: for each routine it appears in.) failed
TEST fjf623.pas: failed: failed 1 2
I had a quick look at the first two "failures", and I am not sure why these would have failed. The Pascal code looked OK, so I suspect the problem might be in the script file, which I will try to decipher a bit later ...
It might be easier to try compiling the programs manually (with `gpc --automake'). If they still fail, the problem is not in the script.
I also invoked GPC to compile a small "hello" program in both Pascal and in C. Both worked, however, the "a.out" file from the Pascal compilation was over 500K, whereas that from the C compilation was about 13K. Is this normal???
Yes, FAQ.
Frank
-- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html
da Silva, Joe wrote:
Well, I did some more experimenting last night ...
As expected, the "bill.pas" and "confarr9.pas" tests were OK with the "--automake" option. Although, thinking about it again now, I'm not sure why the required units for these programs weren't supplying the "missing" identifiers, since the failures reported below occurred on the second run of the script file, so the relevant units would/should have been available in compiled form.
I don't really understand either, and can't seem to reproduce it. If you can give me a recipe how to provoke the problem, starting from a clean test directory, I might be able to say more ...
Not surprisingly, the "--automake" option didn't make any difference to the "fjf623.pas" test program.
At this point, I had another look at all the files in the test directory and discovered one called "README" <G>. As you may have guessed by now, I was just running the "test_run" script file (executable files are highlighted in bright green on my directory listings, so the script files were what I had noticed, and the "test_run" script file in particular, looked like the right thing to run).
Oh well ...
Should I add some "magic" variables to protect test_run from being run except via make?
So, running the mysterious "make" command instead (which seemed to supply a number of option flags to GPC, including "--automake"), no errors were reported (there were 8 tests skipped, because of some stuff I haven't installed)! I don't yet know which option flag fixed the "fjf623.pas" failure, although I suspect it might be the "-Wall" flag. I may investigate further, for curiosity.
It was probably the `rm'. ;-) The error that fjf623 is meant to provoke occurs when the units are compiled. If they have been compiled in a previous run already, the error doesn't show.
I will check the FAQ again about the executable file size. I recall previous discussions about using "strip", but this only shrunk the file to over 200K. I don't have "upx" (yet), so I then simply zipped the 200K file, to see how compressible it was. I can't recall the exact result, but it was still much, much larger than the 13K executable produced by GPC, when it compiled the C version of the "hello" program.
I didn't mean the FAQ document (apparently, it's only updated sparingly -- when someone likes to add something, just send me the text, preferable as a diff to faq.text; I don't really have the time to maintain this document), but this list.
In short: The RTS is linked statically. It is possible to build and link it dynamically (make WITH_SHARED=yes), but since its interface changes often, you might end up with a lot of RTS .so's over time that some of your binaries depend on.
Frank