Recent

Author Topic: Help with New MacBook M1 Silicon install fpc Error  (Read 1127 times)

FanZhen

  • Newbie
  • Posts: 4
Help with New MacBook M1 Silicon install fpc Error
« on: January 14, 2021, 04:36:09 am »
It's OK install fpc & fpcsrc 3.2.0 from https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%202.0.11/

follow the wiki guide

https://wiki.freepascal.org/macOS_Big_Sur_changes_for_developers#ARM64.2FAArch64.2FApple_Silicon_Support
Step 1&2 OK
Step 3 Build a complete native FPC distribution for Darwin/AArch64
Code: Bash  [Select][+][-]
  1.  make FPC=$PWD/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 > build.log

Error Msg:
You have overriden the starting compiler versioncheck while using starting compiler version . This situation is not supported and strange things and errors may happen. Remove OVERRIDEVERSIONCHECK=1 to fix this.
/Applications/Xcode.app/Contents/Developer/usr/bin/make compiler_cycle RELEASE=1
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C compiler cycle
/Applications/Xcode.app/Contents/Developer/usr/bin/make tempclean ppc3.exe
/bin/rm -f ppcross ppc ppc1.exe ppc2.exe ppc3.exe ./msg2inc.exe pp1.wpo pp2.wpo
/Applications/Xcode.app/Contents/Developer/usr/bin/make 'OLDFPC=' next CYCLELEVEL=1
/Applications/Xcode.app/Contents/Developer/usr/bin/make rtlclean rtl
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C  clean
make: *** clean: No such file or directory.  Stop.
make[5]: *** [rtlclean] Error 2
make[4]: *** [next] Error 2
make[3]: *** [ppc1.exe] Error 2
make[2]: *** [cycle] Error 2
make[1]: *** [compiler_cycle] Error 2
make: *** [build-stamp.-] Error 2

What the Problem? Thx

MacOSX Big Sur 11.1 XCode 12.3


trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1442
  • Former Delphi 1-7, 10.2 user
Re: Help with New MacBook M1 Silicon install fpc Error
« Reply #1 on: January 14, 2021, 05:32:48 am »
I suggest you start again and follow the steps very closely.

My build.log looks like this for Step 3:

Quote
/Applications/Xcode.app/Contents/Developer/usr/bin/make compiler_cycle RELEASE=1
You have overriden the starting compiler versioncheck while using starting compiler version 3.3.1. This situation is not supported and strange things and errors may happen. Remove OVERRIDEVERSIONCHECK=1 to fix this.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C compiler cycle
/Applications/Xcode.app/Contents/Developer/usr/bin/make tempclean
/bin/rm -f ppcrossa64 ppc ppc1 ppc2 ppc3 ./msg2inc pp1.wpo pp2.wpo
/Applications/Xcode.app/Contents/Developer/usr/bin/make ppc3
/Applications/Xcode.app/Contents/Developer/usr/bin/make 'OLDFPC=' next CYCLELEVEL=1
/Applications/Xcode.app/Contents/Developer/usr/bin/make rtlclean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C /usr/local/share/fpcsrc/3.3.1/rtl clean
/bin/rm -f fpcmade.aarch64-darwin *aarch64-darwin.fpm Package.fpc *.s
/bin/rm -f   script*.res link*.res *_script.res *_link.res
/bin/rm -f ./ppas.sh *_ppas.sh ppas.sh ppaslink.sh
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C darwin clean
...

There's some very worrying entries in your log fragment:

* ppcross instead of ppcrossa64
* ppc ppc1.exe (!) ppc2.exe (!) ppc3.exe (!) instead of ppc ppc1 ppc2 ppc3

The instructions in the Wiki work - I've just run through them from scratch. macOS 11.1; Xcode 12.3.
Lazarus 2.1 r65061 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r65070 FPC 3.3.1 r49223 macOS 11.2.3 aarch64 Xcode 12.4
Lazarus 2.1 r61574 FPC 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 FPC 3.2.0 Win10 Parallels VM

FanZhen

  • Newbie
  • Posts: 4
