Closed abusr closed 3 years ago
JSON is not native to C++ either, and it doesn't work well with binary data. Sure, it does encode it (if you have a library that properly escapes it), but it produces a lot of overhead and isn't very efficient. Protobuf has a more promising performance, and it can exchange both binary and text, while still offering at least some level of type-safety, and has bindings available for most major programming languages.
cmake 3.7.2 makes me believe you're using Debian Stretch, so I've used that as a reference. Looks like the line that causes your cmake problem is actually unnecessary. It does basically the same as the protobuf_generate_cpp
lines above, but instead of using the cmake builtin mechanism, it uses functions provided by protobuf. This doesn't really seem to cause an issue, but in your case it seems as if the latter is not yet available, so it fails. I have removed it now.
There was further compatibility issues with the build environment on Debian Stretch which I have cleared now, so please try again.
Thank you for the rapid response. Just pulled again from git and yes, it now builds ok. And your guess, correct. Debian stretch indeed. An old laptop with a small usbdrive linux to be used as a dedicated openwebrx server. I understand you need performance for real time packets' flows from the codecs (or ambe sticks) so json would be a lot of textual overhead and far from c++.
Cool, glad it works now. In general, I try to keep compatibility with Debian Stretch, at least until the next Debian Release (Bullseye) comes out, so feel free to report any further errors. I just hadn't gotten around to testing it there, this code is still pretty fresh.
I've opened up the Discussions section for more general conversation (i.e. things that aren't necessarily bugs).
Tried to compile digigam from src after a while and it now needs 'codecserver'. Codecserver in turn needs 'protobuf'. But this 'protobuf' thing you've selected to depend upon is hug*e. Tried to compile it from src. too, but it was going on for hours and the whole direcrory grew beyond 1.2GB so I stopped the compilation. Wouldn't using some json or equivalent suffice? What's the actual need for protobuf?
Again, if I install this protobuf ready-made from apt, now I've got another problem:.
In codecserver/src/lib/proto/CMakeLists.txt:
"protobuf_generate(TARGET codecserver_proto)"
This line yields:
Unknown CMake command "protobuf_generate"
and it breaks compilation. cmake 3.7.2 here.
How do you compile this thing????