0
votes

I am trying to compile free pascal sources for iOS on a mac, used the trunk of both lazarus and fpc from fpcupdeluxe and then installed the AArch64 darwin crosscompiler once again using fpcupdeluxe. Managed to compile x86_64 darwin fine but when I changed the target architecture to AArch64 darwin(or x86_64 isim) in lazarus and pressed OK it gave me the error: The project uses target OS=darwin and CPU=aarch64. The system.ppu for this target was not found in the FPC binary directories. Make sure fpc is installed correctly for this target and the fpc.cfg contains the right directories.

Base OS: MacOS Catalina 10.15.4 Target architecture: AArch64 Target OS: Darwin Release v1.6.8k of fpcupdeluxe-x86_64-darwin-cocoa.zip

I got the same error when I try compiling for arm darwin too. How can I go about solving this? Any help is much appreciated

1

1 Answers

1
votes

You could follow hardest but safest way - compile compiler from source. Error you ar geting means that either run time library do not exist or it cannot be find in regular places fpc is looking for it.

If you wish to compile it from source, then download source, put in separate folder, cd to compiler and run make clean, make all and make install. Check where is your fpc installed (which fpc), locate units folders (locate system.ppu). Mine is in /usr/local/lib/fpc/3.0.4/units. Inside this folder you shoud have subfolder for each architecture and system.ppu should be there in order to cross compile.

There is a readme.txt document in compiler folder with more detailed info, also there was user guide on freepascal documentation site explaining this in more detail. As far as I remeber, only thing I had to do to use new compiled version was to copy unit folder from source folder (where make put it) to /usr/local/lib/fpc/3.0.4/units.

I remeber that there were some glitches on os x, but please do not hesitate to ask if you have problems with compiling from source, I am sure there is plenty of people here which did it and can help ...