Re: Help with New MacBook M1 Silicon install fpc Error
« Reply #2 on: January 14, 2021, 06:03:13 am »
Thanks, look like yours is 3.3.1
I will try that.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1442
  • Former Delphi 1-7, 10.2 user
Re: Help with New MacBook M1 Silicon install fpc Error
« Reply #3 on: January 14, 2021, 06:27:19 am »
"Compile a native AArch64 compiler from the FPC trunk source" Trunk = 3.3.1.

See: Installing non-release versions of FPC.
Lazarus 2.1 r65061 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r65070 FPC 3.3.1 r49223 macOS 11.2.3 aarch64 Xcode 12.4
Lazarus 2.1 r61574 FPC 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 FPC 3.2.0 Win10 Parallels VM

FanZhen

  • Newbie
  • Posts: 4
Re: Help with New MacBook M1 Silicon install fpc Error
« Reply #4 on: January 14, 2021, 08:15:03 am »
fpc 3.3.1 trunk Works!

So with Lazarus trunk.
 
But  there is still a problem with LazDebuggerFpLLdb

When start Lazarus, Show Fppkg Error:
File:/Users/xxx/.config/fppkg.cfg

Error:there is a problem with the Fppkg configuration. (Fppkg reports that the RTL is not installed.)

You could try to restore the configuration files automatically, or adapt the configuration file manually.

And i try to run fpcmkcfg


$fpcmkcfg
An unhandled exception occurred at $00000001044150BC:
EAccessViolation: Access violation
  $00000001044150BC
  $00000001043E705C
  $00000001043E75A4
  $00000001043E8F44

Any idea?

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1442
  • Former Delphi 1-7, 10.2 user
Re: Help with New MacBook M1 Silicon install fpc Error
« Reply #5 on: January 14, 2021, 08:29:33 am »
I have no ~/.config directory. My fppkg.cfg file is found in /private/etc/fppkg.cfg.

It's contents:

Quote
[Defaults]
ConfigVersion=5
LocalRepository={UserDir}.fppkg/
BuildDir={LocalRepository}build/
ArchivesDir={LocalRepository}archives/
CompilerConfigDir=//etc/fppkg
RemoteMirrors=https://www.freepascal.org/repository/mirrors.xml
RemoteRepository=auto
CompilerConfig=default
FPMakeCompilerConfig=default
Downloader=FPC
InstallRepository=user

[Repository]
Name=fpc
Description=Packages which are installed along with the Free Pascal Compiler
Path=/usr/local/lib/fpc/{CompilerVersion}/
Prefix=/usr/local/lib/fpc/../../

[IncludeFiles]
FileMask=//etc/fppkgconf.d/*.conf

[Repository]
Name=user
Description=User-installed packages
Path={LocalRepository}lib/fpc/{CompilerVersion}
Prefix={LocalRepository}
Lazarus 2.1 r65061 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r65070 FPC 3.3.1 r49223 macOS 11.2.3 aarch64 Xcode 12.4
Lazarus 2.1 r61574 FPC 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 FPC 3.2.0 Win10 Parallels VM

FanZhen

  • Newbie
  • Posts: 4
Re: Help with New MacBook M1 Silicon install fpc Error
« Reply #6 on: January 18, 2021, 03:38:47 am »
Thx a lot!
it works finalily after rewrite fppkg.

fpc 3.3.1 trunk revision 48168
lazarus 2.1.0 trunk revision 64403
macOS 11.1 (aarch64), Xcode 12.3

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1442
  • Former Delphi 1-7, 10.2 user
Re: Help with New MacBook M1 Silicon install fpc Error
« Reply #7 on: January 18, 2021, 04:48:59 am »
Great! Thanks for taking the time to let us know it's now fixed.
Lazarus 2.1 r65061 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r65070 FPC 3.3.1 r49223 macOS 11.2.3 aarch64 Xcode 12.4
Lazarus 2.1 r61574 FPC 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 FPC 3.2.0 Win10 Parallels VM

 

TinyPortal © 2005-2018