View Issue Details

IDProjectCategoryView StatusLast Update
0034394FPCCompilerpublic2018-10-22 13:00
ReporterKarl-Michael SchindlerAssigned ToFlorian 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformdarwinOSMac OS XOS Version10.5, 10.6
Product Version3.3.1Product Buildrevision 39815 
Target VersionFixed in Version3.3.1 
Summary0034394: Revision 39815 breaks cross building package numlib on arm-linux
DescriptionRevision 39815 breaks cross building package numlib on arm-linux. Later revisions up to 39861 do not fix it. Other targets, in particular m68k-linux and sparc-linux, are not affected. Log:

...
       Compiling ./numlib/src/spl.pas
External command "/BlaBla/FreePascal/compiler/ppcrossarm -Tlinux -FUnumlib/units/arm-linux/ -Fu/BlaBla/FreePascal/rtl/units/arm-linux/ -Funumlib/src -Finumlib/src -Tlinux -Parm -XParm-linux- -Xr -Ur -Xs -O2 -n -ap -darm -dRELEASE -XX -CX -Sc -viq numlib/BuildUnit_numlib.pp" failed with exit code 55552. Console output:
Target OS: Linux for ARMEL
Compiling numlib/BuildUnit_numlib.pp
Compiling ./numlib/src/dsl.pas
Compiling ./numlib/src/typ.pas
Compiling ./numlib/src/omv.pas
Compiling ./numlib/src/mdt.pas
Compiling ./numlib/src/det.pas
Compiling ./numlib/src/eigh1.pas
Compiling ./numlib/src/eigh2.pas
Compiling ./numlib/src/eig.pas
Compiling ./numlib/src/int.pas
Compiling ./numlib/src/inv.pas
Compiling ./numlib/src/iom.pas
Compiling ./numlib/src/sle.pas
Compiling ./numlib/src/spe.pas
Compiling ./numlib/src/roo.pas
Compiling ./numlib/src/ipf.pas
Compiling ./numlib/src/numlib.pas
Compiling ./numlib/src/ode.pas
Compiling ./numlib/src/spl.pas
15268 lines compiled, 1.1 sec
Error: Compilation raised exception internally
An unhandled exception occurred at $0000000100016D26:
EAccessViolation: Access violation
  $0000000100016D26

The installer encountered the following error:
Compilation of "BuildUnit_numlib.pp" failed
make[2]: *** [Makefile:1729: smart] Fehler 1
...
Steps To Reproducesvn up -r 39815
make clean all OPT="-ap" OS_TARGET=linux CPU_TARGET=arm
Additional InformationI do not think, it matters, but for the sake of completeness: The host is macOS 10.13. The bootstrap compiler is ppcx64, version 3.0.4.
TagsNo tags attached.
Fixed in Revision39997
FPCOldBugId
FPCTarget
Attached Files

Activities

Karl-Michael Schindler

2018-10-06 16:44

reporter   ~0111285

I am not completely sure, but I found two more targets, which get broken in revision 39813. It might be related that jvm-java and jvm-android stop with:

...
/BlaBla/FreePascal/compiler/ppcjvm -Ur -Tandroid -Pjvm -Ur -Xs -O2 -n -Fi../../inc -Fi../../jvm -Fi../../java -FE. -FU/BlaBla/FreePascal/rtl/units/jvm-android -ap -djvm -dRELEASE -Us -Sg @rtl.cfg ../../java/system.pp
genmath.inc(973,20) Fatal: Internal error 2010120506
Fatal: Compilation aborted
make[3]: *** [Makefile:2365: system.ppu] Fehler 1
make[3]: Verzeichnis „/BlaBla/FreePascal/rtl/android/jvm“ wird verlassen
make[2]: *** [Makefile:3525: android/jvm_all] Fehler 2
...

Florian

2018-10-07 18:00

administrator   ~0111310

I cannot test with 39815 as it has broken Makefiles, but at least 39825 works here. Can you try what happens after a double make distclean?

Karl-Michael Schindler

2018-10-07 18:44

reporter   ~0111313

After 'svn up -r 39825' and two times 'make mistclean', 'make all OPT="-ap" OS_TARGET=linux CPU_TARGET=arm' still gives:

