{$ifdef CPUX64}
LIB_CRYPTO = 'libssl-merged-osx64.dylib';
LIB_SSL = 'libssl-merged-osx64.dylib';
_PU = '_';
{$endif CPUX64}
{$ifdef CPUX64_static}
LIB_CRYPTO = 'libcrypto-osx64.a';
LIB_SSL = 'libssl-osx64.a';
_PU = '';
{$define OPENSSLSTATIC}
{$endif CPUX64}
{$ifdef CPUAARCH64}
LIB_CRYPTO = 'libssl-merged-osx64.dylib';
LIB_SSL = 'libssl-merged-osx64.dylib';
_PU = '_';
{$endif CPUAARCH64}
{$ifdef CPUAARCH64_static}
LIB_CRYPTO = 'libcrypto-osx64.a';
LIB_SSL = 'libssl-osx64.a';
_PU = '';
{$define OPENSSLSTATIC}
{$endif CPUAARCH64}
The compile of the tests project fails since CPUAARCH64 isn't allowed for in the code.
]]>fpcupdeluxe: info: mORMot2Installer (GetModule: mORMot2): Going to download 2.0.181 of mormot sqlite3 static libs [mormot2static.7z] from https://github.com/synopse/mORMot2/releases/download/2.0.181/mormot2static.7z
Download progress FPCUPTMP00000.7z: starting.
Download progress FPCUPTMP00000.7z: Starting download.
Download progress FPCUPTMP00000.7z: download ready !
fpcupdeluxe: info: mORMot2Installer (GetModule: mORMot2): Download ok. Extracting files. Please wait.
fpcupdeluxe: WARNING: mORMot2Installer (GetModule: mORMot2): Unpack of /Users/scott/fpcupdeluxe/tmp/FPCUPTMP00000.7z failed with resultcode: -1
fpcupdeluxe: info: mORMot2Installer (GetModule: mORMot2): Getting mORMot2 (statics) failure. Will continue anyhow.
Manually running ./get_latest_static.sh works properly, assuming you've used homebrew to install p7zip package to give you the 7za command. This is the kind of thing that needs to go in an installation guide.
]]>Note that AARCH64 armv8.o is now only validated on Linux. It would not try to use it any more on Mac M1.
https://github.com/synopse/mORMot2/commit/abdc3eb2 and
https://github.com/synopse/mORMot2/commit/2e19dfcdAnd aarch64-darwin target is not supported yet in the static folder.
But if you use the system SQLite3 library (.so) it may work.
I don't have access to any M1 system, so I can't say how much...
Okay, then that means that the packages can't be installed into Lazarus since that requires static build, correct? I'm a bit uncertain as to how to change to using .so if it's allowed.
EDIT: Okay, I've looked at the commits. I'll see if I can figure out how to pull latest mORMot and build on M1. In the meantime I have it running on AARCH64 Linux on my Oracle Cloud Ampere VM - it's a little slower with only 2 cores and doesn't have access to the DB servers here in-house, but with 12 GB of RAM I can install Postgresql or MariaDB or whatever and tinker with it there locally, or with just plain SQLite itself, of course.
]]>And aarch64-darwin target is not supported yet in the static folder.
But if you use the system SQLite3 library (.so) it may work.
I don't have access to any M1 system, so I can't say how much...
but the lists of FPC and Lazarus version numbers are invisible or incompletely populated
This is probably due to the fact that fpcupdeluxe is not able to create some initial settings files. Create a folder somewhere (desktop) and please move fpcupdeluxe to this directory of your choice. The same is needed on Apple (when fpcupdeluxe is run from the Download folder).
That appears to be part of the problem, thanks. I had it in /usr/local/bin and moved it into my home directory - after that the error went away. One issue down, more to go.
FPC and Lazarus both build and install, and mORMot2 and mORMot2ui packages build and install into Lazarus...which is more than they do on M1 macOS 12. For some reason, the install of mORMot2ui into Lazarus on M1 macOS fails looking for the aarch64-linux version of armv8.o. Even if I download latest static libs, there is no aarch64-darwin directory in it.
]]>but the lists of FPC and Lazarus version numbers are invisible or incompletely populated
This is probably due to the fact that fpcupdeluxe is not able to create some initial settings files. Create a folder somewhere (desktop) and please move fpcupdeluxe to this directory of your choice. The same is needed on Apple (when fpcupdeluxe is run from the Download folder).
]]>The documentation is very comprehensive from a design standpoint, but it appears to be a miss that there isn't an installation guide. My apologies if that offends. My "day job" is as a consultant/systems engineer installing, upgrading, and troubleshooting ERP systems, and I'm used to digging through documentation to find THOSE documents, so that's where I'm coming from. I've done quite a bit of development in the past, but it's also quite a while in the past, so I'm a bit rusty.
If I'm missing the information stashed somewhere on the site, in the forums, in documents, wherever, just let me know and I'll go dig them up - I just haven't found them so far.
]]>You are right, Oracle closed my "perpetual free account" after a few weeks.
So I don't have acess to the Ampere machine any more.We could ask Alfred from Mac M1 support with fpcupdeluxe.
I guess the included NDK cross compiler toolchain could be used to build SQLite3 static libraries, as we do for Darwin Intel i386/x86_64.I need to setup my Raspberry Pi 4 again, and try to fix the regressions in Linux Aarch64.
But was very pleased with the Ampere CPU, and found FPC good enough to start serious work on ARM.Therefore your feedback is very welcome!
It would be worth trying to re-create your Oracle account - I currently have two Ampere VMs running with 2 cores and 12 GB RAM each - they're quite performant! I haven't been able to use fpcupdeluxe on them yet to build a working environment - I get a access violation that I can continue execution past, but the lists of FPC and Lazarus version numbers are invisible or incompletely populated. I also run an M1 Mac Mini as my everyday machine and I DO have it built there and working quite well.
If I can be of assistance, let me know!
Scott
]]>First, I compiled the newest sqlite3 3.37.2 and the installation worked without any problem. Then I thought, maybe compiling the static libraries works as well. I could compile armv8.c from the res directory. This made building the mormot2 package possible.
Compiling the sqlite3 library was a little trickier. I had to patch the amalgamation file on Linux since „sed“ works a little different on MacOS.
To make a long story short, I could compile and run the mormot tests with static libraries.
I had to disable a couple of tests which froze but it is a good start. https://gist.github.com/martin-doyle/0f … e9dacdc252
A first issue I found was a segmentation fault when creating the BloomFilter. ln(fFalsePositivePercent / 100) crashes. ln(0.01) works just fine. I created a little fpc test program in order to see if it is a fpc, type whatever issue. But no problem here - ln seems to work as expected but behaves strangely within the Create method of Bloomfilter.
]]>So I guess https://github.com/synopse/mORMot2/commit/04050181 would do the trick for AARCH64.
It may enhance a little bit the parsing performance, too.
Thanks for the feedback.
]]>All greens now on Linux AArch64 with FPC trunk. Very good !
However, a small workaround for the FPC source parser was needed.
In function GetJsonField, a label (lit) is used for a goto. This results in code errors on AArch64.
If the label is removed, all is ok and 100% error free mORMot2 can be enjoyed.