Recent

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

ChrisR

  • Full Member
  • ***
  • Posts: 247
Apple Developer Transition Kit
« on: July 07, 2020, 08:37:17 pm »
Today I received an Apple DTK. I tried out the following Lazarus applications compiled for Intel x86-64:
 MRIcroGL OpenGL Volume Rendering, PascalScript, PythonEngine https://github.com/neurolabusc/MRIcroGL
 Surfice OpenGL Suface Rendering, PythonEngine https://github.com/neurolabusc/surf-ice/releases
 Several Metal Projects https://github.com/neurolabusc/Metal-Demos
 Lazarus IDE

In general, they all seem fine. Despite being deprecated, OpenGL works very nicely. MacOS 11.0 Beta still comes with Python 2.7 installed (despite 2.7 being past "end of life").

The performance of the OpenGL graphics is really just fine. Since my desktop is a 1920x1080 while my MacBook is a retina 2560x1600, this may not be a fair comparison. However, the performance of the Lazarus built x86-64 tools seems pretty seamless and completely usable.

The big issue I have encountered is that I can not install the Xcode command line tools. Running "xcode-select --install" from the command line brings up the standard "Finding software" window, but after a few hours it has not finished. I will try updating all system software and restarting. Without the SDKs installed by this tool, I can not compile Lazarus or FPC projects on the DTK.

So long story short, looks like Intel-compiled Lazarus projects work just fine on Apple Silicon. Hopefully Jonas and Dmitry can get fps and Lazarus compiling locally in short order.


jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Apple Developer Transition Kit
« Reply #1 on: July 07, 2020, 08:59:55 pm »
The big issue I have encountered is that I can not install the Xcode command line tools. Running "xcode-select --install" from the command line brings up the standard "Finding software" window, but after a few hours it has not finished. I will try updating all system software and restarting. Without the SDKs installed by this tool, I can not compile Lazarus or FPC projects on the DTK.

If this continues to be unsuccessful you might want to submit a bug report at https://developer.apple.com/bug-reporting/ or ask for help at https://developer.apple.com/forums. And did you know that Apple asks for feedback in the annual developer survey? This may be another place to ask for support for Free Pascal.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: Apple Developer Transition Kit
« Reply #2 on: July 07, 2020, 09:01:57 pm »
I had the same issue with installing the command line tools on macOS 11.0 beta on my Intel Mac. As a workaround, you can point FPC to the command line tools embedded in the Xcode application bundle using the -FD command line parameter, e.g. -FD/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/

ChrisR

  • Full Member
  • ***
  • Posts: 247
Re: Apple Developer Transition Kit
« Reply #3 on: July 07, 2020, 10:36:29 pm »
@jwdietrich I did post a topic, but it was removed from the web site as it relates to beta software. I have now learned that the expected behavior for beta software is to report with the feedback assistant. The license is pretty strict, and I can not post benchmarks, and the lack of open communication makes it hard to see how others have handled these issues. Regardless, it is their software and hardware, and I agreed to abide by them.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Apple Developer Transition Kit
« Reply #4 on: July 08, 2020, 02:14:34 am »
And did you know that Apple asks for feedback in the annual developer survey? This may be another place to ask for support for Free Pascal.

Despite being a paid-up "Apple developer" I did not know about the survey, so thanks! I have filled it in pointing out that I do not use Xcode but FPC and Lazarus and asking for specific FPC support such as the translation of framework API headers and code samples :) I doubt my single contribution will have much effect, but if everyone using FPC/Lazarus filled in the survey ...

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Apple Developer Transition Kit
« Reply #5 on: July 08, 2020, 07:55:06 pm »
Hi Chris,

Thanks for the good news! It's nice to hear that good performance of x86-64 OpenGL/Metal apps in emulation on ARM.

I hope to see Lazarus on Mac ARM in future.

Good luck for Lazarus/FPC team!

Manlio

  • Full Member
  • ***
  • Posts: 162
  • Pascal dev
Re: Apple Developer Transition Kit
« Reply #6 on: July 09, 2020, 01:12:49 pm »
Hi Chris,

