[fpc-devel] jsonrpc - does it still work?

Michael Van Canneyt michael at freepascal.org
Fri Nov 24 22:27:20 CET 2023



On Fri, 24 Nov 2023, Joost van der Sluis via fpc-devel wrote:

> Hi all,
>
> I'm playing with json-rpc but can't get it to work.
>
> I've tried the examples in fcl-web/examles/jsonrpc. I couldn't follow
> the readme as there are no lpi-files, so that the rttirpc.lpg does not
> work. But also this fails:
>
> [joost at fed4k rtti]$ ppcx64 demorpcrtti.lpr
> Free Pascal Compiler version 3.3.1 [2023/11/23] for x86_64
> Copyright (c) 1993-2023 by Florian Klaempfl and others
> Target OS: Linux for x86-64
> Compiling demorpcrtti.lpr
> Compiling resource demorpcrtti.or
> Linking demorpcrtti
> demorpcrtti.lpr(32,1) Warning: "crtbegin.o" not found, this will
> probably cause a linking failure
> demorpcrtti.lpr(32,1) Warning: "crtend.o" not found, this will probably
> cause a linking failure
> 33 lines compiled, 0.2 sec, 1304576 bytes code, 623944 bytes data
> 2 warning(s) issued
>
> [joost at fed4k rtti]$ ppcx64 rpcclient.lpr
> Free Pascal Compiler version 3.3.1 [2023/11/23] for x86_64
> Copyright (c) 1993-2023 by Florian Klaempfl and others
> Target OS: Linux for x86-64
> Compiling rpcclient.lpr
> Linking rpcclient
> 88 lines compiled, 0.2 sec, 1166496 bytes code, 527936 bytes data
>
> [joost at fed4k rtti]$ ./demorpcrtti &
> [1] 2913859
>
> [joost at fed4k rtti]$ ./rpcclient
> ===== Testing SayHello
> An unhandled exception occurred at $00007F96D7E6A010:
> EAccessViolation: Access violation
>  $00007F96D7E6A010
>  $0000000000401A06
>
> It fails at 'client.SayHello'. The invoke-logic is never called.

I have the jsonrpc in use in various commercial applications in production, 
so yes it definitely works.

But I must admit I have not looked at the examples in a long time.

I'll have a look this weekend.

Michael.


More information about the fpc-devel mailing list