...
Compiling ./numlib/src/spl.pas
15268 lines compiled, 1.3 sec
Error: Compilation raised exception internally
An unhandled exception occurred at $0000000100016956:
EAccessViolation: Access violation
  $0000000100016956


The installer encountered the following error:
Compilation of "BuildUnit_numlib.pp" failed
make[2]: *** [Makefile:1729: smart] Fehler 1
make[2]: Verzeichnis „/BlaBla/FreePascal/packages“ wird verlassen
make[1]: *** [Makefile:2698: packages_smart] Fehler 2
make[1]: Verzeichnis „/BlaBla/FreePascal“ wird verlassen
...

jvm-java and jvm-android fail with:

...
/BlaBla/FreePascal/compiler/ppcjvm -Ur -Tandroid -Pjvm -Ur -Xs -O2 -n -Fi../../inc -Fi../../jvm -Fi../../java -FE. -FU/BlaBla/FreePascal/rtl/units/jvm-android -ap -djvm -dRELEASE -Us -Sg @rtl.cfg ../../java/system.pp
genmath.inc(973,20) Fatal: Internal error 2010120506
Fatal: Compilation aborted
...

All other 40 cross targets are built without problems, including arm-linux with the option -dFPC_ARMHF as in 'make all OPT="-ap -dFPC_ARMHF" OS_TARGET=linux CPU_TARGET=arm'.

Florian

2018-10-07 20:43

administrator   ~0111316

Can you please add "gl -dextdebug" to OPT and post the last lines of the output?

Karl-Michael Schindler

2018-10-08 11:59

reporter   ~0111319

As discussed on irc: With "-dextdebug" the build of any target fails, back to the earliest revision, which can be built with fpc 3.0.4. Log snippet:

...
/BlaBla/FreePascal/compiler/ppc1 -Ur -Xs -O2 -n -Fux86_64 -Fusystems -Fu/BlaBla/FreePascal/rtl/units/x86_64-darwin -Fix86_64 -FE. -FUx86_64/units/x86_64-darwin -dRELEASE -dextdebug -dx86_64 -dGDB -dBROWSERLOG -Fux86 -Sew pp.pas
constexp.pas(125,13) Warning: Location (LOC_CSSETREG) not equal to expectloc (LOC_REG): typeconvn
constexp.pas(594) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
make[5]: *** [Makefile:4331: ppcx64] Fehler 1
make[5]: Verzeichnis „/BlaBla/FreePascal/compiler“ wird verlassen
make[4]: *** [Makefile:4375: next] Fehler 2
make[4]: Verzeichnis „/BlaBla/FreePascal/compiler“ wird verlassen
make[3]: *** [Makefile:4383: ppc2] Fehler 2
make[3]: Verzeichnis „/BlaBla/FreePascal/compiler“ wird verlassen
make[2]: *** [Makefile:4391: cycle] Fehler 2
make[2]: Verzeichnis „/BlaBla/FreePascal/compiler“ wird verlassen
make[1]: *** [Makefile:2824: compiler_cycle] Fehler 2
make[1]: Verzeichnis „/BlaBla/FreePascal“ wird verlassen
make: *** [Makefile:2856: build-stamp.x86_64-darwin] Fehler 2

Sven Barth

2018-10-08 16:23

manager   ~0111325

Also pass ALLOW_WARNINGS=1 in that case as -dEXTDEBUG leads to quite some warnings and the compiler is compiled with -Sew which treats them as errors.

Karl-Michael Schindler

2018-10-08 16:53

reporter   ~0111326

Last edited: 2018-10-08 16:54

View 2 revisions

Indeed, with ALLOW_WARNINGS=1 'make all -dEXTDEBUG' runs through. Target arm-linux then fails with:

...
/BlaBla/FreePascal/compiler/ppcrossarm -Ur -Tlinux -Parm -XParm-linux- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/BlaBla/FreePascal/rtl/units/arm-linux -ap -dextdebug -gl -darm -dRELEASE ../objpas/math.pp
Error: Compilation raised exception internally
An unhandled exception occurred at $0000000100016F76:
EAccessViolation: Access violation
  $0000000100016F76