[...] good performance of x86-64 OpenGL/Metal apps in emulation on ARM. [...]


Does anyone know -- or have any sense in this regard -- whether old (intel-era) apps will continue to work on ARM (via emulation or whatever) or will they be deprecated at some point, and then stop working?
manlio mazzon gmail

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Apple Developer Transition Kit
« Reply #7 on: July 09, 2020, 01:24:58 pm »
With Apple you can't tell for sure whether they'll continue to work. E.g. when they transitioned from PowerPC to Intel they only shipped Rosetta from 10.4.4 till 10.6.8. For Rosetta 2... time will tell.

But if I had to guess in two or three years that will be thrown out. They'll merely give the developers enough time to port their software and then it's goodbye Intel.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Apple Developer Transition Kit
« Reply #8 on: July 09, 2020, 02:01:50 pm »
It was six years from the appearance of the first Intel in the Mac Transition Kit in June 2005 until Apple dropped Rosetta for Lion in July 2011.

During the current transition from Intel to ARM, Apple said they would still be releasing new Macs with Intel processors, so who knows how long it'll be before Rosetta 2 gets axed from a new OS release.

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Apple Developer Transition Kit
« Reply #9 on: July 17, 2020, 03:28:08 pm »
I also received Apple Developer Transition Kit today.

My Metal app has big visual problems. Textures appear at wrong coordinates on the screen.

Same app on Big Sur + Intel iMac works fine.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: Apple Developer Transition Kit
« Reply #10 on: July 17, 2020, 06:06:37 pm »
While a compiler bug is if course possible, it sounds more like an error in your program. One thing that immediately springs to mind is the fact that on AppleSilicon, the page size (and hence page alignment) is 16KB, as opposed to 4KB on Intel. I have zero experience programming Metal, but given the integration of the GPU and the ARM64 chip, it wouldn't surprise me if that were a requirement for both. There should also be a validation mode that you can activate for Metal to find errors (although I don't know if it will catch this one).

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Apple Developer Transition Kit
« Reply #11 on: July 17, 2020, 08:46:33 pm »
Jonas,

Thanks for your advice! I only tested Intel version of my app on Apple Silicon. When I begin compilation of ARM version, I'll read again your message.

It seems that problems in my Metal app on Apple Silicon are related with wrong matrix computations.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: Apple Developer Transition Kit
« Reply #12 on: July 17, 2020, 08:54:47 pm »
Then it may be bug in Rosetta 2. Intel applications should work identical without any changes on the DTK (and the final versions of the AArch64 Macs). Everything from the Intel architecture, from floating point behaviour to page size, should be emulated completely by Rosetta 2. See https://developer.apple.com/videos/play/wwdc2020/10214/ for more details

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Apple Developer Transition Kit
« Reply #13 on: July 19, 2020, 09:49:11 pm »
Can someone post info how to install FPC and Lazarus on Apple DTK?

I have problems with installing all tools.

1. As Chris wrote above, Command Line Tools cannot be installed, it freezes forever on "Finding software" window.

2. I can't install SVN. Because brew is not installed by default. I tried to manually download brew and install it, but it doesn't work correctly.
Another option - MacPorts says that my macOS is not Catalina and exits.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: Apple Developer Transition Kit
« Reply #14 on: July 19, 2020, 09:59:27 pm »
Can someone post info how to install FPC and Lazarus on Apple DTK?

I have problems with installing all tools.

1. As Chris wrote above, Command Line Tools cannot be installed, it freezes forever on "Finding software" window.
See the installation instructions I lined at https://forum.lazarus.freepascal.org/index.php/topic,50187.msg369996.html#msg369996, including the warnings near the bottom.

Quote
2. I can't install SVN. Because brew is not installed by default. I tried to manually download brew and install it, but it doesn't work correctly.
Another option - MacPorts says that my macOS is not Catalina and exits.
The easiest option is to use the git mirror: https://github.com/graemeg/freepascal

 

TinyPortal © 2005-2018