About five years ago I put together a useful little Lazarus/LCL-based app which could collect data from a cheap oscilloscope, display it, apply an FFT and so on. I left it in this state:
Anybody who wants a copy is welcome, but I'm not sticking it onto Github yet. The issue is that the project can use dynamic linkage between the frontend (generic) and backend (device-specific) parts, and while the frontend could call the backend I was having problems with calls from the backend to frontend. The worrying thing is that it worked properly with 32-bit code (on a 64-bit Linux system with multiarch, FPC 3.0.4) but not with 64-bit code, and when I last looked at this I got bemired a long way into the runtimes and standard libraries.
I've just put a solid few days work into it, with a view to writing more instrument-specific backends, which has uncovered something "interesting".
The overall programming and in particular linkage style is something I used for a MIDI-filter program 10+ years ago, which worked sufficiently reliably that it was- as an example- able to pick up a recompiled backend on-the-fly. However at the time everything was 32-bit...
The main part of the app ("frontend") is able to call into the dynamically-linked .so library ("backend") reliably on both x86 (i386) and x86_64 (amd).
On x86, the backend can call into the frontend to recover its API magic number, display a dialog(ue) box and so on.
On x86_64, the backend cannot call into the frontend, even to recover an integer magic number.
I've now got that to a state where I can demonstrate a problem in dynlibs reliably, by asking the frontend to recover its own magic number via a dynamically-linked entry point: it works on x86, but not x86_64.
I think I remember Sven writing something about a fundamental change to the x86_64 calling conventions (relative to x86) a couple of months ago. Can anybody remind me of the detail before I concede defeat and attach a test project?
Currently using FPC 3.2.2, but was probably on 3.0 when I first became aware of the problem.
MarkMLl