The readme and the wiki says that jannson >= 2.3 is required.
But trying 2.3 (openSUSE 13.1 ships only 2.3.1) it does not compile.
First error: Invalid conversion from const json_t* to json_t*
In src/network/http.cpp args->request.body = json_deep_copy(request->body);
Jansson 2.3 only supports json_deep_copy(json_t*).
This only works with jansson >= 2.5 (or a const_cast).
Invalid conversion from const json_t* to json_t*
args->request.body = json_deep_copy(request->body);
src/interface/Theme.cpp:379:102: error: 'json_boolean' was not declared in this scope json_object_set_new(jsonTheme, "useLightsRide", json_boolean(Flags & UITHEME_FLAG_USE_LIGHTS_RIDE));
json_boolean first appeared in 2.4.
So either 2.4 is required with a const_cast addressing issue 1, e.g.
#if JANSSON_VERSION_HEX < 0x020500
args->request.body = json_deep_copy(const_cast<json_t*>(request->body));
Or 2.5 or later is required (no changes).
@susnux thanks for you report. Do you want to fix it for 2.4? If not, I'll up the required version to 2.5.
On second thought, I'll just update the version to 2.5.
I only lowered it because we used to use 2.7, which introduced a macro json_boolean_value was used and it turned out it was an easy fix, which allowed me to use Ubuntu 14.04's package, which was either at 2.5 or 2.6.
Since then we've moved to building on 16.04 using docker. Arch jobs also have much more recent jansson version.
Fix #5050 Increase required jansson version to 2.5
Yes I also think this is the best solution since I can not make sure it will work 100% with 2.4.
@susnux are you by any chance handling https://build.opensuse.org/package/show/games/openrct2 ?
Regarding chosen solution: we do intend to use progressively more of modern C++'s features and supporting old platforms comes at a cost to maintenance. Isn't openSUSE 13.1 obsolete by now? I thought it was at ~42 as of these days.
Yes I am an openSUSE:games maintainer, 0.0.5 is on its way into the openSUSE repositories ;-)
And yes 13.1 is quite old, but there are still some users (LTS version) so I always try to get packages run on as much versions as possible, if not (as in this case) then not, but I do my best.
@susnux nice. Most of our users are expected to be running a current version of develop, we continuously push fresh builds to https://openrct2.org/downloads. They are, as already mentioned, built on Ubuntu 16.04. Can you comment on their ABI compatibility with openSUSE 42?
We have a semi-supported PPA for deb-based systems and Arch (my distro) has https://aur.archlinux.org/packages/openrct2-git. Any chance of having similar package for your system?