Sign in Join

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

Mailing lists / fpc-pascal / 2023-03

FPC crashes with Internal error 200502052 compiling shared library on m68k

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Pierre Muller
to Peter B

Hi,

it is not only m68k CPU that is failing:
mipsel, powerpc and ppc64 also show failures...

For mipsel:
(10028) Recompiling LCLProc, checksum changed for /usr/lib/mipsel-linux-gnu/fpc/3.2.2/units/mipsel-linux/rtl/math.ppu /usr/lib/lazarus/2.2.4/lcl/units/mipsel-linux/lclproc.ppu:lclproc.pas(67,64) Fatal: (10022) Can't find unit LCLProc used by ExtCtrls Fatal: (1018) Compilation aborted
Error: /usr/bin/ppcmipsel returned an error exitcode So for that cpu, it seems to be a problem with Lazarus...

For ppc64:
(3104) Compiling un_xtrctdwrflnfo.pp
/<<PKGBUILDDIR>>/src/un_xtrctdwrflnfo.pp(41,4) Fatal: (2022) User defined: powerpc architecture not supported Fatal: (1018) Compilation aborted
Error: /usr/bin/ppcppc64 returned an error exitcode Seems to indicate the powerpc arch is not supported... (32bit-powerpc seems to fail earlier...)

For m68k,
(9009) Assembling gb2312freq
/<<PKGBUILDDIR>>/components/chsdet/./src/CharDistribution.pas(181,7) Fatal: Internal error 200502052 Fatal: (1018) Compilation aborted
Error: /usr/bin/ppc68k returned an error exitcode
Error: (lazarus) Compile package chsdet 0.2.9: stopped with exit code 1 Error: (lazbuild) chsdet 0.2.9 compilation failed
make[1]: *** [debian/rules:16: override_dh_install] Error 2 make[1]: Leaving directory '/<<PKGBUILDDIR>>'

This is not a error linked to a shared library, as, according to: https://sources.debian.org/src/doublecmd/1.0.10-1/components/chsdet/src/CharDistribution.pas/ CharDistribution is a unit, not a library.

For the second package, c-evo-dh, mipsel and m68k fail.

For mipsel, this is related to the fact that -fpic is not the default mode, but it is required to be able to generate position independent code, which is usually required for shared libraries.

For m68k,
(3104) Compiling StdAI.lpr
(3104) Compiling Protocol.pas
Protocol.pas(1963,36) Fatal: Internal error 200502052 Fatal: (1018) Compilation aborted
Error: /usr/bin/ppc68k returned an error exitcode
make[1]: *** [debian/rules:27: override_dh_auto_build] Error 1

Here again, it is a unit that is compiled and generate the internal error: 200502052 After inspection inside the code source,
it seems that indeed pic code is not supported by
the Free Pascal compiler for m68k CPU...
(not even in current trunk version).
I don't know if anyone ever worked on this...

Pierre

Le 03/03/2023 à 13:42, Peter B via fpc-pascal a écrit :

Show quoted text 21 lines
On Debian 12 (Bookworm) FPC release version 3.2.2 crashes on m68k when trying to build a shared library. See https://buildd.debian.org/status/package.php?p=doublecmd h Scroll down to "Tail of log for ... m68k:" I have searched the bug tracker and can't see any related issues. I don't use m68k, so I'm not affected myself with this, just F.Y.I. Should I raise it as an issue on GitLib? Cheers, Peter _______________________________________________ fpc-pascal maillist - https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

Peter B
to Pierre Muller
Pierre Muller wrote 16 lines
For m68k, (3104) Compiling StdAI.lpr (3104) Compiling Protocol.pas Protocol.pas(1963,36) Fatal: Internal error 200502052 Fatal: (1018) Compilation aborted Error: /usr/bin/ppc68k returned an error exitcode make[1]: *** [debian/rules:27: override_dh_auto_build] Error 1 Here again, it is a unit that is compiled and generate the internal error: 200502052 After inspection inside the code source, it seems that indeed pic code is not supported by the Free Pascal compiler for m68k CPU... (not even in current trunk version). I don't know if anyone ever worked on this...

Hi Pierre,

Thanks for your info.

Note, I have raised a bug report for this crash now. https://gitlab.com/freepascal.org/fpc/source/-/issues/40177

Given that -fpic is unsupported on m68k,
perhaps the compiler could abort an attempted -fpic compilation there with a meaningful error message, rather that crash out with an internal error?

Cheers,
Peter

Reply by email

Karoly Balogh
to Peter B

Hi,

Peter B wrote
Note, I have raised a bug report for this crash now. https://gitlab.com/freepascal.org/fpc/source/-/issues/40177

Thanks for this.

Given that -fpic is unsupported on m68k, perhaps the compiler could abort an attempted -fpic compilation there with a meaningful error message, rather that crash out with an internal error?

I briefly looked into this now, and concluded again that implementing PIC is not the difficult part - for me anyway - but figuring it how how it integrates with the rest of Linux, including conventions of ELF and linker, and symbols, and GOT tables and whatever.

But to be honest, I also never really researched this before in depth. I'm actually interested in implementing this, because I suspect there would be large overlaps with Amiga (etc.) support, when it comes to code infrastructure, even if some of the actual code generation would be different. But that's the easy part.

Charlie

Reply by email

Karoly Balogh
to Peter B

Hi,

Peter B wrote 9 lines
Thanks for your interest in this Charlie. Just requesting that maybe any more thoughts on this subject could go to the bug report? https://gitlab.com/freepascal.org/fpc/source/-/issues/40177 As this thread will probably be lost in the mists of time, but the bug report should stay open till fixed.

I now assigned it to myself, so I won't forget it. :) (After all, I did a lot of work on FPC/m68k, and I should be the maintainer of it, or something... :) ) I'm really booked out for the next couple of months, but I definitely want to address this going forward.

FWIW, I don't have any m68k hardware to test any fix, just noticed that the c-evo-dh build crashed on Debian.

Ah, thanks. This would be actually the 2nd time a great set of FPC/m68k fixes come out of some Debian builds. The first time they integrated FPC 3.x for m68k, I also had to do a dive in and fix a handful of issues (and Pierre did a few too, I think). Overall, this kind of feedback is really helpful for legacy/niche processor archs.

Thanks!

Charlie

Reply by email