Recent

Author Topic: Apple Developer Transition Kit  (Read 31351 times)

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Apple Developer Transition Kit
« Reply #60 on: August 09, 2020, 03:05:33 pm »
Chris,

Did you manage to update macOS to Beta 4? I see a notification, but downloading fails in several seconds.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Apple Developer Transition Kit
« Reply #61 on: August 09, 2020, 03:35:04 pm »
Assuming it's the same as the Intel version - software update offers two versions: Full (12GB) and (click on More...) and you get Update (3GB). I chose update :)

ChrisR

  • Full Member
  • ***
  • Posts: 247
Re: Apple Developer Transition Kit
« Reply #62 on: August 09, 2020, 05:08:45 pm »
Igor,
 I believe if you look at the left panel of the Software Update window you will see the text "Updates for this Mac are managed externally". If you see this, I believe that the "Update Now" button (if displayed) will not be functional. You need to wait for the external management system to push an update for you.

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Apple Developer Transition Kit
« Reply #63 on: August 10, 2020, 08:34:43 pm »
Chris,

Thanks, I've understood.

trev,

I think it's a special case with this Apple DTK.

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Apple Developer Transition Kit
« Reply #64 on: August 10, 2020, 08:37:12 pm »
It seems that macOS Big Sur for Apple Silicon doesn't support OpenAl (or it's a bug in current Beta).

My OpenAl code doesn't play anything. I found OpenALSoundManager here on the forum:
https://forum.lazarus.freepascal.org/index.php?topic=37890.0
and that code also doesn't play anything. Just silence.

APP compiled for Intel in Rosetta 2 emaulation plays OpenAl audio.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: Apple Developer Transition Kit
« Reply #65 on: August 10, 2020, 08:45:12 pm »
If it didn't support OpenAL at all, you would get linker errors (or perhaps segmentation faults in case it's dynamically loaded, does not exist, and then you try to call its functions). It could also be a bug in the binding or in the way it links to/tries to load the framework.

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Apple Developer Transition Kit
« Reply #66 on: August 11, 2020, 09:59:47 am »
Yes, it's logical.

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Apple Developer Transition Kit
« Reply #67 on: August 18, 2020, 09:04:12 pm »
I had to restore Apple DTK Mac and reinstall FPC and Lazarus from trunk.

I successfully compiled FPC trunk for AARCH64.

But Lazarus trunk cannot be compiled:

Quote
page.inc(36,29) Error: Operator is not overloaded: "Class Of TNotebook" and "Boolean"
shape.inc(33,24) Error: Illegal expression
shape.inc(33,44) Error: Illegal expression
shape.inc(34,24) Error: Illegal expression
shape.inc(34,44) Error: Illegal expression
shape.inc(35,24) Error: Illegal expression
shape.inc(35,44) Error: Illegal expression
shape.inc(36,24) Error: Illegal expression
shape.inc(36,44) Error: Illegal expression
shape.inc(37,24) Error: Illegal expression
shape.inc(37,44) Error: Illegal expression
shape.inc(40,24) Error: Illegal expression
shape.inc(40,44) Error: Illegal expression
shape.inc(41,24) Error: Illegal expression
shape.inc(41,44) Error: Illegal expression
shape.inc(42,24) Error: Illegal expression
shape.inc(42,44) Error: Illegal expression
shape.inc(43,24) Error: Illegal expression
shape.inc(43,44) Error: Illegal expression
shape.inc(44,24) Error: Illegal expression
shape.inc(44,44) Error: Illegal expression
shape.inc(47,24) Error: Illegal expression
shape.inc(47,44) Error: Illegal expression
shape.inc(48,24) Error: Illegal expression
shape.inc(48,44) Error: Illegal expression
shape.inc(49,24) Error: Illegal expression
shape.inc(49,44) Error: Illegal expression
shape.inc(50,24) Error: Illegal expression
shape.inc(50,44) Error: Illegal expression
shape.inc(51,24) Error: Illegal expression
shape.inc(51,44) Error: Illegal expression
shape.inc(54,24) Error: Illegal expression
shape.inc(54,44) Error: Illegal expression
shape.inc(55,24) Error: Illegal expression
shape.inc(55,44) Error: Illegal expression
shape.inc(56,24) Error: Illegal expression
shape.inc(56,44) Error: Illegal expression
shape.inc(57,24) Error: Illegal expression
shape.inc(57,44) Error: Illegal expression
shape.inc(58,24) Error: Illegal expression
shape.inc(58,44) Error: Illegal expression
extctrls.pp(1726) Fatal: There were 41 errors compiling module, stopping
Fatal: Compilation aborted
make[1]: *** [alllclunits.ppu] Error 1
make: *** [lazbuild] Error 2

