[ 
https://issues.apache.org/jira/browse/MESOS-3909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15047595#comment-15047595
 ] 

James Peach commented on MESOS-3909:
------------------------------------

There are a number of solutions to this that I can see

1. Move the picojson dependencies into a .cpp file in stout

stout is supposed to be a header-only library, and this would undo that. I'm 
not sure of the history of why stout needs to be header-only, but maybe this 
restriction can be loosened.

2. Copy the picojson dependencies into a .cpp in libmesos

This works since picojson is just an internal dependency of Mesos. It needs a 
little ifdef hackery and it might be tricky to avoid copying the relevant 
picojson code, so maintainability is a question. 

3. Install picojson.h

We would need to install picojson.h as <stout/picojson.h> and adjust Mesos 
include paths appropriately. Using an unbundled picojson would no longer work 
(though it probably doesn't work right today).

4. Do nothing

You can't build a Mesos isolator without fishing in the Mesos code for 
picojson.h. This seems undesirable since it makes release engineering of 
isolator modules harder.

> isolator module headers depend on picojson headers
> --------------------------------------------------
>
>                 Key: MESOS-3909
>                 URL: https://issues.apache.org/jira/browse/MESOS-3909
>             Project: Mesos
>          Issue Type: Bug
>          Components: c++ api, modules
>            Reporter: James Peach
>            Assignee: James Peach
>
> When trying to build an isolator module, stout headers end up depending on 
> {{picojson.hpp}} which is not installed.
> {code}
> In file included from /opt/mesos/include/mesos/module/isolator.hpp:25:
> In file included from /opt/mesos/include/mesos/slave/isolator.hpp:30:
> In file included from /opt/mesos/include/process/dispatch.hpp:22:
> In file included from /opt/mesos/include/process/process.hpp:26:
> In file included from /opt/mesos/include/process/event.hpp:21:
> In file included from /opt/mesos/include/process/http.hpp:39:
> /opt/mesos/include/stout/json.hpp:23:10: fatal error: 'picojson.h' file not 
> found
> #include <picojson.h>
>          ^
> 8 warnings and 1 error generated.
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to