Mir

Merge lp:~robertcarr/mir/dev-package-depends-on-boost into lp:~mir-team/mir/trunk

Proposed by Robert Carr
Status: Merged
Approved by: Alan Griffiths
Approved revision: no longer in the source branch.
Merged at revision: 726
Proposed branch: lp:~robertcarr/mir/dev-package-depends-on-boost
Merge into: lp:~mir-team/mir/trunk
Diff against target: 11 lines (+1/-0)
1 file modified
debian/control (+1/-0)
To merge this branch: bzr merge lp:~robertcarr/mir/dev-package-depends-on-boost
Reviewer Review Type Date Requested Status
Alan Griffiths Approve
Alexandros Frantzis (community) Approve
Robert Ancell Needs Fixing
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+167807@code.launchpad.net

Commit message

debian/: Add boost program options to dependencies for libmirserver-dev.

Description of the change

Noticed when building in pbuilder you can't include the options headers without boost program options installed!

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

That isn't part of libboost-all-dev?!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Robert Carr (robertcarr) wrote :

libboost-all-dev is only a build dependency. In this case, the dev package has an install dependency on boost-programoptions

Revision history for this message
Robert Ancell (robert-ancell) wrote :

There's more that just program options required:

$ grep boost include/server/ -r | grep '#include'
include/server/mir/asio_main_loop.h:#include <boost/asio.hpp>
include/server/mir/compositor/buffer_swapper_spin.h:#include <boost/throw_exception.hpp>
include/server/mir/options/program_option.h:#include <boost/program_options/variables_map.hpp>
include/server/mir/options/program_option.h:#include <boost/program_options/options_description.hpp>

$ dpkg --search /usr/include/boost/asio.hpp
libboost1.53-dev: /usr/include/boost/asio.hpp
$ dpkg --search /usr/include/boost/program_options.hpp
libboost1.53-dev: /usr/include/boost/program_options.hpp
$ dpkg --search /usr/include/boost/throw_exception.hpp
libboost1.53-dev: /usr/include/boost/throw_exception.hpp

So we should probably just include libboost-dev and this will cover them all (and any future boost dependencies we add)

review: Needs Fixing
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> There's more that just program options required:
>
...
> $ dpkg --search /usr/include/boost/asio.hpp
> libboost1.53-dev: /usr/include/boost/asio.hpp

header only library => not needed by runtime.

> $ dpkg --search /usr/include/boost/program_options.hpp
> libboost1.53-dev: /usr/include/boost/program_options.hpp

covered by this MP

> $ dpkg --search /usr/include/boost/throw_exception.hpp
> libboost1.53-dev: /usr/include/boost/throw_exception.hpp

header only library => not needed by runtime.

> So we should probably just include libboost-dev and this will cover them all
> (and any future boost dependencies we add)

This MP is about runtime dependencies - we already use libboost-all-dev at build time

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

$ ldd bin/mir_demo_server | grep boost
 libboost_system.so.1.49.0 => /usr/lib/libboost_system.so.1.49.0 (0x00007f2bf9245000)
 libboost_program_options.so.1.49.0 => /usr/lib/libboost_program_options.so.1.49.0 (0x00007f2bf8fe5000)
$ ldd bin/mir_demo_client | grep boost
 libboost_system.so.1.49.0 => /usr/lib/libboost_system.so.1.49.0 (0x00007f496c745000)
$ dpkg --search libboost_system.so
libboost-system1.49.0: /usr/lib/libboost_system.so.1.49.0
libboost-system1.49-dev: /usr/lib/libboost_system.so

Do we also need to add libboost-system-dev?

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> This MP is about runtime dependencies - we already use libboost-all-dev at build time

Actually this MP is about build time dependencies of other code building against the Mir libraries. We are providing headers in our -dev packages that reference various external headers but don't require (through package dependency mechanisms) those external headers to be present.

>> $ dpkg --search /usr/include/boost/asio.hpp
>> libboost1.53-dev: /usr/include/boost/asio.hpp
>
> header only library => not needed by runtime.
>
>> $ dpkg --search /usr/include/boost/throw_exception.hpp
>> libboost1.53-dev: /usr/include/boost/throw_exception.hpp

> header only library => not needed by runtime.

...but currently needed by other code when build against Mir (e.g., if they include asio_main_loop.h).

The throw_exception dependency can easily be removed. The asio dependency can also be removed, e.g., by using Cheshire Cat.

Note that we have even more external header dependencies that are not dealt with at the moment:

$ grep -R '#include <.*h\(pp\)*>' include/shared include/server include/client

