Recent

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

ChrisR

  • Full Member
  • ***
  • Posts: 163
Re: Apple Developer Transition Kit
« Reply #30 on: July 21, 2020, 10:09:40 pm »
Igor,
 To test my hypothesis, see if turning on "Full Disk Access" for your "Lazarus" fixes your issue:
   https://benscheirman.com/2019/10/troubleshooting-appkit-file-permissions/
(not sure if this helps if the executable bit of files is switched on, but should help other files).

Igor Kokarev

  • Full Member
  • ***
  • Posts: 215
Re: Apple Developer Transition Kit
« Reply #31 on: July 21, 2020, 10:51:10 pm »
Chris,

I'm grateful for your advices. I'll check tomorrow.

I found a similar problem with launching of compiled apps. And I found a solution. My project sources were copied from another Mac in a ZIP. Of course, I rebuilt executable file and recreated APP bundle. But I've got exactly same error code. I deleted manually APP bundle and executable, and re-created them again. Now this APP runs correctly. It seems that macOS couldn't overwrite old executable and bundle files created on another Mac.

Does LLDB debugger work on your Apple DTK? When I run the debugger the icon of the debugger on the top toolbar in Lazarus disappears and nothing happens.

Also I couldn't set a global environment variable in /Library/LaunchAgents in a plist file. It worked fine in Catalina on x86-64 Mac. Apple DTK doesn't load custom plist with my global variable.
« Last Edit: July 21, 2020, 10:55:58 pm by Igor Kokarev »

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 941
  • Former Delphi 1-7, 10.2 User
Re: Apple Developer Transition Kit
« Reply #32 on: July 22, 2020, 07:14:27 am »
To test my hypothesis, see if turning on "Full Disk Access" for your "Lazarus" fixes your issue:
   https://benscheirman.com/2019/10/troubleshooting-appkit-file-permissions/
(not sure if this helps if the executable bit of files is switched on, but should help other files).

In Beta1 (Intel) this did not help and I had to move the project out of the Documents folder. However, in Beta2 (Intel) the lazarus executable was already listed in the Full Disk Access list and enabling it via the checkbox resolved the issue for me.
o Lazarus v2.1.0 r63871, FPC v3.3.1 r46876, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

Igor Kokarev

  • Full Member
  • ***
  • Posts: 215
Re: Apple Developer Transition Kit
« Reply #33 on: July 22, 2020, 08:01:13 am »
I solved the problem with Lazarus. I deleted a link in MacOS and copied Lazarus executable to MacOS folder of Lazarus bundle. Now it works fine.

I still can't install svn. MacPorts is not available for Big Sur. brew installed incorrectly.
I tried to manually from svn executables from /usr/bin/ on my another Mac, but this file copy operation is not permited:
sudo cp svn /usr/bin

Igor Kokarev

  • Full Member
  • ***
  • Posts: 215
Re: Apple Developer Transition Kit
« Reply #34 on: July 22, 2020, 08:23:00 am »
Lazarus from Trunk doesn't include any debugger. Tools > Settings > Debuggers shows nothing. There is no a drop down combobox with a list of available debuggers.

I tried to install manually lazdebuggerfplldh.lpk and recompile Lazarus. Nothing appeared in Debuggers list.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 941
  • Former Delphi 1-7, 10.2 User
Re: Apple Developer Transition Kit
« Reply #35 on: July 22, 2020, 08:56:31 am »
I still can't install svn. MacPorts is not available for Big Sur. brew installed incorrectly.
I tried to manually from svn executables from /usr/bin/ on my another Mac, but this file copy operation is not permited:
sudo cp svn /usr/bin

Have you tried "xcrun svn" ?
o Lazarus v2.1.0 r63871, FPC v3.3.1 r46876, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

Igor Kokarev

  • Full Member
  • ***
  • Posts: 215
Re: Apple Developer Transition Kit
« Reply #36 on: July 22, 2020, 08:59:32 am »
Quote
igor@Igors-Mac ~ % xcrun svn
xcrun: error: sh -c '/Applications/Xcode-beta.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find svn 2> /dev/null' failed with exit code 17664: (null) (errno=No such file or directory)
xcrun: error: The subversion command line tools are no longer provided by Xcode.
igor@Igors-Mac ~ %

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 757
Re: Apple Developer Transition Kit
« Reply #37 on: July 22, 2020, 11:02:09 am »
I solved the problem with Lazarus. I deleted a link in MacOS and copied Lazarus executable to MacOS folder of Lazarus bundle. Now it works fine.

