Lazarus
Programming => Operating Systems => macOS / Mac OS X => Topic started by: Igor Kokarev on November 13, 2020, 01:01:09 pm
-
Hi,
I just upgraded macOS Catalina to final macOS Big Sur 11.0.1
with Xcode 12.2 for Intel iMac.
Lazarus 2.0.10 (Cocoa) and FPC 3.2.0 work fine on first glance.
P.S. The only issue I found - no Subversion in Big Sur and Xcode. Brew couldn't install SVN on Big Sur.
-
I favor fink and macports over homebrew. Have a look into them. They act on separate directories and leave /usr/local alone. I expect macports to be there with svn in short time. fink might take a bit longer.
-
I cannot rebuild fpc stable in fpcupdeluxe:
/Users/ring/fpcupdeluxe/fpcbootstrap/ppcx64 -Ur -Xs -O2 -n -Fux86_64 -Fusystems -Fu/Users/ring/fpcupdeluxe/fpcsrc/rtl/units/x86_64-darwin -Fix86_64 -FEx86_64/bin/x86_64-darwin -FUx86_64/units/x86_64-darwin -dRELEASE -WM10.8 -Sg -vw-n-h-l-d-u-t-p-c- -dREVINC -dx86_64 -dGDB -dBROWSERLOG -Fux86 -Fix86 pp.pas
ld: library not found for -lc
-
I just upgraded macOS Catalina to final macOS Big Sur 11.0.1
[...]
P.S. The only issue I found - no Subversion in Big Sur and Xcode. Brew couldn't install SVN on Big Sur.
As I think Jonas pointed out to me, there is no svn in Catalina either (it may remain after an upgrade from Mojave which caught me out - svn was not included in Xcode 11.4 onwards). You can, however, use git for FPC + Lazarus repositories.
-
..... You can, however, use git for FPC + Lazarus repositories.
That would be at https://github.com/graemeg
But they are only trunk. I tend to develop with trunk but do my releases with the latest official release. If Apple users (other than me, I still use Sierra) cannot get Lazarus release or fixes source, we'll need to do something .....
Davo
-
Lazarus release installs come with source. FPC release source is a required download available as an archive. Not sure about fixes as I've never used it. I mostly use trunk for FPC + Lazarus.
-
> Lazarus release installs come with source.
Good, I did not know that, I just use SVN
> FPC release source is a required download available as an archive.
Maybe not an issue as FPC release cycle is a lot slower.
> Not sure about fixes as I've never used it. I mostly use trunk for FPC + Lazarus.
Well, fixes is, effectively, the on going beta of next release. So, pretty important that it be tested in real life situations.
I could get really, really controversial and raise the on going topic of moving to git .....
(he ducks his head quickly.)
Davo
-
Two observations about Big Sur and Lazarus:
1. Lazarus 2.0 fixes branch can't be compiled itself on Apple Silicon (DTK or M1) for aarch64 using FPC 3.2.1 (fixes tree).
Lazarus Trunk can be successfully compiled with FPC 3.3.1 Trunk. So I think that Lazarus Trunk has some corrections for Apple Silicon.
If you plan to compile future Lazarus 2.0.11 for Apple Silicon it necessary to add some corrections.
2. On any Mac with Big Sur. I downloaded Lazarus 2.0 fixes branch from SVN on Intel Mac. Then I zipped sources folder, copy to Windows PC via Dropbox, and then copied ZIP archive to another iMac Intel by local network. Unpacked ZIP. Unpacked Lazarus sources compiled correctly with FPC 3.2.1 fixes branch, but it cannot be launched - macOS says in Terminal that I have no rights to run lazarus (a long message), startlazarus or lazbuild. Even with chmod +x ...
I tried two times to recompile Lazarus.
Then I downloaded again Lazarus 2.0 fixes branch sources via git on this iMac, compiled with the same FPC 3.2.1 fixes, and now everything runs correctly, even without any call of chmod +x ...
So it seems that macOS quarantines downloaded sources and marks app bundles as untrusted. I have no idea why it happens. I have a guess that if re-create APP bundles of Lazarus manually it will solve this strange problem.
-
You may need to grant various things "Full Disk Access" in the Preferences > Security & Privacy - Privacy tab in Big Sur - at least that was my experience during the betas when copying executable files/apps from elsewhere.
-
Two observations about Big Sur and Lazarus:
1. Lazarus 2.0 fixes branch can't be compiled itself on Apple Silicon (DTK or M1) for aarch64 using FPC 3.2.1 (fixes tree).
Lazarus Trunk can be successfully compiled with FPC 3.3.1 Trunk. So I think that Lazarus Trunk has some corrections for Apple Silicon.
If you plan to compile future Lazarus 2.0.11 for Apple Silicon it necessary to add some corrections.
2. On any Mac with Big Sur. I downloaded Lazarus 2.0 fixes branch from SVN on Intel Mac. Then I zipped sources folder, copy to Windows PC via Dropbox, and then copied ZIP archive to another iMac Intel by local network. Unpacked ZIP. Unpacked Lazarus sources compiled correctly with FPC 3.2.1 fixes branch, but it cannot be launched - macOS says in Terminal that I have no rights to run lazarus (a long message), startlazarus or lazbuild. Even with chmod +x ...
I tried two times to recompile Lazarus.
Then I downloaded again Lazarus 2.0 fixes branch sources via git on this iMac, compiled with the same FPC 3.2.1 fixes, and now everything runs correctly, even without any call of chmod +x ...
So it seems that macOS quarantines downloaded sources and marks app bundles as untrusted. I have no idea why it happens. I have a guess that if re-create APP bundles of Lazarus manually it will solve this strange problem.
How did you compile on ASi? Did you build FPC on the ASi mac first or cross compile?
-
How did you compile on ASi? Did you build FPC on the ASi mac first or cross compile?
1. Install Xcode on either ASi or Intel macOS
2. Install fpc 3.2.0 official release
3. follow the steps given on the wiki page (https://wiki.freepascal.org/macOS_Big_Sur_changes_for_developers#ARM64.2FAArch64.2FAppleSilicon_Support)
-
How did you compile on ASi? Did you build FPC on the ASi mac first or cross compile?
1. Install Xcode on either ASi or Intel macOS
2. Install fpc 3.2.0 official release
3. follow the steps given on the wiki page (https://wiki.freepascal.org/macOS_Big_Sur_changes_for_developers#ARM64.2FAArch64.2FAppleSilicon_Support)
I should have looked at the Big Sur wiki page! Fantastic work that this happened so quickly!
Edit: Running into some issues compiling Lazarus on ASi. Tried running:
make LCL_PLATFORM=cocoa CPU_TARGET=aarch64 bigide
Which then ends up producing the following error
lib/aarch64-darwin/cocoa/tatextelements.s:543:9: error: invalid operand for instruction
add x0,w0,w0,lsr #63
^
lib/aarch64-darwin/cocoa/tatextelements.s:544:9: error: invalid operand for instruction
asr w0,x0,#1
^
lib/aarch64-darwin/cocoa/tatextelements.s:546:9: error: invalid operand for instruction
add x1,w1,w1,lsr #63
^
lib/aarch64-darwin/cocoa/tatextelements.s:547:9: error: invalid operand for instruction
asr w1,x1,#1
^
lib/aarch64-darwin/cocoa/tatextelements.s:3832:9: error: invalid operand for instruction
add x0,w0,w0,lsr #63
^
lib/aarch64-darwin/cocoa/tatextelements.s:3833:9: error: invalid operand for instruction
asr w1,x0,#1
^
lib/aarch64-darwin/cocoa/tatextelements.s:3835:9: error: invalid operand for instruction
add x0,w0,w0,lsr #63
^
lib/aarch64-darwin/cocoa/tatextelements.s:3836:9: error: invalid operand for instruction
asr w0,x0,#1
^
lib/aarch64-darwin/cocoa/tatextelements.s:3934:9: error: invalid operand for instruction
add x0,w0,w0,lsr #63
^
lib/aarch64-darwin/cocoa/tatextelements.s:3935:9: error: invalid operand for instruction
asr w1,x0,#1
^
lib/aarch64-darwin/cocoa/tatextelements.s:3937:9: error: invalid operand for instruction
add x0,w0,w0,lsr #63
^
lib/aarch64-darwin/cocoa/tatextelements.s:3938:9: error: invalid operand for instruction
asr w0,x0,#1
^
make[2]: *** [tachartlazaruspkg.ppu] Error 1
make[1]: *** [bigide] Error 2
make: *** [bigidecomponents] Error 2
Build Log: https://gist.github.com/adderthorn/ac93eb4bf53fddb7d7c0406e257a0b61
Is this something I made a mistake on during compilation?
-
If you install Big Sur on a new Mac or another SSD drive. At the end of installation Big Sur will offer you import settings from your old Mac (or old SSD drive).
It really works great, macOS copied all my settings, home directory, files, Lazarus, FPC, codesign certificates, etc. I've got exact copy of my previous macOS installation. No need to configure macOS from a scratch.
I tried this approach on two Macs (Intel > Intel). I had large SSD drive. With Disk Utility I created a second partition for Big Sur. After the installation macOS copied all settings/files from Catalina. And now I have two installations of macOS - Big Sur and old Catalina. So I can test apps in old Catalina and use new Big Sur on the same Mac.
I didn't test copying from Intel to Apple M1.