You are not logged in.
[English]
Hi everyone / Arnaud,
I am trying to cross-compile a mORMot 2 server for Linux natively, using Delphi's Linux compiler (LLVM). However, I immediately hit hundreds of errors related to unsupported inline ASM (e.g., ReadBarrier missing PUREPASCAL check) and missing RTL functions (like GetTickCount64 in mormot.core.base.pas).
Trying to patch all these #IFDEFs and libc calls manually feels like I would need to modify half the framework.
My question is straightforward: Is there a supported/configured way to compile mORMot 2 for Linux strictly using the Delphi Linux compiler? Or is the framework architecture for Linux exclusively designed to be compiled via Free Pascal (or Delphi Win64 + Wine)?
Thank you very much!
[Français]
Bonjour à tous / Arnaud,
J'essaie de compiler (cross-compile) un serveur mORMot 2 pour Linux en utilisant le compilateur Linux natif de Delphi (LLVM). Cependant, je rencontre immédiatement des centaines d'erreurs liées à l'ASM non supporté (ex: ReadBarrier sans vérification PUREPASCAL) et aux fonctions RTL manquantes (comme GetTickCount64 dans mormot.core.base.pas).
Essayer de patcher manuellement tous ces #IFDEF et appels libc reviendrait presque à modifier la moitié du framework.
Ma question est simple : Existe-t-il une méthode supportée pour compiler mORMot 2 pour Linux exclusivement avec le compilateur Linux de Delphi ? Ou bien l'architecture du framework pour Linux est-elle exclusivement pensée pour être compilée via Free Pascal (ou Delphi Win64 + Wine) ?
Merci beaucoup !
[Español]
Hola a todos / Arnaud,
Estoy intentando compilar de forma cruzada un servidor mORMot 2 para Linux de forma nativa, utilizando el compilador de Delphi para Linux (LLVM). Sin embargo, inmediatamente me topo con cientos de errores relacionados con ASM no soportado (ej. ReadBarrier sin chequeo de PUREPASCAL) y funciones RTL faltantes (como GetTickCount64 en mormot.core.base.pas).
Intentar parchear manualmente todos estos #IFDEF y llamadas a libc se siente como si tuviera que modificar medio framework.
Mi pregunta es directa: ¿Existe alguna forma soportada/configurada de compilar mORMot 2 para Linux usando estrictamente el compilador de Delphi para Linux? ¿O la arquitectura del framework para Linux está diseñada exclusivamente para ser compilada mediante Free Pascal (o Delphi Win64 + Wine)?
¡Muchas gracias!
Offline
So it looks like this topic is still up to date:
Offline
Will Delphi for Linux support still be considered in the roadmap?
Surely we could use FPC for new projects. But a lot of people like me are trying to migrate the old Windows project to Linux, a total rewrite in FPC is often not practical. To be honst, I have used a lot of 3rd party libraries in my project, but for now mORMot is the last 3rd party library that does not support Delphi for Linux. I have to write a adapter to use mORMot and Indy version of HTTP Server.
Offline
[English]
Hi Arnaud and everyone,
Thank you for the follow-up. To answer your question: Yes, I am very satisfied with Delphi's Linux compiler in terms of stability and ease of deployment for our microservices. It works great and fits perfectly into our cross-platform workflow.
However, my challenge is strictly with mORMot 2. I am a huge fan of your work, especially the JSON parser—its speed is legendary, and the memory management is so clean that I never worry about leaks or fragmentation. It’s easily the best in the Pascal world.
I really wanted to use mORMot 2’s JSON engine in my Linux native projects, but when I tried to compile it with Delphi (LLVM), I hit a wall of ASM errors and missing RTL defines. I started patching it manually, but I realized it would take me months to port the whole framework. As a result, I’m sticking with SynCrossPlatformJSON.pas from version 1.18, because compiling mORMot 2 natively with Delphi for Linux currently feels like an impossible task.
I’d love to see mORMot 2 become more 'Delphi-Linux friendly', but for now, I’ll keep using your excellent 1.18 cross-platform units!"
[Español]
"Hola Arnaud,
Para responder a tu pregunta: Sí, estoy muy contento con la compatibilidad de Delphi para Linux. El rendimiento y la estabilidad son geniales para lo que hacemos.
Mi problema es específicamente con mORMot 2. Soy un gran admirador de tu parser JSON; la velocidad es increíble y lo mejor es que no tiene fugas ni fragmentación de memoria, algo vital para nosotros. Quise portar mORMot 2 a mis proyectos de Delphi Linux, pero me encontré con cientos de errores de ASM e IFDEFs faltantes. Intenté cambiarlo a mano, pero es una tarea titánica. Por ahora, me quedo con la unidad SynCrossPlatformJSON.pas de la versión 1.18, porque mORMot 2 con el compilador cruzado de Delphi es casi imposible de compilar.
¡Ojalá en el futuro sea más compatible, porque tus librerías son las mejores!"
[Français]
"Bonjour Arnaud,
Pour répondre à votre question : Oui, je suis très satisfait de Delphi pour Linux. La stabilité et les performances sont au rendez-vous pour nos serveurs.
Cependant, mon problème concerne uniquement mORMot 2. Je suis impressionné par la vitesse de votre parser JSON, c'est du grand art, sans aucune fuite ni fragmentation de mémoire. J'ai tenté de compiler mORMot 2 nativement avec Delphi (LLVM) pour Linux, mais les erreurs d'ASM et les dépendances RTL rendent la tâche impossible sans y passer des mois. C'est pourquoi je continue d'utiliser SynCrossPlatformJSON.pas de la version 1.18.
Votre travail est exceptionnel, et j'espère qu'un jour mORMot 2 sera plus accessible pour le compilateur Linux de Delphi
Offline
So did I. Most of the code just work after changing platforms, except for the parts relying on Windows unit. For us, performance is already good enough; compatibility is our main concern.
Offline