Forum > macOS / Mac OS X

Trunk FPC fails to install on aarch64

(1/2) > >>

Grahame Grieve:
Trev, I've tried following the instructions on https://wiki.lazarus.freepascal.org/Installing_Lazarus_on_macOS to get Lazarus working. Unfortunately I need the trunk version of FPC to get the generics stuff to compile. And that won't install - I followed your instructions and my trunk Lazarus is working fine, but when I install the trunk FPC, I get an error

> git clone -b main https://gitlab.com/freepascal.org/fpc/source.git fpc_main

yep fine

> make distclean all FPC=/usr/local/lib/fpc/3.2.2/ppcx64 OS_TARGET=darwin CPU_TARGET=aarch64 OPT="-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/"

Yep fine, with a changed path to the latest SDK. Note that I'm on an M1 so aarch64 not x86_64

> sudo make install OS_TARGET=darwin CPU_TARGET=aarch64

fails pretty quickly with:

/Users/grahame/work/lazarus/fpc_main/utils/fpcm/bin/aarch64-darwin/fpcmake -p -Taarch64-darwin Makefile.fpc
make[3]: /Users/grahame/work/lazarus/fpc_main/utils/fpcm/bin/aarch64-darwin/fpcmake: No such file or directory
make[3]: *** [fpc_install] Error 1
make[2]: *** [rtl_distinstall] Error 2
make[1]: *** [installbase] Error 2
make: *** [installall] Error 2

/Users/grahame/work/lazarus/fpc_main/utils/fpcm exists, but it doesn't have any sub-directories. I'm not sure where to go next?

trev:

--- Quote from: Grahame Grieve on December 02, 2021, 01:27:06 pm ---> make distclean all FPC=/usr/local/lib/fpc/3.2.2/ppcx64 OS_TARGET=darwin CPU_TARGET=aarch64 OPT="-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/"

Yep fine, with a changed path to the latest SDK. Note that I'm on an M1 so aarch64 not x86_64
--- End quote ---

MacOSX.sdk should be a soft link to the latest SDK. It is on both my M1 and Intel Mac minis (M1 listing below):


--- Code: Text  [+][-]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";}};} ---trev@macmini8 [/Users/trev] $ ls -l /Library/Developer/CommandLineTools/SDKs/total 0lrwxr-xr-x  1 root  wheel   14 Oct 28 21:41 MacOSX.sdk -> MacOSX12.0.sdkdrwxr-xr-x  8 root  wheel  256 Apr 27  2021 MacOSX10.15.sdkdrwxr-xr-x  7 root  wheel  224 Oct 28 21:41 MacOSX11.3.sdklrwxr-xr-x  1 root  wheel   14 Oct 28 21:41 MacOSX11.sdk -> MacOSX11.3.sdkdrwxr-xr-x  7 root  wheel  224 Sep 18 23:12 MacOSX12.0.sdklrwxr-xr-x  1 root  wheel   14 Oct 28 21:41 MacOSX12.sdk -> MacOSX12.0.sdk

--- Quote ---> sudo make install OS_TARGET=darwin CPU_TARGET=aarch64

fails pretty quickly with:
[...]
I'm not sure where to go next?

--- End quote ---

I'll check later today when I get a moment. It may just be that the installation for the development version of FPC is currently broken for aarch64 due to recent changes.

trev:

--- Quote from: Grahame Grieve on December 02, 2021, 01:27:06 pm ---> make distclean all FPC=/usr/local/lib/fpc/3.2.2/ppcx64 OS_TARGET=darwin CPU_TARGET=aarch64 OPT="-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/"

--- End quote ---

Argh, I just noticed that you used ppcx64 instead of ppca64 in the above command line.

I retraced your steps after fixing that and it installed without issue. You must have missed the note:


--- Quote ---Note: When building a native aarch64 Free Pascal Compiler (ppca64) for an Apple Silicon M1 processor Mac, change the CPU_TARGET in the instructions below from x86_64 (Intel 64 bit) to aarch64 (ARM 64 bit - Apple Silicon M1) and change any reference to ppcx64 to ppca64
--- End quote ---

Grahame Grieve:
Sigh, that's embarrassing. I'm sorry I wasted your time with that. I did not miss the note but I only gleaned it's general intent and missed that in the command line.

Now my trunk Lazarus is complaining about not finding fppkg.cfg, and I wasn't sure about how to sort that out, but it seems to run OK without me having to sort it out. Back to working on openSSL... thanks

trev:

--- Quote from: Grahame Grieve on December 04, 2021, 08:27:41 pm ---Sigh, that's embarrassing. I'm sorry I wasted your time with that.
--- End quote ---

No worries - it happens to the best of us. I missed it the first few times I read your post.

Navigation

[0] Message Index

[#] Next page

Go to full version