Recent

Author Topic: Fatal: Internal error 200305106  (Read 1695 times)

paule32

  • Sr. Member
  • ****
  • Posts: 280
Fatal: Internal error 200305106
« on: February 22, 2024, 12:21:14 pm »
now, I have next Fatal Error 200305106

This is my console command, and output:
Code: [Select]
C:\lazarus\x86_64\fpc\3.2.2\bin\x86_64-win64\fpc.exe -Twin64 -Mdelphi -dwindows -dwin64 -v0 -dwindll -O2 -Os -vl -Anasmwin64 -al -FE..\..\units\fpc-sys -Us system.pas
Free Pascal Compiler version 3.2.2 [2022/09/24] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
2 202/1.248 Kb Used
100 283/1.312 Kb Used
200 328/1.312 Kb Used
300 358/1.344 Kb Used
400 430/1.408 Kb Used
system.pas(477,1) Fatal: Internal error 200305106
Fatal: Compilation aborted
Error: C:\lazarus\x86_64\fpc\3.2.2\bin\x86_64-win64\ppcx64.exe returned an error exitcode

And the source code for system.pas, you can see there:
https://dpaste.com/297SPSPTD#line-476

rvk

  • Hero Member
  • *****
  • Posts: 6575
Re: Fatal: Internal error 200305106
« Reply #1 on: February 22, 2024, 01:40:48 pm »
If I take your system.pas and try to compile I get a whole lot of other errors about string.

What is special about your system files?
(or am I missing something?)

Quote
C:\Users\Rik>q:fpc.exe -Twin64 -Mdelphi -dwindows -dwin64 -v0 -dwindll -O2 -Os -vl -Anasmwin64 -al -Us system.pas
Free Pascal Compiler version 3.3.1 [2024/02/20] for x86_64
Copyright (c) 1993-2024 by Florian Klaempfl and others
2 253/992 Kb Used
system.pas(62,22) Error: Using 'string' alias is not allowed in the system unit. Use short-,ansi- or unicodestring.
system.pas(63,22) Error: Using 'string' alias is not allowed in the system unit. Use short-,ansi- or unicodestring.
100 346/1.056 Kb Used
200 394/1.088 Kb Used
300 424/1.088 Kb Used
400 496/1.152 Kb Used
system.pas(411,24) Error: Using 'string' alias is not allowed in the system unit. Use short-,ansi- or unicodestring.
system.pas(414,39) Error: Using 'string' alias is not allowed in the system unit. Use short-,ansi- or unicodestring.
system.pas(419,36) Error: Using 'string' alias is not allowed in the system unit. Use short-,ansi- or unicodestring.
system.pas(422,94) Error: Identifier not found "Char"
system.pas(422,99) Error: Default parameter required for "FILLCHAR"
system.pas(431,51) Error: Using 'string' alias is not allowed in the system unit. Use short-,ansi- or unicodestring.
system.pas(431,72) Error: Using 'string' alias is not allowed in the system unit. Use short-,ansi- or unicodestring.
system.pas(451,1) Fatal: There were 9 errors compiling module, stopping
Fatal: Compilation aborted
Error: Q:\dev64\fpc\bin\x86_64-win64\ppcx64.exe returned an error exitcode

Thaddy

  • Hero Member
  • *****
  • Posts: 16157
  • Censorship about opinions does not belong here.
Re: Fatal: Internal error 200305106
« Reply #2 on: February 22, 2024, 01:43:34 pm »
He is trying to build his own system.pas but does not read any documentation about  how to implement the string types. He should at a minimum just implement just shortstring.
If I smell bad code it usually is bad code and that includes my own code.

rvk

  • Hero Member
  • *****
  • Posts: 6575
Re: Fatal: Internal error 200305106
« Reply #3 on: February 22, 2024, 01:44:58 pm »
Ha. I see with an older FPC it does generate the error.

@paule32. Do note that your system.pas doesn't compile anymore with the latest FPC trunk version.
So your efforts might all go to waste if you upgrade your FPC in the future.

I advise you to at least upgrade it now so you don't get surprises later on in your development.

