View Issue Details

IDProjectCategoryView StatusLast Update
0034212FPCCompilerpublic2018-12-30 23:22
ReporterKarl-Michael SchindlerAssigned ToSven Barth 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformpowerpc, i386, x86_64OSMac OS XOS Version10.4-10.6
Product VersionProduct Buildrevision 39693 
Target VersionFixed in Version3.3.1 
Summary0034212: revision 39693 breaks cross compiling the package libxml2
Descriptionbuild breaks for all systems that build libxml2:
example for i386-linux:
...
Start compiling package libxml2 for target i386-linux.
       Compiling libxml/BuildUnit_libxml2.pp
       Compiling ./libxml/src/xml2.pas
       Compiling ./libxml/src/xmlxsdparser.pas
       Compiling ./libxml/src/xmlxsd.pas
External command "/BlaBla/FreePascal/compiler/ppcross386 -Tlinux -FUlibxml/units/i386-linux/ -Fu/BlaBla/FreePascal/rtl/units/i386-linux/ -Fu/BlaBla/FreePascal/packages/rtl-objpas/units/i386-linux/ -Fulibxml/src -Filibxml/src -Tlinux -Pi386 -XPi386-linux- -Xr -Ur -Xs -O2 -n -ap -di386 -dRELEASE -XX -CX -Sc -viq libxml/BuildUnit_libxml2.pp" failed with exit code 55552. Console output:
Target OS: Linux for i386
Compiling libxml/BuildUnit_libxml2.pp
Compiling ./libxml/src/xml2.pas
Compiling ./libxml/src/xmlxsdparser.pas
Writing Resource String Table file: xmlxsdparser.rsj
Compiling ./libxml/src/xmlxsd.pas
Writing Resource String Table file: xmlxsd.rsj
43293 lines compiled, 0.3 sec
Error: Compilation raised exception internally
An unhandled exception occurred at $0000000000000000:
EAccessViolation: Access violation
  $0000000000000000

The installer encountered the following error:
Compilation of "BuildUnit_libxml2.pp" failed
make[2]: *** [Makefile:1717: smart] Fehler 1
make[2]: Verzeichnis „/BlaBla/FreePascal/packages“ wird verlassen
make[1]: *** [Makefile:2651: packages_smart] Fehler 2
make[1]: Verzeichnis „/BlaBla/FreePascal“ wird verlassen
make: *** [Makefile:2806: build-stamp.i386-linux] Fehler 2
Steps To Reproducesvn up -r 39693
make clean all OPT="-ap" OS_TARGET=linux CPU_TARGET=i386
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Relationships

related to 0034210 closedSven Barth fpc: Recent management operator changes read to i386-linux compiler crash on freeing operators 

Activities

Marco van de Voort

2018-09-02 13:28

manager   ~0110458

I also have it with a straight win32 build, and I had a traceback to sysfreemem():

  $0040D83B SYSFREEMEM, line 1222 of c:/repo/fpc/rtl/inc/heap.inc

Thaddy de Koning

2018-09-03 08:11

reporter   ~0110469

It doesn't break on arm.

Karl-Michael Schindler

2018-09-03 08:32

reporter   ~0110471

It does here when cross-compiling on macOS for arm-linux as for any other linux. Please note that the package libxml2 is not built for a number of targets, like darwin and embedded.

Anton Kavalenka

2018-09-03 23:06

reporter   ~0110482

maybe 0034210 ?

Karl-Michael Schindler

2018-09-03 23:20

reporter   ~0110483

I also thought so. One should check, whether that one has also been introduced with the same revision.

Lagunov Aleksey

2018-09-04 09:41

reporter   ~0110486

also cross-compile from linux64 to win32

External command "/home/install/source/fpcsrc/compiler/ppcross386 -Twin32 -FUlibxml/units/i386-win32/ -Fu/home/install/source/fpcsrc/rtl/units/i386-win32/ -Fu/home/install/source/fpcsrc/packages/rtl-objpas/units/i386-win32/ -Fulibxml/src -Filibxml/src -Twin32 -Pi386 -XPi386-win32- -Xr -gl -Ur -Xs -O2 -n -di386 -dDEBUG -dRELEASE -XX -CX -Sc -viq libxml/BuildUnit_libxml2.pp" failed with exit code 55552. Console output:
Target OS: Win32 for i386
Compiling libxml/BuildUnit_libxml2.pp
Compiling ./libxml/src/xml2.pas
Compiling ./libxml/src/xmlxsdparser.pas
Writing Resource String Table file: xmlxsdparser.rsj
Compiling ./libxml/src/xmlxsd.pas
Writing Resource String Table file: xmlxsd.rsj
43293 lines compiled, 0.3 sec
Error: Compilation raised exception internally
An unhandled exception occurred at $0000000000000000:
EAccessViolation: Access violation
  $0000000000000000 of (Unknown file)


The installer encountered the following error:
Compilation of "BuildUnit_libxml2.pp" failed

Sven Barth

2018-09-04 22:27

manager   ~0110496

From what I've found it's in fact that the fix of 0034210 probably uncovered a compiler bug that had been introduced some time in 3.1.1, because a compiler build with 3.0.4 does not fail the one build with itself does. As a workaround I was able to move the code that triggers this bug into a nested procedure so the build should work again. However that still leaves the error itself...

For those interested: the revision is 39711.
(I'll leave the bug report open due to this)

Karl-Michael Schindler

2018-09-05 00:08

reporter   ~0110506

After revision 39711 all the cross targets get built again on macOS, including all the ones which previously failed to build the package libxml2.

Lagunov Aleksey

2018-09-05 15:07

reporter   ~0110518

After revision 39711 cross-compile from linux64 to win32 work ok.

Karl-Michael Schindler

2018-12-30 23:21

reporter   ~0113025

Time to close after being fixed.

Issue History

Date Modified Username Field Change
2018-09-01 23:38 Karl-Michael Schindler New Issue
2018-09-02 13:28 Marco van de Voort Note Added: 0110458
2018-09-03 08:11 Thaddy de Koning Note Added: 0110469
2018-09-03 08:32 Karl-Michael Schindler Note Added: 0110471
2018-09-03 23:06 Anton Kavalenka Note Added: 0110482
2018-09-03 23:20 Karl-Michael Schindler Note Added: 0110483
2018-09-04 09:41 Lagunov Aleksey Note Added: 0110486
2018-09-04 22:27 Sven Barth Note Added: 0110496
2018-09-04 22:27 Sven Barth Status new => confirmed
2018-09-04 22:29 Sven Barth Relationship added related to 0034210
2018-09-05 00:08 Karl-Michael Schindler Note Added: 0110506
2018-09-05 15:07 Lagunov Aleksey Note Added: 0110518
2018-09-16 21:47 Florian Status confirmed => resolved
2018-09-16 21:47 Florian Fixed in Version => 3.3.1
2018-09-16 21:47 Florian Resolution open => fixed
2018-09-16 21:47 Florian Assigned To => Sven Barth
2018-12-30 23:21 Karl-Michael Schindler Note Added: 0113025
2018-12-30 23:21 Karl-Michael Schindler Status resolved => closed