Welcome, Guest
Username: Password: Remember me
CodeTyphon MacOS Development, discussions and problems
  • Page:
  • 1

TOPIC:

CT on new Apple Silicon M1 & Big Sur 4 years 1 month ago #15263

  • Denis D
  • Denis D's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 11
  • Thank you received: 0
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.

CT on new Apple Silicon M1 & Big Sur 4 years 1 month ago #15265

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4538
  • Thank you received: 1116
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

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

Last edit: by Sternas Stefanos.

CT on new Apple Silicon M1 & Big Sur 3 years 3 months ago #16133

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

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


 
You mean something like this? :)





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.

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

Last edit: by Aleksandar.

CT on new Apple Silicon M1 & Big Sur 3 years 3 months ago #16134

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4538
  • Thank you received: 1116
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.

CT on new Apple Silicon M1 & Big Sur 3 years 3 months ago #16139

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

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.

CT on new Apple Silicon M1 & Big Sur 3 years 3 months ago #16140

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4538
  • Thank you received: 1116
Can you zip an upload all
/usr/local/codetyphon/fpc/fpc64/bin/
folder ?

 
PilotLogic Architect and Core Programmer

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

Last edit: by Sternas Stefanos.

CT on new Apple Silicon M1 & Big Sur 3 years 3 months ago #16141

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

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


 
Sure!
we.tl/t-PZZvQwviFn

btw. Surprise! :)


 

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

CT on new Apple Silicon M1 & Big Sur 3 years 3 months ago #16143

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4538
  • Thank you received: 1116
Thanks Sir
PilotLogic Architect and Core Programmer

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

CT on new Apple Silicon M1 & Big Sur 3 years 2 weeks ago #16348

  • Forsteri
  • Forsteri's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 28
  • Thank you received: 0
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.

CT on new Apple Silicon M1 & Big Sur 3 years 2 weeks ago #16349

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4538
  • Thank you received: 1116
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.

CT on new Apple Silicon M1 & Big Sur 3 years 2 weeks ago #16351

  • Forsteri
  • Forsteri's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 28
  • Thank you received: 0
Confirmed!

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

CT on new Apple Silicon M1 & Big Sur 3 years 2 weeks ago #16352

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4538
  • Thank you received: 1116
But, you can CrossBuild from MacOS Intel to MacOS arm64
PilotLogic Architect and Core Programmer

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

Last edit: by Sternas Stefanos.

CT on new Apple Silicon M1 & Big Sur 3 years 2 weeks ago #16361

  • Forsteri
  • Forsteri's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 28
  • Thank you received: 0
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.

  • Page:
  • 1