Quote
C:\Users\Rik>q:\Laz3\fpc\3.2.2\bin\x86_64-win64\fpc -Twin64 -Mdelphi -dwindows -dwin64 -v0 -dwindll -O2 -Os -vl -Anasmwin64 -al -Us system.pas
Free Pascal Compiler version 3.2.2 [2023/12/17] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
2 190/992 Kb Used
100 271/1.056 Kb Used
200 316/1.056 Kb Used
300 346/1.056 Kb Used
400 418/1.152 Kb Used
system.pas(477,1) Fatal: Internal error 200305106
Fatal: Compilation aborted
Error: q:\Laz3\fpc\3.2.2\bin\x86_64-win64\ppcx64.exe returned an error exitcode

paule32

  • Sr. Member
  • ****
  • Posts: 280
Re: Fatal: Internal error 200305106
« Reply #4 on: February 22, 2024, 01:48:22 pm »
What is special about your system files?
(or am I missing something?)

Yours:
Free Pascal Compiler version 3.3.1 [2024/02/20] for x86_64

Mine:
Free Pascal Compiler version 3.2.2 [2022/09/24] for x86_64

Thaddy

  • Hero Member
  • *****
  • Posts: 16157
  • Censorship about opinions does not belong here.
Re: Fatal: Internal error 200305106
« Reply #5 on: February 22, 2024, 01:48:41 pm »
No, that is not related: system compiles just fine on trunk too (provided -Ur option is used)
Otherwise there would be no compiler (by sheer logic)... O:-) )
If I smell bad code it usually is bad code and that includes my own code.

rvk

  • Hero Member
  • *****
  • Posts: 6575
Re: Fatal: Internal error 200305106
« Reply #6 on: February 22, 2024, 01:51:45 pm »
Yours:
Free Pascal Compiler version 3.3.1 [2024/02/20] for x86_64

Mine:
Free Pascal Compiler version 3.2.2 [2022/09/24] for x86_64
Yep. Yours is an older FPC 3.2.2 from 2022. Mine is latest trunk 3.3.1 compiled the day before yesterday.

Mine might give you better error message instead of those mysterious internal error.
(seeing that Thaddy mentioned implementing string types and the newer FPC gives errors about string type.)

Thaddy

  • Hero Member
  • *****
  • Posts: 16157
  • Censorship about opinions does not belong here.
Re: Fatal: Internal error 200305106
« Reply #7 on: February 22, 2024, 01:57:22 pm »
Rik it is NOT related to tthe compiler itself. He is trying to build a modified compiler but lacks the knowledge to do so. Several people are trying to help him, but he is a stubborn Dane, who should be able to do that - writing a compiler - by birth. At least he understands wry humor, so nationality verified. 8-)

(Any system needs to be compiled before you have a compiler, bootstrapped by a last older version )
« Last Edit: February 22, 2024, 02:01:26 pm by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

rvk

  • Hero Member
  • *****
  • Posts: 6575
Re: Fatal: Internal error 200305106
« Reply #8 on: February 22, 2024, 02:00:47 pm »
Rik it is NOT related to tthe compiler itself. He is trying to build a modified compiler but lacks the knowledge to do so. Several people are trying to help him, but he is a stubborn Dane, who should be able to do that - writing a compiler - by birth. At least he understands wry humor, so nationality verified. 8-)
Haha, yes, I got that now ;)

But he is also using an older version of FPC (3.2.2).
The newer trunk version FPC (3.3.1) gives more clearer messages about not being able to use the String alias in the system.pas unit.

