#1 2023-03-13 10:36:25

rdevine
Member
Registered: 2014-02-20
Posts: 45

Linux FPC setup

I've got an interface-based service that works perfectly well on Windows but gives me a 406 "failed parsing ... from input JSON" on Linux (x64 Fedora and CentOS). The JSON received at the server looks identical on both platforms so it's a puzzle. Anyway, before digging in further, just to confirm the recommended FPC version for mORMot 2 - is it still "fixes-3.2" in fpcupdeluxe or is 3.4 ok? Also, I see that a few users are using the cross-compiler - anyone using the x64 cross-compiler for Linux from Windows? So far I've been building on a Fedora VM rather than cross-compiling.

Thanks, Bob

Offline

#2 2023-03-13 11:00:21

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,316
Website

Re: Linux FPC setup

FPC fixes-3.2 seems fine.
Also ensure you got the latest https://github.com/synopse/mORMot2/commit/8d3dc2b2 fix.

About cross-compilers, check the fpcupdeluxe github - sometimes you need to refresh your setup.

Also consider using WSL on Windows instead of a VM.
It is just fine for compiling and running console test apps or server apps.

Offline

#3 2023-03-13 11:10:12

rdevine
Member
Registered: 2014-02-20
Posts: 45

Re: Linux FPC setup

Ok thanks - I pulled that fix but still have the problem. Will investigate....

Offline

#4 2023-03-13 13:35:40

rdevine
Member
Registered: 2014-02-20
Posts: 45

Re: Linux FPC setup

Sorry - my bad - I'd completely missed the fact that I need to register my record type using Rtti.RegisterFromText in FPC.

Cheers, Bob

Last edited by rdevine (2023-03-13 15:15:10)

Offline

#5 2023-03-13 15:14:26

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,316
Website

Re: Linux FPC setup

No '[' seems not a problem because it is not expected as such IIRC in the JSON unserialization routine.

Offline

Board footer

Powered by FluxBB