× 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
1 year 2 weeks 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
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
1 year 2 weeks ago - 1 year 2 weeks 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: 1 year 2 weeks ago by Sternas Stefanos.

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

More
2 months 3 weeks ago - 2 months 3 weeks 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: 2 months 3 weeks ago by Aleksandar.

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

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
2 months 3 weeks 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
2 months 3 weeks 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
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
2 months 3 weeks ago - 2 months 3 weeks 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: 2 months 3 weeks ago by Sternas Stefanos.

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

More
2 months 3 weeks 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
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
2 months 3 weeks 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.

More
6 days 3 hours ago #16348 by Forsteri
Replied by Forsteri on topic CT on new Apple Silicon M1 & Big Sur
Hello.

After all, does the M1 chip not work with the CT7.60 as it is?
Some people seem to be running it on aarch86, but I don't know how.

There is also a statement that you should install with x86_64 with arch -x86_64 zsh, but when you try it, the following error occurs.

/usr/local/bin/gmake -C packager/registration
gmake[1]: Entering directory '/usr/local/codetyphon/typhon/packager/registration'
/bin/rm -f ../units/x86_64-darwin/fcllaz.ppu
/bin/mkdir -p ../units/x86_64-darwin
/usr/local/codetyphon/fpc/fpc64/bin/x86_64-darwin/ppcx64 -MObjFPC -Scghi -O1 -gw2 -godwarfsets -gl -l -vewnhibq -gw -Fu. -Fu../../../fpcsrc/rtl -FE. -FU../units/x86_64-darwin -dx86_64 fcllaz.pas
Hint: (11030) Start of reading config file /usr/local/codetyphon/fpc/fpc64/bin/x86_64-darwin/fpc.cnf
Hint: (11031) End of reading config file /usr/local/codetyphon/fpc/fpc64/bin/x86_64-darwin/fpc.cnf
Free Pascal Compiler version 3.3.1 [2021/10/31] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
(1002) Target OS: Darwin for x86_64
(3104) Compiling fcllaz.pas
Fatal: (10022) Can't find unit system used by fcllaz
Fatal: (1018) Compilation aborted

I have installed fpc3.2.2, but I don't understand how to reflect it in CT7.60 after that.

/usr/local/bin/fpc
Free Pascal Compiler version 3.2.2 [2021/05/16] for aarch64
Copyright (c) 1993-2021 by Florian Klaempfl and others

I've been waiting for a year, but will it not be dealt with?

Thanking you in advance.

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

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
6 days 3 hours ago #16349 by Sternas Stefanos
Replied by Sternas Stefanos on topic CT on new Apple Silicon M1 & Big Sur
Sir
CodeTyphon NOT support MacOS on arm64 as Host OS yet.
We don't have the hardware Mac with M1 chip.


 

PilotLogic Architect and Core Programmer

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

More
6 days 2 hours ago #16351 by Forsteri
Replied by Forsteri on topic CT on new Apple Silicon M1 & Big Sur
Confirmed!

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

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
6 days 2 hours ago - 6 days 2 hours ago #16352 by Sternas Stefanos
Replied by Sternas Stefanos on topic CT on new Apple Silicon M1 & Big Sur
But, you can CrossBuild from MacOS Intel to MacOS arm64

PilotLogic Architect and Core Programmer
Last edit: 6 days 2 hours ago by Sternas Stefanos.

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

More
5 days 10 hours ago #16361 by Forsteri
Replied by Forsteri on topic CT on new Apple Silicon M1 & Big Sur
I have both, but they never start at the same time.
Almost all you have to do is use the M1 chip Mac Mini.

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