Forum > macOS / Mac OS X
solution for installing Fpc and Lazarus on macOS 14+
rich2014:
because Fpc is currently incompatible with the Developer Command Line Tools on new version macOS, errors may occur when rebuilding Lazarus or building packages/apps.
after research and comparison, we found that the simplest solution is to install XCode 15 and enable the Developer Command Line Tools included in it for building. this way we don't have to modify fpc.cfg everywhere, nor do we have to set -WM10.15 everywhere, and we can build the native Aarch64 version.
the specific steps are as follows:
1. download Xcode_15.xip from Apple's official website (not Developer Command Line Tools, but Xcode)
https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_15/Xcode_15.xip
2. double-click it to unpack as Xcode.app, change its name to Xcode15.app, and copy it to /Applications (it doesn’t matter if the app icon is abnormal)
3. enable the Developer Command Line Tools in Xcode 15
--- Code: Bash [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---sudo xcode-select -s /Applications/Xcode15.appsudo xcodebuild -license
4. build Fpc and Lazarus by fpcupdeluxe https://github.com/LongDirtyAnimAlf/fpcupdeluxe.
for Fpc, fixes-3.2 or 3.3.1 recommended.
for Lazarus, trunk or fixes-4.0 recommended.
no options are required.
5. it will give you a working FPC and Lazarus. Lazarus itself can be rebuilt, packages can be installed, and Lazarus can compile and debug apps normally.
good luck.
Cascade:
:) That sounds great - thank you Rich2014!
Will give Xcode 15 a try. Is it OK to have more than one version of Xcode installed at a time? (i.e. 15 and 16)
rich2014:
yes.
multi Xcode are supported.
for Developer Command Line Tools, switch by xcode-select.
RussellM72:
Thank you!
I just used this recipe to successfully install Lazarus on macos Tahoe (26.2).
I was able to download Xcode 15 from Apple using the links on this site: https://xcodereleases.com/
Being new to Lazarus, and after I failed miserable to install Lazarus using the directions on the wiki: https://wiki.lazarus.freepascal.org/Installing_Lazarus_on_macOS
...I'm wondering why better directions aren't on the wiki. I'd make an attempt at editing it but, being new to both Lazarus and the wiki, I'm worried that I'd mess things up.
RussellM72:
Well, I went ahead and took the plunge and edited the wiki.
https://wiki.freepascal.org/Installing_Lazarus_on_macOS
I added a new section at the top titled: Installation on macOS 14+ (Sonoma (14.x), Sequoia (15.x), & Tahoe (26.x))
I can't believe how much time it took me and I'm sure it's not perfect but, I think it might help people with newer Macs to be able to install Lazarus & FPC.
Navigation
[0] Message Index
[#] Next page