I still can't install svn. MacPorts is not available for Big Sur. brew installed incorrectly.
I tried to manually from svn executables from /usr/bin/ on my another Mac, but this file copy operation is not permited:
sudo cp svn /usr/bin

/usr/bin has been read-only since OS X 10.11 due to SIP (system integrity protection). You can copy it to /usr/local/bin instead, but you will also have to copy the libraries that it links to to /usr/local/lib (you can see them with "otool -L" iirc).

Igor Kokarev

  • Full Member
  • ***
  • Posts: 215
Re: Apple Developer Transition Kit
« Reply #38 on: July 22, 2020, 02:13:26 pm »
Thanks, Jonas

Igor Kokarev

  • Full Member
  • ***
  • Posts: 215
Re: Apple Developer Transition Kit
« Reply #39 on: July 22, 2020, 03:57:54 pm »
I tested the same LCL project which loads large JPEG image on Windows PC with Intel Core i5, iMac 21.5 4K Retina with Core i5 and on Apple DTK (x86-64 compiled version and native AARCH64 version).

Performance of A12Z CPU is great. Even in Rosetta 2 emulation.
I can't publish exact values due to NDA, but I'm sure that new Macbook and iMac with ARM will be very fast for old and new apps.

Igor Kokarev

  • Full Member
  • ***
  • Posts: 215
Re: Apple Developer Transition Kit
« Reply #40 on: July 22, 2020, 07:59:31 pm »
Good news.

1. I finally compiled my app natively for ARM64. And it works!

2. Bugs in Metal 3D appear when I use O2 code optimizations. It seems that my code has some mistake with Metal calculations. I think that we'll fix it later.

3. I found LLDB debugger in Lazarus Trunk on Apple DTK.

Thanks for FPC/Lazarus team for their great work on FPC AARCH64!

ChrisR

  • Full Member
  • ***
  • Posts: 163
Re: Apple Developer Transition Kit
« Reply #41 on: July 22, 2020, 09:25:45 pm »
Igor,
  If you want to compile with code optimization, make sure you recompile fpc so that you have svn  45823, as two bugs were closed in the last two days:
  https://bugs.freepascal.org/view.php?id=37397
  https://bugs.freepascal.org/view.php?id=37393
With these latest commits, the whole IDE compiles with -O3. Hopefully, this will resolve your issue, if not it would be good to isolate the compiler issue and post a bug report. At the moment, all my Lazarus projects appear to compile and operate correctly, including all my Metal demos.


Igor Kokarev

  • Full Member
  • ***
  • Posts: 215
Re: Apple Developer Transition Kit
« Reply #42 on: July 23, 2020, 03:32:00 pm »
Chris,

Thanks, I downloaded the latest FPC + Lazarus. It didn't fix my problems, probably mistake in my code.

By the way, I found exact reason of the problem with launching of Lazarus after compilation:

Quote
LSOpenURLsWithRole() failed with error -10810 for the file /Users/igor/WnSoft/Development/lazarus/startlazarus.app.

This problem occured if I create a folder for Lazarus in external file manager (Commander One Pro) downloaded from App Store.

I started from a scratch and did all in Terminal/zsh. And now downloaded from Git and compiled Lazarus starts fine.

It seems that macOS doesn't trust to any executable files placed in a folder created in an app from App Store (sandboxed).

Igor Kokarev

  • Full Member
  • ***
  • Posts: 215
Re: Apple Developer Transition Kit
« Reply #43 on: July 23, 2020, 10:10:49 pm »
Is it possible to create Universal Binary with FPC now?

Does this technology mean that APP bundle will have doubled file size?
« Last Edit: July 23, 2020, 11:26:50 pm by Igor Kokarev »

mischi

  • Full Member
  • ***
  • Posts: 136
Re: Apple Developer Transition Kit
« Reply #44 on: July 23, 2020, 11:10:46 pm »
Is it possible to create Universal Binary with FPC now?

Do this technology mean that APP bundle will have doubled file size?
Use the command "lipo" to create universal binaries from individually created binaries. The size of the universal binary will be more or less doubled. But if your app bundle has lots of resources like images, the total size will not increase a lot.

 

TinyPortal © 2005-2018