... and after some manual filtering:

include/server/mir/compositor/buffer_swapper_spin.h:#include <boost/throw_exception.hpp>
include/server/mir/options/program_option.h:#include <boost/program_options/variables_map.hpp>
include/server/mir/options/program_option.h:#include <boost/program_options/options_description.hpp>
include/server/mir/asio_main_loop.h:#include <boost/asio.hpp>
include/server/mir/graphics/drm_authenticator.h:#include <xf86drm.h>
include/server/mir/graphics/gl_renderer.h:#include <GLES2/gl2.h>
include/server/mir/graphics/internal_client.h:#include <EGL/egl.h>
include/server/mir/graphics/display_report.h:#include <EGL/egl.h>
include/shared/mir/graphics/android/android_driver_interpreter.h:#include <system/window.h>
include/shared/mir/graphics/android/mir_native_window.h:#include <system/window.h>
include/shared/mir/input/xkb_mapper.h:#include <xkbcommon/xkbcommon.h>

Our header dependencies are either headers that the users of mir libraries will need to interact with the library, or just header "leaks".

My proposal is to decide which is which, remove/hide the "leaked" header dependencies, and depend only on the -dev packages of real header dependencies.

> Do we also need to add libboost-system-dev?

It doesn't seem so. libboost-system doesn't provide any headers.

The improvements described above can be done in another MP, or this MP, I don't have a preference. This MP is fine as it is, so approving.

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> > This MP is about runtime dependencies - we already use libboost-all-dev at
> build time
>
> Actually this MP is about build time dependencies of other code building
> against the Mir libraries. We are providing headers in our -dev packages that
> reference various external headers but don't require (through package
> dependency mechanisms) those external headers to be present.
>
> >> $ dpkg --search /usr/include/boost/asio.hpp
> >> libboost1.53-dev: /usr/include/boost/asio.hpp
> >
> > header only library => not needed by runtime.
> >
> >> $ dpkg --search /usr/include/boost/throw_exception.hpp
> >> libboost1.53-dev: /usr/include/boost/throw_exception.hpp
>
> > header only library => not needed by runtime.
>
> ...but currently needed by other code when build against Mir (e.g., if they
> include asio_main_loop.h).
>
> The throw_exception dependency can easily be removed. The asio dependency can
> also be removed, e.g., by using Cheshire Cat.
>
> Note that we have even more external header dependencies that are not dealt
> with at the moment:
>
> $ grep -R '#include <.*h\(pp\)*>' include/shared include/server include/client
>
> ... and after some manual filtering:
>
> include/server/mir/compositor/buffer_swapper_spin.h:#include
> <boost/throw_exception.hpp>
> include/server/mir/options/program_option.h:#include
> <boost/program_options/variables_map.hpp>
> include/server/mir/options/program_option.h:#include
> <boost/program_options/options_description.hpp>
> include/server/mir/asio_main_loop.h:#include <boost/asio.hpp>
> include/server/mir/graphics/drm_authenticator.h:#include <xf86drm.h>
> include/server/mir/graphics/gl_renderer.h:#include <GLES2/gl2.h>
> include/server/mir/graphics/internal_client.h:#include <EGL/egl.h>
> include/server/mir/graphics/display_report.h:#include <EGL/egl.h>
> include/shared/mir/graphics/android/android_driver_interpreter.h:#include
> <system/window.h>
> include/shared/mir/graphics/android/mir_native_window.h:#include
> <system/window.h>
> include/shared/mir/input/xkb_mapper.h:#include <xkbcommon/xkbcommon.h>
>
> Our header dependencies are either headers that the users of mir libraries
> will need to interact with the library, or just header "leaks".
>
> My proposal is to decide which is which, remove/hide the "leaked" header
> dependencies, and depend only on the -dev packages of real header
> dependencies.
>
> > Do we also need to add libboost-system-dev?
>
> It doesn't seem so. libboost-system doesn't provide any headers.
>
> The improvements described above can be done in another MP, or this MP, I
> don't have a preference. This MP is fine as it is, so approving.

That makes sense - let's land this

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2013-06-06 02:01:56 +0000
3+++ debian/control 2013-06-06 16:40:38 +0000
4@@ -81,6 +81,7 @@
5 libmirprotobuf-dev (= ${source:Version}),
6 mircommon-dev (= ${source:Version}),
7 libglm-dev,
8+ libboost-program-options-dev,
9 ${misc:Depends},
10 Description: Display server for Ubuntu - development headers
11 Mir is a display server running on linux systems, with a focus on efficiency,

Subscribers

People subscribed via source and target branches