So if he uses FPC trunk, at least the internal error is gone and the messages might be somewhat clearer (other than just "Internal error").
(see my error messages with trunk in message #2)


Thaddy

  • Hero Member
  • *****
  • Posts: 16157
  • Censorship about opinions does not belong here.
Re: Fatal: Internal error 200305106
« Reply #9 on: February 22, 2024, 02:04:43 pm »
3.2.2 is the bootstrap compiler for trunk. So he also needs 3.2.2.
If I smell bad code it usually is bad code and that includes my own code.

Fibonacci

  • Hero Member
  • *****
  • Posts: 600
  • Internal Error Hunter
Re: Fatal: Internal error 200305106
« Reply #10 on: February 22, 2024, 02:12:40 pm »
Missing

procedure TObject.AfterConstruction;
procedure TObject.BeforeDestruction;

Thaddy

  • Hero Member
  • *****
  • Posts: 16157
  • Censorship about opinions does not belong here.
Re: Fatal: Internal error 200305106
« Reply #11 on: February 22, 2024, 02:30:22 pm »
For his purpose he does not need those.
To come back to the compiler versioning: he can use overrideversioncheck=1, which is a make file setting. (usually NOT recommended, read as forbidden, but for this case allowed, but I guess he did not read the make file)
« Last Edit: February 22, 2024, 02:36:10 pm by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

rvk

  • Hero Member
  • *****
  • Posts: 6575
Re: Fatal: Internal error 200305106
« Reply #12 on: February 22, 2024, 02:40:39 pm »
For his purpose he does not need those.
Maybe not needed for own purpose... but to get rid of the internal error, they are needed.

I used the 3.2.2 ppcrossx64.exe, added the BeforeDestruction and AfterDestruction and the internal error was gone.
Some extra errors about QObject.Create not defined etc could be solved easilly.

So... it seems the BeforeDestruction and AfterDestruction are needed.

Quote
C:\Users\Rik>set path=Q:\dev64\binutils\install\crossbinmsdos;%PATH%

C:\Users\Rik>Q:\dev64\bootstrap\ppcrossx64.exe -Twin64 -Mdelphi -dwindows -dwin64 -v0 -dwindll -O2 -Os -vl -Anasmwin64 -al -Us system.pas
2 117/1.280 Kb Used
100 169/1.376 Kb Used
200 196/1.376 Kb Used
300 218/1.376 Kb Used
400 249/1.440 Kb Used
500 378/1.568 Kb Used
600 556/1.696 Kb Used

C:\Users\Rik>dir system.*
 Volume in drive C is OS
 Volume Serial Number is E031-9826

 Directory of C:\Users\Rik

22-02-2024  14:38            34.713 system.o
22-02-2024  14:33            21.052 system.pas
22-02-2024  14:38            58.291 system.ppu
22-02-2024  14:38            75.422 system.s
               4 File(s)        189.478 bytes
               0 Dir(s)  28.522.790.912 bytes free

C:\Users\Rik>

Edit: Yep. confirmed. Just removed those 2 again and got this:
Quote
C:\Users\Rik>Q:\dev64\bootstrap\ppcrossx64.exe -Twin64 -Mdelphi -dwindows -dwin64 -v0 -dwindll -O2 -Os -vl -Anasmwin64 -al -Us system.pas
2 117/1.280 Kb Used
100 169/1.376 Kb Used
200 196/1.376 Kb Used
300 218/1.376 Kb Used
400 261/1.472 Kb Used
system.pas(477,1) Fatal: Internal error 200305106
Fatal: Compilation aborted

C:\Users\Rik>
« Last Edit: February 22, 2024, 02:43:06 pm by rvk »

Thaddy

  • Hero Member
  • *****
  • Posts: 16157
  • Censorship about opinions does not belong here.
Re: Fatal: Internal error 200305106
« Reply #13 on: February 22, 2024, 03:33:45 pm »
Only as stubs, just like the stringtypes other than shortstring. After that he can clean up his own compiler code..... Good luck! Great Danes die young, btw.(the dog that is : avg 8-10 years)
IOW he needs to remove those from the compiler and that is not by any means easy.
(Working your way backwards and remove the parts you don't need)

If he or you encounter such issues, now you know what to do....
« Last Edit: February 22, 2024, 03:40:38 pm by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

paule32

  • Sr. Member
  • ****
  • Posts: 280
Re: Fatal: Internal error 200305106
« Reply #14 on: February 22, 2024, 07:03:14 pm »
Thank you guys:
here is my effort result:
https://github.com/paule32/Qt_FPC/releases/tag/tag1

where did you get all this Information's - also the internal error's...

 

TinyPortal © 2005-2018