make[5]: *** [Makefile:3944: math.ppu] Fehler 217
make[5]: Verzeichnis „/BlaBla/FreePascal/rtl/linux“ wird verlassen
make[4]: *** [Makefile:2045: linux_all] Fehler 2
make[4]: Verzeichnis „/BlaBla/FreePascal/rtl“ wird verlassen
make[3]: *** [Makefile:4497: rtl] Fehler 2
make[3]: Verzeichnis „/BlaBla/FreePascal/compiler“ wird verlassen
make[2]: *** [Makefile:4417: cycle] Fehler 2
make[2]: Verzeichnis „/BlaBla/FreePascal/compiler“ wird verlassen
make[1]: *** [Makefile:2824: compiler_cycle] Fehler 2
make[1]: Verzeichnis „/BlaBla/FreePascal“ wird verlassen
make: *** [Makefile:2856: build-stamp.arm-linux] Fehler 2

Thaddy de Koning

2018-10-09 16:51

reporter   ~0111340

It seems gone here. I never encountered it and compile arm-linux (more than once, sometimes) daily. It may be a fluke between revisions. It is not reproducable here anymore.

Karl-Michael Schindler

2018-10-09 20:08

reporter   ~0111346

What is your host system? Any version since 39815 shows the error on my macOS 10.13.

Thaddy de Koning

2018-10-11 13:21

reporter   ~0111371

Last edited: 2018-10-11 13:26

View 4 revisions

armhf-linux32 and x86_64-win64
Both native. I will build cross compilers and also test on my Mac (64bit)

Florian

2018-10-20 14:09

administrator   ~0111481

Can you please check after with at least r39991? It is very likely that this one or r39988 fixed it as they fix memory corruption issues related to math routine compilation.

Karl-Michael Schindler

2018-10-20 19:21

reporter   ~0111492

Indeed, r39988 fixes arm-linux. However, the jvm targets (java & android) are still broken, even beyond 39991 up to 39996.

Florian

2018-10-21 16:54

administrator   ~0111498

What about r39997?

Karl-Michael Schindler

2018-10-21 17:34

reporter   ~0111499

39997 does fix the jvm targets. All issues are resolved by now. Issue can be closed.

Issue History

Date Modified Username Field Change
2018-10-06 12:28 Karl-Michael Schindler New Issue
2018-10-06 16:44 Karl-Michael Schindler Note Added: 0111285
2018-10-07 18:00 Florian Note Added: 0111310
2018-10-07 18:01 Florian Status new => feedback
2018-10-07 18:44 Karl-Michael Schindler Note Added: 0111313
2018-10-07 18:44 Karl-Michael Schindler Status feedback => new
2018-10-07 20:43 Florian Note Added: 0111316
2018-10-08 11:59 Karl-Michael Schindler Note Added: 0111319
2018-10-08 16:23 Sven Barth Note Added: 0111325
2018-10-08 16:53 Karl-Michael Schindler Note Added: 0111326
2018-10-08 16:54 Karl-Michael Schindler Note Edited: 0111326 View Revisions
2018-10-09 16:51 Thaddy de Koning Note Added: 0111340
2018-10-09 20:08 Karl-Michael Schindler Note Added: 0111346
2018-10-11 13:21 Thaddy de Koning Note Added: 0111371
2018-10-11 13:22 Thaddy de Koning Note Edited: 0111371 View Revisions
2018-10-11 13:24 Thaddy de Koning Note Edited: 0111371 View Revisions
2018-10-11 13:26 Thaddy de Koning Note Edited: 0111371 View Revisions
2018-10-20 14:09 Florian Note Added: 0111481
2018-10-20 19:21 Karl-Michael Schindler Note Added: 0111492
2018-10-21 16:54 Florian Note Added: 0111498
2018-10-21 17:34 Karl-Michael Schindler Note Added: 0111499
2018-10-21 18:24 Florian Fixed in Revision => 39997
2018-10-21 18:24 Florian Status new => resolved
2018-10-21 18:24 Florian Fixed in Version => 3.3.1
2018-10-21 18:24 Florian Resolution open => fixed
2018-10-21 18:24 Florian Assigned To => Florian
2018-10-22 13:00 Karl-Michael Schindler Status resolved => closed