Ticket #11379 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

JsonCPP is included in a non-portable way

Reported by: Harry Jeffery Owned by: Harry Jeffery
Priority: minor Milestone: Release 3.4
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Martyn Gigg

Description

This is a small problem I located when attempting to build Mantid on Arch Linux.

The JsonCPP library is meant to be included like #include <json/json.h>, not #include <jsoncpp/json/json.h>. See: https://github.com/open-source-parsers/jsoncpp/wiki#code-example

The upstream developers intend for it to exist (on unix-like systems) at /usr/include/json, but to prevent naming conflicts many (but not all) systems instead place it in /usr/include/jsoncpp/json. This causes potential portability issues. The currently supported unix-like systems (i.e. RHEL6, OSX, Ubuntu, Fedora) all place it in /usr/include/jsoncpp/json, but other distributions such as Arch Linux do not.

This ticket is to:

  • Update Mantid's usage to be more portable
  • Update the CMake configuration to automatically locate and provide the headers, wherever they are on a system

Change History

comment:1 Changed 6 years ago by Harry Jeffery

  • Status changed from new to inprogress

comment:2 Changed 6 years ago by Harry Jeffery

Refs #11379 Include JsonCPP in a portable way

Changeset: c2e5fdfaa58fb3e91e0bf7a507e21588b04c9b96

comment:3 Changed 6 years ago by Harry Jeffery

Refs #11379 Ensure incremental builds succeed

Changeset: fe6870c78ad8b851960290af2367a4892999469c

comment:4 Changed 6 years ago by Harry Jeffery

  • Status changed from inprogress to verify
  • Resolution set to fixed

This is being verified as pull request #410.

comment:5 Changed 6 years ago by Harry Jeffery

Refs #11379 Force JsonCPP to be refound, temporarily

Changeset: 0396a1ad1fca0569b066dbc3edb432323744f15f

comment:6 Changed 6 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:7 Changed 6 years ago by Martyn Gigg

The changes look sensible and all the builds are happy. I have created http://trac.mantidproject.org/mantid/ticket/11411 as a reminder to remove the workaround in FindJson.cmake

comment:8 Changed 6 years ago by Harry Jeffery

Refs #11379 Include JsonCPP in a portable way

Changeset: c2e5fdfaa58fb3e91e0bf7a507e21588b04c9b96

comment:9 Changed 6 years ago by Harry Jeffery

Refs #11379 Ensure incremental builds succeed

Changeset: fe6870c78ad8b851960290af2367a4892999469c

comment:10 Changed 6 years ago by Harry Jeffery

Refs #11379 Force JsonCPP to be refound, temporarily

Changeset: 0396a1ad1fca0569b066dbc3edb432323744f15f

comment:11 Changed 6 years ago by Martyn Gigg

  • Status changed from verifying to closed

Merge pull request #410 from mantidproject/11379_include_jsoncpp_in_a_portable_way

Include jsoncpp in a more portable way

Full changeset: 69f140cc34fa6f36ed9d068c15340d6757891773

comment:12 Changed 5 years ago by Nick Draper

Somehow these slipped through without a resolution. Set to Fixed.

comment:13 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 12218

Note: See TracTickets for help on using tickets.