Bug 373097 - kwin fails to compile, due to strange issues with Mesa headers
Summary: kwin fails to compile, due to strange issues with Mesa headers
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-30 04:29 UTC by bluescreenavenger
Modified: 2016-12-14 10:00 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bluescreenavenger 2016-11-30 04:29:54 UTC
Hi

I am getting the following build output when trying to compile kwin

It seems to involve the mesa headers, I'm not sure if I have something that is suddenly configured wrong, as I have been encountering more issues with compile errors coming from them... I am using Debian Testing, but a hand built mesa

[ 83%] Built target kdeinit_kwin_x11
/srcbuild/kwin/plugins/platforms/x11/common/eglonxbackend.cpp: In member function ‘bool KWin::EglOnXBackend::initRenderingContext()’:
/srcbuild/kwin/plugins/platforms/x11/common/eglonxbackend.cpp:194:33: error: invalid conversion from ‘Display* {aka _XDisplay*}’ to ‘EGLNativeDisplayType {aka int}’ [-fpermissive]
             dpy = eglGetDisplay(m_x11Display);
                                 ^
/srcbuild/kwin/plugins/platforms/wayland/egl_wayland_backend.cpp: In member function ‘bool KWin::EglWaylandBackend::initializeEgl()’:
/srcbuild/kwin/plugins/platforms/wayland/egl_wayland_backend.cpp:86:55: error: invalid conversion from ‘wl_display*’ to ‘EGLNativeDisplayType {aka int}’ [-fpermissive]
             display = eglGetDisplay(m_wayland->display());
                                                       ^
/srcbuild/kwin/plugins/platforms/x11/common/eglonxbackend.cpp: In member function ‘void* KWin::EglOnXBackend::createSurface(xcb_window_t)’:
/srcbuild/kwin/plugins/platforms/x11/common/eglonxbackend.cpp:271:81: error: invalid conversion from ‘xcb_window_t {aka unsigned int}’ to ‘EGLNativeWindowType {aka void*}’ [-fpermissive]
         surface = eglCreateWindowSurface(eglDisplay(), config(), window, nullptr);
                                                                                 ^
Scanning dependencies of target KWinIntegrationTestFramework
[ 83%] Building CXX object autotests/integration/CMakeFiles/KWinIntegrationTestFramework.dir/kwin_wayland_test.cpp.o
Comment 1 Martin Flöser 2016-11-30 08:03:19 UTC
can you check which include path you get into in <EGL/eglplatform.h>
Comment 2 bluescreenavenger 2016-11-30 13:18:12 UTC
Hi. 
Where do I explicitly check for this? I think it's probably the one from /opt/include ...

I do set CPATH

export INSTALLDIR=/opt
export CPATH=$INSTALLDIR/include
Comment 3 Martin Flöser 2016-11-30 13:27:41 UTC
eglplatform.h has multiple sections like:

#elif defined(__WINSCW__) || defined(__SYMBIAN32__)  /* Symbian */

typedef int   EGLNativeDisplayType;
typedef void *EGLNativeWindowType;
typedef void *EGLNativePixmapType;

#elif defined(WL_EGL_PLATFORM)

The question is: which of the defines is set.
Comment 4 bluescreenavenger 2016-12-01 03:57:55 UTC
after some grepping, I found out kwin is getting it's eglplatform from libepoxy, of which I remembered I am building with my scripts. Knocking it down from master to 1.3.1 allows kwin to build. I had it like this for some time, not sure what changed in epoxy to make kwin not like it...
Comment 5 Martin Flöser 2016-12-01 06:16:55 UTC
Sounds like a regression in master libepoxy.
Comment 6 bluescreenavenger 2016-12-01 12:41:33 UTC
I could try to report it to libepoxy.. Not sure if I'd be able to give them all the information they need though
Comment 7 Bhushan Shah 2016-12-14 10:00:50 UTC
So, I just hit this error in mobile builds for kwin..

Changes in libepoxy which caused kwin to fail.

http://mobile.neon.pangea.pub:8080/job/xenial_unstable_plasma-phone-packaging_libepoxy_src/changes

Bit tricky as knocking down libepoxy version means kwin won't work on phone :/