Project

General

Profile

Bug #663

strongswan won't build with json-c 0.12

Added by Pavel Šimerda about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Category:
build
Target version:
Start date:
30.07.2014
Due date:
Estimated time:
Affected version:
5.2.0
Resolution:
Fixed

Description

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.

strongswan-5.2.0-json.patch (1.92 KB) strongswan-5.2.0-json.patch Pavel Šimerda, 30.07.2014 08:19

Associated revisions

Revision fafed376 (diff)
Added by Tobias Brunner about 6 years ago

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.

Fixes #663.

History

#1 Updated by Tobias Brunner about 6 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-c2 and 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.

#2 Updated by Pavel Šimerda about 6 years ago

Thanks, your fix looks perfect, will remove the patch with the next strongswan release.

#3 Updated by Pavel Šimerda about 6 years ago

Just switched Fedora to the upstream patch because it also works for EPEL6. Great job.

http://pkgs.fedoraproject.org/cgit/strongswan.git/commit/?id=efc1948dca96b0ec128959dc156db7324142ec08

Also available in: Atom PDF