Hi,
(answering two mails in one)
On Sun, Jun 27, 2004 at 08:35:40PM +0100, Frank Heckenbach wrote:
Gert Doering wrote:
In the meantime, I tried something else - gcc-3.2.3 with gpc-20040516, again on AIX 5.1 and additionally on AIX 5.2 (in case AIX 5.1 is broken).
Incidentally I also have to build GPC on AIX 5 at the moment (powerpc-ibm-aix5.1.0.0).
Lucky me :-)
Although gcc-3.2.1 was already installed on the system, building with it didn't seem to work (unrecognizable insn). So I did this ...
Interesting. With gcc-3.3.1, *these* problems didn't happen for me.
[..]
The effect is quite different here. It builds all of xgpc and the libgpc.a just fine, but then crashes in trying to build "binobj".
(BTW, I wouldn't call an error message a crash. To me a crash is a segfault or something like this.)
"The build process aborted in an unexpected way". However :-)
[..]
If I change the -B invocation to use an absolute path,
Or do this (which I'm adding in GPC):
--- p/Make-lang.in.orig Mon May 31 02:18:22 2004 +++ p/Make-lang.in Sun Jun 27 20:01:26 2004
I've patched my tree with this, and it fixed the -B problem on both AIX 5.1 and AIX 5.2 (gcc-3.3.3, gpc-20040516).
[..]
Second problem:
ld: 0711-317 ERROR: Undefined symbol: Tempdirectory.1 ld: 0711-317 ERROR: Undefined symbol: Tempstr.4 ld: 0711-317 ERROR: Undefined symbol: Buffer.8 ld: 0711-317 ERROR: Undefined symbol: Zero.3 ld: 0711-317 ERROR: Undefined symbol: Epoch.6 ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. collect2: ld returned 8 exit status
Then I get that as well.
[..]
Any further ideas how to tackle this? The whole symbol format confuses me - being a C programmer, I'm used to errors about "_crypt" not found, but not without a "_" and neither with trailing numbers...
BTW, I only seem to remember a `_' prefix on DJGPP and such systems (for compatibility with some ancient Dos assemblers, but that's another story) -- unless the programmer puts one there intentionally.
I stand corrected. Re-checked some of the unix system I regularily work on, an none uses an "_" prefix. Must be a leftover memory from Turbo C under DOS...
The numbers are appended by GCC or the linker for local symbols to avoid collisions when the same name is used in different scopes. But probably that's all irrelevant to the problem.
Thanks for explaining what the numbers do.
[..]
For now, I'm afraid I only have a work-around for this problem in the RTS. With this applied, I get these results -- all of the failures are for the same reason (static local variables of schema, string or file type). I hope I can provide a better solution soon, but since this isn't common in normal code (and not standard, anyway), GPC should be mostly usable this way.
I've applied the second patch (to the pascal files) to my tree as well, and now both AIX 5.1 and AIX 5.2 build fine, and most of the test suite passes as well.
I get the same failing modules:
Test Run By gd on 2004-07-06 14:43:30 Native configuration is powerpc-ibm-aix5.1.0.0 (hilb1)
=== gpc tests ===
Running target any Running testsuite ...
UNSUPPORTED: asmtest.pas FAIL: bo4-18.pas UNSUPPORTED: crttest.pas FAIL: fjf354.pas FAIL: fjf458a.pas FAIL: fjf458b.pas FAIL: fjf458c.pas FAIL: fjf458d.pas FAIL: fjf459a.pas FAIL: fjf459b.pas UNSUPPORTED: fjf77.pas UNSUPPORTED: gmptest.pas UNSUPPORTED: jj5.pas UNSUPPORTED: longr2.pas UNSUPPORTED: regextest.pas
and on
Test Run By gd on 2004-07-06 15:29:41 Native configuration is powerpc-ibm-aix5.2.0.0 (hilb3) ... === gpc Summary ===
# of tests 3910 # of expected passes 3895 # of unexpected failures 8 # of unsupported tests 7
So, thank you very much for the workaround. We will have to rewrite parts of the software (some modules actually use static String and FILE variables), but we expect much more issues with structure alignment and such, converting from AIX xlp to gpc...
Out of curiosity: do you have any idea what's going on inside gpc/gcc here? Why is it breaking the *link* phase? Are various parts of the system disagreeing on the suffix number to use for the linker?
kind regards,
gert