View Issue Details

IDProjectCategoryView StatusLast Update
0038682FPCCompilerpublic2021-04-05 20:00
ReporterKarl-Michael Schindler Assigned ToJonas Maebe  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformdarwinOSMac OS X 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0038682: svn version 49054 breaks building the cross targets aarch64-linux and aarch64-darwin
Descriptionsvn version 49054 breaks building the cross targets aarch64-linux and aarch64-darwin with this error message:

...
/BlaBla/FreePascal/compiler/ppcrossa64 -Tlinux -Paarch64 -XPaarch64-linux- -Ur -Xs -O2 -n -Fuaarch64 -Fusystems -Fu/BlaBla/FreePascal/rtl/units/aarch64-linux -Fiaarch64 -FEaarch64/bin/aarch64-linux -FUaarch64/units/aarch64-linux -dRELEASE -Fl/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -daarch64 -dGDB -dBROWSERLOG -Fuarmgen -Sew -daarch64 -dGDB -dBROWSERLOG -Fuarmgen -Sew pp.pas
cfileutl.pas(1082,12) Error: Compilation raised exception internally
Fatal: Compilation aborted
An unhandled exception occurred at $000000010F802880:
EAccessViolation: Access violation
  $000000010F802880

make[3]: *** [ppca64] Error 217
make[2]: *** [cycle] Error 2
make[1]: *** [compiler_cycle] Error 2
make: *** [build-stamp.aarch64-linux] Error 2
Steps To Reproducesvn up -r 49054
make all OPT=-Fl/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib OS_TARGET=linux CPU_TARGET=aarch64
Additional InformationI do not think it matters, but here come the details:
macOS: 11.2.3
Xcode: 12.4
Bootstrap fpc compiler: fpc 3.2.0 installed using fink

I also checked about 40 other cross targets. None of the other cpu-targets shows this error, it is aarch64 only.
TagsNo tags attached.
Fixed in Revision49094
FPCOldBugId
FPCTarget-
Attached Files

Activities

Anton Kavalenka

2021-03-29 21:09

reporter   ~0129979

I've seen RTE217 when compiler tries to read outdated units (after interface changes).
Maybe make clean helps

Trevor Roydhouse

2021-03-30 01:05

reporter   ~0129983

Confirm failure with:

commit 1903f12025ec528e566f1dd9881f6e9d1a1a8928
Author: Florian Klaempfl <florian@freepascal.org>
Date: Thu Mar 25 21:51:52 2021 +0000

      * patch by J. Gareth Moreton: Nothing (NOP) node optimisation, resolves 0038194
    
    git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@49054 3ad0048d-3df7-0310-abae-a5850022a9f2

Result:

/usr/local/share/fpcsrc/3.3.1/compiler/ppc1 -Ur -Xs -O2 -n -Fuaarch64 -Fusystems -Fu/usr/local/share/fpcsrc/3.3.1/rtl/units/aarch64-darwin -Fiaarch64 -FEaarch64/bin/aarch64-darwin -FUaarch64/units/aarch64-darwin -dRELEASE -ap -FD/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin -XR/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -DD2021/03/25 -daarch64 -dGDB -dBROWSERLOG -Fuarmgen -Sew pp.pas
cfileutl.pas(1082,12) Error: Compilation raised exception internally
Fatal: Compilation aborted
An unhandled exception occurred at $0000000102FBD9D0:
EAccessViolation: Access violation
  $0000000102FBD9D0
  $000000010307A2C4
  $000000010307A62C
  $000000010307A2C4
  $000000010307A66C
  $000000010307A2C4
  $000000010307A45C
  $000000010307A2C4
  $000000010307A66C
  $000000010307A2C4
  $0000000103113470
  $0000000103113494
  $0000000103119A60
  $000000010311A5A4
  $000000010311A2E4
  $00000001030F9E4C
  $00000001030FC000

make[5]: *** [ppca64] Error 217
make[4]: *** [next] Error 2
make[3]: *** [ppc2] Error 2
make[2]: *** [cycle] Error 2
make[1]: *** [compiler_cycle] Error 2
make: *** [build-stamp.aarch64-darwin] Error 2

My build script:

echo "Rebuilding FPC trunk..."
make distclean
make FPC=/usr/local/lib/fpc/3.3.1/ppca64 OPT="-ap -FD/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin -XR/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" -j 4 FPMAKEOPT="-T 4" OVERRIDEVERSIONCHECK=1 all
echo "Installing FPC trunk..."
make FPC=/usr/local/lib/fpc/3.3.1/ppca64 OPT="-ap -FD/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin -XR/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" install

An additional "make clean" before running the script does not help.

Big Sur 11.2.3, Xcode 12.4, Intel FPC 3.2.0 installed from official package used for build.

Karl-Michael Schindler

2021-04-01 12:01

reporter   ~0130018

svn commit 49094 resolves the issue for both targets. Not that I understand any bit of this.

J. Gareth Moreton

2021-04-03 06:08

developer   ~0130055

Confirm that the issue is now resolved?

Trevor Roydhouse

2021-04-03 06:53

reporter   ~0130056

Confirmed for me (M1 Mac mini).

Karl-Michael Schindler

2021-04-05 19:59

reporter   ~0130112

Thank you all for your contributions. Let's keep up the spirit.

Issue History

Date Modified Username Field Change
2021-03-29 15:56 Karl-Michael Schindler New Issue
2021-03-29 21:09 Anton Kavalenka Note Added: 0129979
2021-03-30 01:05 Trevor Roydhouse Note Added: 0129983
2021-04-01 12:01 Karl-Michael Schindler Note Added: 0130018
2021-04-03 06:08 J. Gareth Moreton Note Added: 0130055
2021-04-03 06:53 Trevor Roydhouse Note Added: 0130056
2021-04-05 18:10 Jonas Maebe Assigned To => Jonas Maebe
2021-04-05 18:10 Jonas Maebe Status new => resolved
2021-04-05 18:10 Jonas Maebe Resolution open => fixed
2021-04-05 18:10 Jonas Maebe Fixed in Version => 3.3.1
2021-04-05 18:10 Jonas Maebe Fixed in Revision => 49094
2021-04-05 18:10 Jonas Maebe FPCTarget => -
2021-04-05 19:59 Karl-Michael Schindler Status resolved => closed
2021-04-05 19:59 Karl-Michael Schindler Note Added: 0130112