I've downloaded Lazarus trunk from git:

git clone https://github.com/graemeg/lazarus

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Apple Developer Transition Kit
« Reply #68 on: August 18, 2020, 09:22:46 pm »
UPD. I downloaded old revision from July 31 which worked fine for macOS ARM. Now Lazarus compiles OK on Apple DTK.

There is a bug in one of recent changes in the code.

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Apple Developer Transition Kit
« Reply #69 on: August 22, 2020, 08:41:53 am »
Be careful with updating Apple DTK from Beta 1 to Beta 4 or 5. It falls to infinite bootloop. There are many complaints on Apple forum.

I had to restore my Apple DTK in DFU mode using another Mac and USB-C cable to recover macOS and install Beta 4 from a scratch.

Updating from Beta 4 to Beta 5 worked fine.
« Last Edit: August 22, 2020, 09:26:36 am by Igor Kokarev »

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Apple Developer Transition Kit
« Reply #70 on: September 18, 2020, 02:58:45 pm »
Chris,

Can you check Beta 7 on Apple DTK?

I just updated from Beta 6 to Beta 7.

I could run earlier compiled ARM version of my app. After recompilation it crashes on startup.

Also since Beta 6 I can't load any dylibs which I compiled earlier on the same Mac (DTK).

It seems to work worse with each Beta.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: Apple Developer Transition Kit
« Reply #71 on: September 18, 2020, 07:02:39 pm »
The issue with your dylibs no longer working under beta 6 is probably because they added a requirement for all binaries (executables and dylibs) to be code signed in that version. When you link an exe/library, the linker will add a fake code signature (that will be trusted by you local system, but not usable for distribution). That signature will be invalidated if you perform any extra operations on the generated binary afterwards though, in particular using the strip tool. And while FPC uses the linker's symbol stripping functionality when generating executables, it uses the strip tool when generating dynamic libraries (I think this is because older versions of the linker stripped too many symbols away).

So it should work if you codesign your libraries again after stripping them, either using a fake signature (see the beta 6 release notes for the command) or using a real code signing certificate. I'll look into changing the compiler as well. I'll also look into beta 7 issues (I did get a DTK in the end about two weeks ago).

Edit: to disable stripping, compile with -Xs-. That should allow your dylibs to work again.
Edit 2: it's actually listed as a known bug that strip invalidates these signatures, so I'll wait with making changes to the compiler since that suggests Apple may still fix it
« Last Edit: September 19, 2020, 05:36:59 pm by Jonas Maebe »

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Apple Developer Transition Kit
« Reply #72 on: September 19, 2020, 08:15:56 am »
Jonas,

Thanks! I'll check on Monday again.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: Apple Developer Transition Kit
« Reply #73 on: September 19, 2020, 01:04:15 pm »
There are actually a bunch of threads on Apple's forums about issues with codesigning on beta 7, e.g. https://developer.apple.com/forums/thread/660812 . My DTK (fortunately, in hindsight) failed to update to beta 7.
« Last Edit: September 19, 2020, 01:07:03 pm by Jonas Maebe »

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Apple Developer Transition Kit
« Reply #74 on: September 25, 2020, 03:31:54 pm »
Jonas,

I just restored Apple DTK to Beta 8 and I can't compile FPC again according wiki.

Quote
*** Compiler ppcx64 not found.  Stop

Code: Pascal  [Select][+][-]
  1. mac@Igors-Mac freepascal % make distclean
  2. make: -iVSPTPSOTO: Command not found
  3. /bin/rm -f build-stamp.*
  4. /bin/rm -f base.build-stamp.*
  5. mac@Igors-Mac freepascal % make FPC=ppcx64 OPT="-ap -FD/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin -XR/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" CPU_TARGET=aarch64 -j 4 FPMAKEOPT="-T 4" all > build.log
  6. Makefile:135: *** Compiler ppcx64 not found.  Stop.

I downloaded FPC:
Code: Pascal  [Select][+][-]
  1. git clone https://github.com/graemeg/freepascal

Xcode 12.2 Beta is installed.
« Last Edit: September 25, 2020, 03:35:47 pm by Igor Kokarev »

 

TinyPortal © 2005-2018