strongswan won't build with json-c 0.12
I am maintaining the strongswan package for Fedora and I recently prepared a successful build of strongswan 5.2.0 using json-c-devel-0.11-8.fc22. When the json-c maintainer updated json-c to 0.12, the dependency got broken and a new build would fail. I'm attaching a patch that fixes the build for the new json-c version. I didn't check it for backwards compatibility, though.
imv-swid: Use pkg-config to check for libjson-c
The package/library is called libjson-c on recent distributions.
Some like Ubuntu 14.04 provide symlinks with the old name but these
will eventually disappear. Using pkg-config allows us to easily check
for it (with a fallback) and configure the proper compiler flags.
#1 Updated by Tobias Brunner over 7 years ago
- Tracker changed from Issue to Bug
- Category set to build
- Status changed from New to Closed
- Assignee set to Tobias Brunner
- Target version set to 5.2.1
- Resolution set to Fixed
Thanks for the report. Using
json-c works on Ubuntu 14.04 too as
libjson.so is just a symlink installed by the libjson0-dev transitional package (the actual library and headers are provided by the
libjson-c-dev packages). But it doesn't work on older releases where only
libjson.so is available.
I pushed a fix for this to master. It uses
pkg-config to determine the compiler flags, which makes it a bit easier than adding additional library/header checks and #ifdefs.
#3 Updated by Pavel Šimerda over 7 years ago
Just switched Fedora to the upstream patch because it also works for EPEL6. Great job.