Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-07

Building 2.1.4 for SPARC/Linux

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mark Morgan Lloyd

Using a binary 2.0.0 I've compiled 2.0.4 without problems, running on Debian 4.0 "Etch" on an Ultra-10.

Using this 2.0.4 I'm trying to compile 2.1.4 using recent sources. First problem is a missing line as fixed in the patch below:

--- fpcsrc/rtl/linux/sparc/stat.inc~ 2007-03-29 07:26:34.000000000 +0000 +++ fpcsrc/rtl/linux/sparc/stat.inc 2007-07-04 13:07:52.000000000 +0000 @@ -15,7 +15,8 @@

  {$IFNDEF FPC_USE_LIBC}
    Stat = packed record  // No unix typing because of differences
-    0:
+    case byte of
+     0:
        (dev   : culonglong;
        ino    : culonglong;
        mode   : cuint;

Hopefully I've got that right. However with that applied a build all fails with:

..
/usr/src/fpc/fpcbuild-2.1.4/fpcsrc/compiler/ppc3 -Ur -Xs -O2 -n -Fusparc -Fusystems -Fu/usr/src/fpc/fpcbuild-2.1.4/fpcsrc/rtl/units/sparc-linux -Fisparc -FE. -FUsparc/units/sparc-linux -dRELEASE -dsparc -dGDB -dBROWSERLOG pp.pas
/bin/mv -f ./pp ppcsparc
make[5]: Leaving directory `/usr/src/fpc/fpcbuild-2.1.4/fpcsrc/compiler' make echotime
make[5]: Entering directory `/usr/src/fpc/fpcbuild-2.1.4/fpcsrc/compiler' Start now 14:04:23
make[5]: Leaving directory `/usr/src/fpc/fpcbuild-2.1.4/fpcsrc/compiler' make[4]: Leaving directory `/usr/src/fpc/fpcbuild-2.1.4/fpcsrc/compiler' /usr/bin/
Binary files ppc3 and ppcsparc differ
make[3]: *** [cycle] Error 2
make[3]: Leaving directory `/usr/src/fpc/fpcbuild-2.1.4/fpcsrc/compiler' make[2]: *** [compiler_cycle] Error 2
make[2]: Leaving directory `/usr/src/fpc/fpcbuild-2.1.4/fpcsrc' make[1]: *** [build-stamp.sparc-linux] Error 2
make[1]: Leaving directory `/usr/src/fpc/fpcbuild-2.1.4/fpcsrc' make: *** [fpcsrc/build-stamp.sparc-linux] Error 2

Anybody got any suggestions please?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Daniël Mantione
to Mark Morgan Lloyd

Op Wed, 4 Jul 2007, schreef Mark Morgan Lloyd:

Show quoted text 5 lines
Using a binary 2.0.0 I've compiled 2.0.4 without problems, running on Debian 4.0 "Etch" on an Ultra-10. Using this 2.0.4 I'm trying to compile 2.1.4 using recent sources. First problem is a missing line as fixed in the patch below:

This one is correct.

Hopefully I've got that right. However with that applied a build all fails with: Anybody got any suggestions please?

This could mean mean incorrect code is generated which cause the resulting compiler not to crash but generate even more incorrect code. The Sparc code generator needs to be checked for bugs.

This is unfortunate because as we are really close to freezing 2.2.0 it'll be hard to get a fix in time.

Daniël

Reply by email

Jonas Maebe
to Mark Morgan Lloyd: Using a binary 2.0.0 I've compiled 2.0.4 without problems, running on Debian 4.0 "Etch"…
Mark Morgan Lloyd wrote 27 lines
/usr/src/fpc/fpcbuild-2.1.4/fpcsrc/compiler/ppc3 -Ur -Xs -O2 -n - Fusparc -Fusystems -Fu/usr/src/fpc/fpcbuild-2.1.4/fpcsrc/rtl/units/ sparc-linux -Fisparc -FE. -FUsparc/units/sparc-linux -dRELEASE - dsparc -dGDB -dBROWSERLOG pp.pas /bin/mv -f ./pp ppcsparc make[5]: Leaving directory `/usr/src/fpc/fpcbuild-2.1.4/fpcsrc/ compiler' make echotime make[5]: Entering directory `/usr/src/fpc/fpcbuild-2.1.4/fpcsrc/ compiler' Start now 14:04:23 make[5]: Leaving directory `/usr/src/fpc/fpcbuild-2.1.4/fpcsrc/ compiler' make[4]: Leaving directory `/usr/src/fpc/fpcbuild-2.1.4/fpcsrc/ compiler' /usr/bin/ Binary files ppc3 and ppcsparc differ make[3]: *** [cycle] Error 2 make[3]: Leaving directory `/usr/src/fpc/fpcbuild-2.1.4/fpcsrc/ compiler' make[2]: *** [compiler_cycle] Error 2 make[2]: Leaving directory `/usr/src/fpc/fpcbuild-2.1.4/fpcsrc' make[1]: *** [build-stamp.sparc-linux] Error 2 make[1]: Leaving directory `/usr/src/fpc/fpcbuild-2.1.4/fpcsrc' make: *** [fpcsrc/build-stamp.sparc-linux] Error 2 Anybody got any suggestions please?

There are none for this particular problem. I've done a lot of sparc fixes after 2.1.4 was released and this problem is now rarer, but still occurs every now and then. It's caused by indeterminism in the register allocator. See
http://www.freepascal.org/mantis/view.php?id=8121

I haven't seen it happen at all lately in 2.3.1, but I have no idea why that is (and whether this is pure coincidence, whether the bug is still there but somehow hidden by other code, or whether it is actually fixed there.

Jonas

Reply by email

Mark Morgan Lloyd
to Jonas Maebe
Jonas Maebe wrote 10 lines
There are none for this particular problem. I've done a lot of sparc fixes after 2.1.4 was released and this problem is now rarer, but still occurs every now and then. It's caused by indeterminism in the register allocator. See http://www.freepascal.org/mantis/view.php?id=8121 I haven't seen it happen at all lately in 2.3.1, but I have no idea why that is (and whether this is pure coincidence, whether the bug is still there but somehow hidden by other code, or whether it is actually fixed there.

One thing I didn't mention is that I followed as near as I could manage to an identical build procedure on i386 and then SPARC, and it's only the latter that errored. It's mainly SPARC I'm interested in rather than i386, largely for the sake of Lazarus.

Which takes me to the interesting observation that with 2.0.4 Lazarus 0.9.22 bombs during startup but that this disappears if the suspect code is preceded by a DebugLn(). I'd concluded reluctantly that that might be a code-generation problem and wanted to progress to a more recent FPC version before raising it.

What's the best way to move forwards- try to disable the check, investigate the unofficial 2.1.4 .deb, or jump straight to a later development version?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email