da Silva, Joe wrote:
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 ...
[Joe da Silva]
As far as I recall, I simply :
- Changed to the (pristine) test directory
- Typed "./test_run"
- Typed "./test_run > results.gpc"
- Extracted the failure details from "results.gpc"
Ah, now I see. The problem is that several test programs (in particular, bill.pas and kevin5.pas) used an interface called `Foo', so foo.gpi compiled from kevin5.pas was included when bill.pas searched for its interface `Foo' in the 2nd turn. Same with `Test1' (confarr9.pas and rphil6.pas). I'm renaming these now, to be sure.
Should I add some "magic" variables to protect test_run from being run except via make?
[Joe da Silva]
Maybe. Or maybe just include a comment at the top of "test_run" such as :
"Important : Read the README file first!"
Since probably not everyone looks into a script before starting it, I'm doing both ...
Hmmm ... so the 13K executable isn't self-contained?
Not at all. Run `ldd filename' to see the dynamic library dependencies, or compile with `-static' to get a self-contained statically linked binary.
Does that mean that if this executable were redistributed, it might not run, depending on the version of RTS available on the recipient machine (assuming the same architecture of course)?
In Pascal, quite likely, unless you distribute the RTS with it. In C, the problem is less severe, since the interface of libc (C's "RTS") is more stable. But still, there are enough subtle differences, especially between different Linux distributions, so I prefer to distribute any Linux binaries statically linked. YMMV.
Frank