× CodeTyphon MacOS Development, discussions and problems

Question CT on new Apple Silicon M1 & Big Sur

  • Denis D
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 months 2 days ago #15263 by Denis D
CT on new Apple Silicon M1 & Big Sur was created by Denis D
Hello,
I tried to install CT 7.0 on new Apple M1 with Big Sur after disabling the Gatekeeper, but only Intel env seems to be provided in the CT install package.
Is there a way to install CT targeting the new Apple Silicon & Big Sur environment ?
Thanks a lot, regards.

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
10 months 2 days ago - 10 months 2 days ago #15265 by Sternas Stefanos
Replied by Sternas Stefanos on topic CT on new Apple Silicon M1 & Big Sur
Thanks Sir
CT don't support new MacOS 11.0.1 "Big Sur" yet.

Lab Report

a) On Amd/Intel CPU FreePascal gives ERROR:
ld: library not found for -lc
An error occurred while linking 
pp.pas(280,36) Error: Error while linking

and this because Apple remove libc.dylib from "Big Sur"

CTCenter work OK
screen 1

This problem must solved by FreePascal Team.

In Lab CT version 7.3 (unpublished) we don't use XQuartz anymore,
we install ALL CT needs from MacPorts.

b) For Arm64 (M1) we don't have Apple hardware to test...
but we will add all fixes to CT, to be ready (when and if).

c) We will try to make CrossBuild procedure from MacOS Catalina to Arm64-MacOS 11.0.1 "Big Sur"

Every MacOS release give us problems.
The compatibility (at development level) of new with old OS version has many, many, many problems.
and we are NOT happy with this.

.

PilotLogic Architect and Core Programmer
Last edit: 10 months 2 days ago by Sternas Stefanos.

Please Log in or Create an account to join the conversation.

More
1 week 2 days ago - 1 week 2 days ago #16133 by Aleksandar
Replied by Aleksandar on topic CT on new Apple Silicon M1 & Big Sur

Is there a way to install CT targeting the new Apple Silicon & Big Sur environment ?


 

You mean something like this? :)

File Attachment:


File Attachment:


Unfortunately I have no idea how to recompile CTC. @sternas can you help me with this please?

I will post all my changes and step by step guide after I resolve some relatively small issues.
Last edit: 1 week 2 days ago by Aleksandar.

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
1 week 2 days ago #16134 by Sternas Stefanos
Replied by Sternas Stefanos on topic CT on new Apple Silicon M1 & Big Sur
CodeTyphon on M1 ?

From the photo I see Typhon IDE build for M1
CTCenter source is NOT in CT

PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

More
1 week 1 day ago #16139 by Aleksandar
Replied by Aleksandar on topic CT on new Apple Silicon M1 & Big Sur

CodeTyphon on M1 ?

From the photo I see Typhon IDE build for M1
CTCenter source is NOT in CT

As you can see on those screenshots I successfully build FPC and CT on my M1 MacBook Pro yesterday. :)

I had some issues, but I managed to overcome them. I was also little confused why CTC is not recompiled, but now it's clear.

Main problem is that installer completely removes all fpc instances from disk and fpc from those two archives contains binaries that doesn't work on M1.
/usr/local/codetyphon/allzips/binfpc/aarch64-darwin_bootstrap.7z
/usr/local/codetyphon/allzips/binfpc/aarch64-darwin.7z

Even those are arm64 executables, they just doesn't work here.
❯ ls
fpc    ppca64
❯ file fpc
fpc: Mach-O executable arm64
❯ file ppca64
ppca64: Mach-O executable arm64
❯ ./fpc
[1]    67685 killed     ./fpc

I replaced those with multiarch binaries from FPC 3.2.2.
fpc: Mach-O universal binary with 3 architectures: [i386:Mach-O executable i386] [x86_64:Mach-O 64-bit executable x86_64] [arm64]
fpc (for architecture i386):    Mach-O executable i386
fpc (for architecture x86_64):    Mach-O 64-bit executable x86_64
fpc (for architecture arm64):    Mach-O 64-bit executable arm64

Those are universal binaries that works on both intel and arm. On M1 they work as native ARM, but if you execute them with Rosetta, they work as intel binaries.

I made few changes in the installer, replace those archives after initial 0) Install CodeTyphon Studio (remove old first) step and successfully build everything.

One important notice: GDB doesn't support ARM, so you need to use LLDB. LLDB is also recommended debugger for MacOS (by Lazarus team) since you do not need to build and sign GDB.

Since CTC source is not available would you please compile it with multiarch support . I will gladly test it on both ARM and Intel.

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
1 week 1 day ago - 1 week 1 day ago #16140 by Sternas Stefanos
Replied by Sternas Stefanos on topic CT on new Apple Silicon M1 & Big Sur
Can you zip an upload all
/usr/local/codetyphon/fpc/fpc64/bin/
folder ?

 

PilotLogic Architect and Core Programmer
Last edit: 1 week 1 day ago by Sternas Stefanos.

Please Log in or Create an account to join the conversation.

More
1 week 1 day ago #16141 by Aleksandar
Replied by Aleksandar on topic CT on new Apple Silicon M1 & Big Sur

Can you zip an upload all
/usr/local/codetyphon/fpc/fpc64/bin/
folder ?


 

Sure!
we.tl/t-PZZvQwviFn

btw. Surprise! :)

File Attachment:

 

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
1 week 1 day ago #16143 by Sternas Stefanos
Replied by Sternas Stefanos on topic CT on new Apple Silicon M1 & Big Sur
Thanks Sir

PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.