We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3614 - Linux build broken due to issues with Mir
Summary: Linux build broken due to issues with Mir
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: x86_64 Linux
: P2 normal
Assignee: Brandon Schaefer
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-24 09:11 UTC by Mark Callow
Modified: 2017-08-02 19:49 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Callow 2017-03-24 09:11:01 UTC
I'm building on Ubuntu 16.10 Yakkety. With recent commits (at least e212b4d00d84 to 924f8bdc008d) I got many errors like

--------------------------------------------------------

[  2%] Building C object CMakeFiles/SDL2-static.dir/src/video/mir/SDL_mirdyn.c.o
In file included from /home/mark/Projects/github/SDL/src/video/mir/SDL_mirdyn.c:27:0:
/home/mark/Projects/github/SDL/src/video/mir/SDL_mirsym.h:37:13: error: unknown type name ‘MirWindow’
 SDL_MIR_SYM(MirWindow *,mir_create_window_sync,(MirWindowSpec* spec))
             ^
/home/mark/Projects/github/SDL/src/video/mir/SDL_mirdyn.h:40:13: note: in definition of macro ‘SDL_MIR_SYM’
     typedef rc (*SDL_DYNMIRFN_##fn) params; \
             ^~
/home/mark/Projects/github/SDL/src/video/mir/SDL_mirsym.h:37:49: error: unknown type name ‘MirWindowSpec’
 SDL_MIR_SYM(MirWindow *,mir_create_window_sync,(MirWindowSpec* spec))

---------------------------------------------------------

MirWindow and MirWindowSpec are not declared anywhere in the Mir installed with 16.10 which is Mir 0.24. Some searching on the web eventually led me to SDL's configure.in in which I saw that it disables Mir unless 0.26 is found.

So I installed 0.26 from ppa:mir-team/staging. Now I get

----------------------------------------------------------
[  2%] Building C object CMakeFiles/SDL2-static.dir/src/video/mir/SDL_mirdyn.c.o
In file included from /usr/include/mirclient/mir_toolkit/client_types.h:24:0,
                 from /usr/include/mirclient/mir_toolkit/mir_connection.h:21,
                 from /usr/include/mirclient/mir_toolkit/mir_client_library.h:21,
                 from /home/mark/Projects/github/SDL/src/video/mir/SDL_mirdyn.h:28,
                 from /home/mark/Projects/github/SDL/src/video/mir/SDL_mirdyn.c:27:
/usr/include/mirclient/mir_toolkit/events/event.h:24:32: fatal error: mir_toolkit/common.h: No such file or directory
 #include "mir_toolkit/common.h"
                                ^
compilation terminated.
----------------------------------------------------------

The Mir header event.h is looking for a Mir file common.h that doesn't exist.

For now I have disabled Mir via CMake.

How is anyone able to build tip with Mir included?
Comment 1 Ryan C. Gordon 2017-03-24 15:26:26 UTC
The Mir team committed some changes to SDL recently that breaks everything but the bleeding edge of Mir. We allow this because Mir's API is still in flux and not really something meant to be used by the general population yet.

At the current time, our agreement with them is that maintaining backwards compatibility with Mir's still-evolving API isn't a good idea, so we leave it broken on older Mir builds as they move forward. This situation will change when Mir stabilizes, though.

That being said: the configure script (and CMake project) should disable Mir support in this case and never try to build those sources. If a fresh config still enabled it and gave you these results, let me know and I'll fix that.

--ryan.
Comment 2 Mark Callow 2017-03-25 09:47:11 UTC
> That being said: the configure script (and CMake project) should
> disable Mir support in this case and never try to build those
> sources. If a fresh config still enabled it and gave you these>
> results, let me know and I'll fix that.

I'm not sure what constitutes a fresh config but after I pulled the latest code from Mercurial, it tried to build Mir. Here is what I did:

1. Ran cmake to regenerate the make files and tried to build. Build failed.
2. Installed Mir 0.26 from mir-team/staging. Build failed.
2. Ran cmake-gui noticed that Mir was checked, did configure then generate.
   Mir was still included in the build. Build failed.
3. Unchecked Mir did configure then generate. Build succeeded.

The version I had in my workarea before the pull was from around the time of the 2.0.4 release.
Comment 3 Brandon Schaefer 2017-08-02 19:49:05 UTC
Testing on 17.04 with 0.26.3+17.04.20170605-0ubuntu1

Everything seems to compile fine. We did move out common.h from client to a core library that had a debian issue (which has been resolved where the client wasnt pulling in the new libmircore-dev library). I would double check you've that installed, or move up to 17.04. As 16.10 just reached end of life in july 2017:

https://wiki.ubuntu.com/YakketyYak/ReleaseNotes#Support_lifespan

Let me know if you still have any issues! Sorry for taking so long to respond here!