View Issue Details

IDProjectCategoryView StatusLast Update
0037286FPCCompilerpublic2020-08-08 19:40
ReporterFelix Yan Assigned ToJonas Maebe  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionduplicate 
Platformx86_64OSArch Linux 
Product Version3.2.0 
Summary0037286: Hedgewars failed to build with fpc 3.2.0 with "Internal error 200306031"
DescriptionHedgewars 1.0.0 fails to build here with fpc 3.2.0, but it builds fine with 3.0.4 with other components unchanged.

uFloat.pas(454,37) Note: Call to subroutine "function hwSqr(const t:hwFloat):<record type>;" marked as inline is not inlined
uFloat.pas(454,37) Note: Call to subroutine "function hwSqr(const t:hwFloat):<record type>;" marked as inline is not inlined
uVariables.pas(2991,25) Note: Call to subroutine "function Min(a:LongInt;b:LongInt):LongInt;" marked as inline is not inlined
uVariables.pas(2992,25) Note: Call to subroutine "function Min(a:LongInt;b:LongInt):LongInt;" marked as inline is not inlined
uVariables.pas(3001,28) Note: Call to subroutine "function Min(a:LongInt;b:LongInt):LongInt;" marked as inline is not inlined
uVariables.pas(3003,29) Note: Call to subroutine "function Min(a:LongInt;b:LongInt):LongInt;" marked as inline is not inlined
LuaPas.pas(932,21) Note: Call to subroutine "function StrPas(p:PChar):ShortString;" marked as inline is not inlined
uCommands.pas(61,5) Note: Call to subroutine "procedure ParseCommand(CmdStr:ShortString;TrustedSource:Boolean);" marked as inline is not inlined
uCommands.pas(109,33) Note: Call to subroutine "function CheckNoTeamOrHH:Boolean;" marked as inline is not inlined
uUtils.pas(570,5) Note: Call to subroutine "function Utf8ToUnicode(Dest:PUnicodeChar;Source:PChar;MaxChars:Int64):Int64;" marked as inline is not inlined
uRender.pas(151,24) Note: Call to subroutine "function isDxAreaOffscreen(X:LongInt;Width:LongInt):LongInt;" marked as inline is not inlined
uRender.pas(151,62) Note: Call to subroutine "function isDyAreaOffscreen(Y:LongInt;Height:LongInt):LongInt;" marked as inline is not inlined
uRender.pas(253,5) Note: Call to subroutine "procedure SetTexCoordPointer(p:Pointer;n:LongInt);" marked as inline is not inlined
uRender.pas(258,5) Note: Call to subroutine "procedure SetVertexPointer(p:Pointer;n:LongInt);" marked as inline is not inlined
uRender.pas(264,5) Note: Call to subroutine "procedure SetVertexPointer(p:Pointer;n:LongInt);" marked as inline is not inlined
uRender.pas(475,15) Note: Call to subroutine "function StrPas(p:PChar):ShortString;" marked as inline is not inlined
uRender.pas(893,1) Note: Call to subroutine "procedure DrawTextureFromRect(X:LongInt;Y:LongInt;r:PSDL_Rect;SourceTexture:PTexture);" marked as inline is not inlined
uRender.pas(1517,5) Note: Call to subroutine "procedure untint;" marked as inline is not inlined
uRender.pas(1556,1) Note: Call to subroutine "procedure untint;" marked as inline is not inlined
uRender.pas(1566,5) Note: Call to subroutine "procedure untint;" marked as inline is not inlined
uRender.pas(1611,5) Note: Call to subroutine "procedure untint;" marked as inline is not inlined
uRender.pas(2064,1) Note: Call to subroutine "procedure untint;" marked as inline is not inlined
uCursor.pas(31,5) Note: Call to subroutine "procedure SDL_WarpMouse(x:Word;y:Word);" marked as inline is not inlined
uLocale.pas(139,35) Note: Call to subroutine "function GetRandom(m:LongWord):DWord;" marked as inline is not inlined
uLandGraphics.pas(212,13) Note: Call to subroutine "procedure fillPixelFromIceSprite(pixelX:LongInt;pixelY:LongInt);" marked as inline is not inlined
uLandGraphics.pas(380,5) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(380,5) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(382,5) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(382,5) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(384,5) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(384,5) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(386,5) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(386,5) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(388,5) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(388,5) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(390,5) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(390,5) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(461,22) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(461,22) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(463,9) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(463,9) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(465,5) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(465,5) Note: Call to subroutine "function FillLandCircleSegmentFT(x:LongInt;y:LongInt;dx:LongInt;dy:LongInt;fill:fillType):DWord;" marked as inline is not inlined
uLandGraphics.pas(675,58) Note: Call to subroutine "operator *(const z1:hwFloat;const z2:LongInt):<record type>;" marked as inline is not inlined
uLandGraphics.pas(677,59) Note: Call to subroutine "operator *(const z1:hwFloat;const z2:LongInt):<record type>;" marked as inline is not inlined
uCollisions.pas(222,26) Note: Call to subroutine "function hwSqr(const t:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(222,26) Note: Call to subroutine "function hwSqr(const t:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(260,20) Note: Call to subroutine "operator +(const z1:hwFloat;const z2:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(260,20) Note: Call to subroutine "operator +(const z1:hwFloat;const z2:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(260,20) Note: Call to subroutine "operator *(const z1:hwFloat;const z2:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(260,20) Note: Call to subroutine "operator *(const z1:hwFloat;const z2:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(260,20) Note: Call to subroutine "function hwSqr(const t:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(260,20) Note: Call to subroutine "operator +(const z1:hwFloat;const z2:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(260,20) Note: Call to subroutine "function hwSqr(const t:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(260,20) Note: Call to subroutine "function hwSqr(const t:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(260,20) Note: Call to subroutine "operator *(const z1:hwFloat;const z2:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(260,20) Note: Call to subroutine "function hwSqrt(const x:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(291,20) Note: Call to subroutine "operator +(const z1:hwFloat;const z2:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(291,20) Note: Call to subroutine "operator +(const z1:hwFloat;const z2:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(291,20) Note: Call to subroutine "operator *(const z1:hwFloat;const z2:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(291,20) Note: Call to subroutine "operator *(const z1:hwFloat;const z2:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(291,20) Note: Call to subroutine "function hwSqr(const t:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(291,20) Note: Call to subroutine "operator +(const z1:hwFloat;const z2:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(291,20) Note: Call to subroutine "function hwSqr(const t:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(291,20) Note: Call to subroutine "function hwSqr(const t:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(291,20) Note: Call to subroutine "operator *(const z1:hwFloat;const z2:hwFloat):<record type>;" marked as inline is not inlined
uCollisions.pas(291,20) Note: Call to subroutine "function hwSqrt(const x:hwFloat):<record type>;" marked as inline is not inlined
uWorld.pas(167,13) Note: Call to subroutine "function GetRandom(m:LongWord):DWord;" marked as inline is not inlined
uWorld.pas(713,5) Note: Call to subroutine "procedure untint;" marked as inline is not inlined
uWorld.pas(993,13) Note: Call to subroutine "procedure Tint(c:LongWord);" marked as inline is not inlined
uWorld.pas(1049,18) Note: Call to subroutine "procedure untint;" marked as inline is not inlined
uWorld.pas(1093,13) Note: Call to subroutine "procedure Tint(c:LongWord);" marked as inline is not inlined
uWorld.pas(1095,13) Note: Call to subroutine "procedure untint;" marked as inline is not inlined
uWorld.pas(1103,9) Note: Call to subroutine "procedure untint;" marked as inline is not inlined
uWorld.pas(1185,13) Note: Call to subroutine "procedure untint;" marked as inline is not inlined
uWorld.pas(1364,17) Note: Call to subroutine "procedure Tint(c:LongWord);" marked as inline is not inlined
uWorld.pas(1368,17) Note: Call to subroutine "procedure untint;" marked as inline is not inlined
uWorld.pas(1381,17) Note: Call to subroutine "procedure Tint(c:LongWord);" marked as inline is not inlined
uWorld.pas(1385,17) Note: Call to subroutine "procedure untint;" marked as inline is not inlined
uWorld.pas(1395,13) Note: Call to subroutine "procedure Tint(c:LongWord);" marked as inline is not inlined
uWorld.pas(1399,13) Note: Call to subroutine "procedure untint;" marked as inline is not inlined
uWorld.pas(1863,17) Note: Call to subroutine "procedure untint;" marked as inline is not inlined
uWorld.pas(1214,5) Fatal: Internal error 200306031
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
make[2]: *** [hedgewars/CMakeFiles/hwengine.dir/build.make:150: hedgewars/CMakeFiles/hwengine.dir/hwengine.o] Error 1

In comparison to 3.0.4, the output is:

hwengine.pas(719,1) Warning: "crtbeginS.o" not found, this will probably cause a linking failure
hwengine.pas(719,1) Warning: "crtendS.o" not found, this will probably cause a linking failure
[ 48%] Linking Pascal executable ../bin/hwengine
Linking /build/hedgewars/src/hedgewars-src-1.0.0/bin/hwengine
/usr/bin/ld: warning: /build/hedgewars/src/hedgewars-src-1.0.0/bin/link.res contains output sections; did you forget -T?
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Relationships

duplicate of 0037508 resolvedFlorian Uninitialized variable will trigger an internal error(200306031) in O3 

Activities

Marco van de Voort

2020-06-30 14:15

manager   ~0123680

I can't seem to build it on windows since it seems to need additional build tools to generate config.inc.

It would be good to try to reduce the problem to a few units (around uworld), enough to reproduce the problem.

Sven Barth

2020-06-30 23:11

manager   ~0123690

Last edited: 2020-06-30 23:12

View 2 revisions

@Marco: simply complete the config.inc.in with some compilable values.

I've managed to pinpoint the problematic routine, it's the inlining of uWorld.ShiftWorld and it also occurs in Trunk. I've attached a testcase.

@Felix: as a workaround (which will be required for 3.2.0 anyway) you can do one of the following:
- remove the inline directive from uWorld.ShiftWorld
- split the multiplication and addition in ShiftWorld like this:
procedure ShiftWorld(Dir: LongInt); inline;
var
  tmp: LongInt;
begin
    preShiftWorldDx:= WorldDx;
    tmp := LongInt(Dir * LongInt(playWidth));
    WorldDx := WorldDx + tmp;
    //WorldDx:= WorldDx + LongInt(Dir * LongInt(playWidth))};
end;

tw37286.pp (301 bytes)   
program tw37286;

{$mode objfpc}

var preShiftWorldDx: LongInt;
  WorldDx: LongInt;
  playWidth: LongInt;

procedure ShiftWorld(Dir: LongInt); inline;
begin
    preShiftWorldDx:= WorldDx;
    WorldDx:= WorldDx + LongInt(Dir * LongInt(playWidth));

end;

begin
  ShiftWorld(-1);
end.
tw37286.pp (301 bytes)   

Felix Yan

2020-08-01 17:31

reporter   ~0124462

@Sven: Thanks a lot for the workaround! I am now removing the inline directive for packaging Hedgewars for Arch, and the build went on without an error.

Sorry for the late response.

Issue History

Date Modified Username Field Change
2020-06-30 00:05 Felix Yan New Issue
2020-06-30 14:15 Marco van de Voort Note Added: 0123680
2020-06-30 23:11 Sven Barth Note Added: 0123690
2020-06-30 23:11 Sven Barth File Added: tw37286.pp
2020-06-30 23:12 Sven Barth Note Edited: 0123690 View Revisions
2020-08-01 17:31 Felix Yan Note Added: 0124462
2020-08-08 19:40 Jonas Maebe Assigned To => Jonas Maebe
2020-08-08 19:40 Jonas Maebe Status new => resolved
2020-08-08 19:40 Jonas Maebe Resolution open => duplicate
2020-08-08 19:40 Jonas Maebe FPCTarget => -
2020-08-08 19:40 Jonas Maebe Relationship added duplicate of 0037508