Solved kodi build on raspbian; missing dep in ./xbmc/windowing/X11 ?
#1
I'm building Kodi/head
Code:
    commit 15525e03422f65de756a086a2c4851b45b1f33f4
        Merge: 0d720f8 b84c11d
        Author: Lars Op den Kamp <[email protected]>
        Date:   Tue Sep 9 00:04:02 2014 +0200

            Merge pull request #5338 from xhaggi/pvr-fix-destructor-visibility
            
            [pvr] fix destructor visibility to allow polymorphic deletion

        commit 0d720f87b081721454e1bf6616410dac1be096b8
in a raspbian/jessie chroot.

I'm upgrading my sources & procedures from Gotham + Raspbian/wheezy (which builds fine), to latest Kodi sources; jessie's a necessary upgrade.

I thinks I've got most of the deps dealt with -- except for this:
Code:
cd ./xbmc/windowing/X11
make
    CPP     xbmc/windowing/X11/WinSystemX11.o
    In file included from WinSystemX11.cpp:25:0:
    WinSystemX11.h:76:3: error: ‘Display’ does not name a type
       Display*  GetDisplay() { return m_dpy; }
       ^
    WinSystemX11.h:96:3: error: ‘Window’ does not name a type
       Window       m_glWindow, m_mainWindow;
       ^
    WinSystemX11.h:106:3: error: ‘Display’ does not name a type
       Display*     m_dpy;
       ^
    WinSystemX11.h:107:3: error: ‘Cursor’ does not name a type
       Cursor       m_invisibleCursor;
       ^
    WinSystemX11.h:108:3: error: ‘Pixmap’ does not name a type
       Pixmap       m_icon;
       ^
    WinSystemX11.h:123:25: error: ‘XVisualInfo’ has not been declared
       bool IsSuitableVisual(XVisualInfo *vInfo);
                             ^
    WinSystemX11.h:124:28: error: ‘Display’ has not been declared
       static int XErrorHandler(Display* dpy, XErrorEvent* error);
                                ^
    WinSystemX11.h:124:42: error: ‘XErrorEvent’ has not been declared
       static int XErrorHandler(Display* dpy, XErrorEvent* error);
                                              ^
    WinSystemX11.cpp: In constructor ‘CWinSystemX11::CWinSystemX11()’:
    WinSystemX11.cpp:64:3: error: ‘m_dpy’ was not declared in this scope
       m_dpy = NULL;
       ^
    WinSystemX11.cpp:65:3: error: ‘m_glWindow’ was not declared in this scope
       m_glWindow = 0;
       ^
    WinSystemX11.cpp:66:3: error: ‘m_mainWindow’ was not declared in this scope
       m_mainWindow = 0;
       ^
    WinSystemX11.cpp:70:3: error: ‘m_invisibleCursor’ was not declared in this scope
       m_invisibleCursor = 0;
       ^
    WinSystemX11.cpp:73:33: error: invalid conversion from ‘int (*)(int*, int*)’ to ‘XErrorHandler {aka int (*)(_XDisplay*, XErrorEvent*)}’ [-fpermissive]
       XSetErrorHandler(XErrorHandler);
                                     ^
    In file included from /usr/include/X11/extensions/Xrender.h:28:0,
                     from /usr/include/X11/extensions/Xrandr.h:33,
                     from WinSystemX11.cpp:44:
    /usr/include/X11/Xlib.h:1860:22: note: initializing argument 1 of ‘int (* XSetErrorHandler(XErrorHandler))(Display*, XErrorEvent*)’
     extern XErrorHandler XSetErrorHandler (
                          ^
    WinSystemX11.cpp: In member function ‘virtual bool CWinSystemX11::InitWindowSystem()’:
    WinSystemX11.cpp:82:8: error: ‘m_dpy’ was not declared in this scope
       if ((m_dpy = XOpenDisplay(NULL)))
            ^
    WinSystemX11.cpp: In member function ‘virtual bool CWinSystemX11::DestroyWindow()’:
    WinSystemX11.cpp:155:8: error: ‘m_mainWindow’ was not declared in this scope
       if (!m_mainWindow)
            ^
    WinSystemX11.cpp:173:7: error: ‘m_invisibleCursor’ was not declared in this scope
       if (m_invisibleCursor)
           ^
    WinSystemX11.cpp:175:21: error: ‘m_dpy’ was not declared in this scope
         XUndefineCursor(m_dpy, m_mainWindow);
                         ^
    WinSystemX11.cpp:175:28: error: ‘m_mainWindow’ was not declared in this scope
         XUndefineCursor(m_dpy, m_mainWindow);
                                ^
    WinSystemX11.cpp:182:16: error: ‘m_dpy’ was not declared in this scope
       XUnmapWindow(m_dpy, m_mainWindow);
                    ^
    WinSystemX11.cpp:182:23: error: ‘m_mainWindow’ was not declared in this scope
       XUnmapWindow(m_dpy, m_mainWindow);
                           ^
    WinSystemX11.cpp:183:25: error: ‘m_glWindow’ was not declared in this scope
       XDestroyWindow(m_dpy, m_glWindow);
                             ^
    WinSystemX11.cpp:188:7: error: ‘m_icon’ was not declared in this scope
       if (m_icon)
           ^
    WinSystemX11.cpp: In member function ‘virtual bool CWinSystemX11::SetFullScreen(bool, RESOLUTION_INFO&, bool)’:
    WinSystemX11.cpp:272:9: error: ‘m_mainWindow’ was not declared in this scope
         if (m_mainWindow)
             ^
    WinSystemX11.cpp:284:38: error: ‘m_dpy’ was not declared in this scope
             bool isInWin = XQueryPointer(m_dpy, m_mainWindow, &root_return, &child_return,
                                          ^
    WinSystemX11.cpp: In member function ‘virtual void CWinSystemX11::UpdateResolutions()’:
    WinSystemX11.cpp:325:33: error: ‘m_dpy’ was not declared in this scope
       int numScreens = XScreenCount(m_dpy);
                                     ^
    WinSystemX11.cpp: At global scope:
    WinSystemX11.cpp:536:6: error: prototype for ‘bool CWinSystemX11::IsSuitableVisual(XVisualInfo*)’ does not match any in class ‘CWinSystemX11’
     bool CWinSystemX11::IsSuitableVisual(XVisualInfo *vInfo)
          ^
    In file included from WinSystemX11.cpp:25:0:
    WinSystemX11.h:123:8: error: candidate is: bool CWinSystemX11::IsSuitableVisual(int*)
       bool IsSuitableVisual(XVisualInfo *vInfo);
            ^
    WinSystemX11.cpp: In member function ‘bool CWinSystemX11::RefreshGlxContext(bool)’:
    WinSystemX11.cpp:617:28: error: ‘m_dpy’ was not declared in this scope
       if (XGetWindowAttributes(m_dpy, m_glWindow, &winAttr))
                                ^
    WinSystemX11.cpp:617:35: error: ‘m_glWindow’ was not declared in this scope
       if (XGetWindowAttributes(m_dpy, m_glWindow, &winAttr))
                                       ^
    WinSystemX11.cpp:623:36: error: no matching function for call to ‘CWinSystemX11::IsSuitableVisual(XVisualInfo*&)’
         else if(!IsSuitableVisual(vInfo))
                                        ^
    WinSystemX11.cpp:623:36: note: candidate is:
    In file included from WinSystemX11.cpp:25:0:
    WinSystemX11.h:123:8: note: bool CWinSystemX11::IsSuitableVisual(int*)
       bool IsSuitableVisual(XVisualInfo *vInfo);
            ^
    WinSystemX11.h:123:8: note:   no known conversion for argument 1 from ‘XVisualInfo*’ to ‘int*’
    WinSystemX11.cpp:641:30: error: ‘m_dpy’ was not declared in this scope
         visuals = XGetVisualInfo(m_dpy, VisualScreenMask | VisualDepthMask, &vMask, &availableVisuals);
                                  ^
    WinSystemX11.cpp:644:39: error: no matching function for call to ‘CWinSystemX11::IsSuitableVisual(XVisualInfo*)’
           if (IsSuitableVisual(&visuals[i]))
                                           ^
    WinSystemX11.cpp:644:39: note: candidate is:
    In file included from WinSystemX11.cpp:25:0:
    WinSystemX11.h:123:8: note: bool CWinSystemX11::IsSuitableVisual(int*)
       bool IsSuitableVisual(XVisualInfo *vInfo);
            ^
    WinSystemX11.h:123:8: note:   no known conversion for argument 1 from ‘XVisualInfo*’ to ‘int*’
    WinSystemX11.cpp:685:13: error: ‘m_dpy’ was not declared in this scope
           XSync(m_dpy, FALSE);
                 ^
    WinSystemX11.cpp:689:56: error: ‘m_dpy’ was not declared in this scope
         m_eglDisplay = eglGetDisplay((EGLNativeDisplayType)m_dpy);
                                                            ^
    WinSystemX11.cpp:711:70: error: ‘m_glWindow’ was not declared in this scope
           m_eglSurface = eglCreateWindowSurface(m_eglDisplay, eglConfig, m_glWindow, NULL);
                                                                          ^
    WinSystemX11.cpp: In member function ‘virtual void CWinSystemX11::ShowOSMouse(bool)’:
    WinSystemX11.cpp:749:21: error: ‘m_dpy’ was not declared in this scope
         XUndefineCursor(m_dpy,m_mainWindow);
                         ^
    WinSystemX11.cpp:749:27: error: ‘m_mainWindow’ was not declared in this scope
         XUndefineCursor(m_dpy,m_mainWindow);
                               ^
    WinSystemX11.cpp:750:12: error: ‘m_invisibleCursor’ was not declared in this scope
       else if (m_invisibleCursor)
                ^
    WinSystemX11.cpp:751:19: error: ‘m_dpy’ was not declared in this scope
         XDefineCursor(m_dpy,m_mainWindow, m_invisibleCursor);
                       ^
    WinSystemX11.cpp:751:25: error: ‘m_mainWindow’ was not declared in this scope
         XDefineCursor(m_dpy,m_mainWindow, m_invisibleCursor);
                             ^
    WinSystemX11.cpp: In member function ‘virtual void CWinSystemX11::ResetOSScreensaver()’:
    WinSystemX11.cpp:764:25: error: ‘m_dpy’ was not declared in this scope
           XResetScreenSaver(m_dpy);
                             ^
    WinSystemX11.cpp: In member function ‘virtual void CWinSystemX11::EnableSystemScreenSaver(bool)’:
    WinSystemX11.cpp:775:8: error: ‘m_dpy’ was not declared in this scope
       if (!m_dpy)
            ^
    WinSystemX11.cpp:779:23: error: ‘m_dpy’ was not declared in this scope
         XForceScreenSaver(m_dpy, ScreenSaverActive);
                           ^
    WinSystemX11.cpp:786:19: error: ‘m_dpy’ was not declared in this scope
         XQueryPointer(m_dpy, RootWindow(m_dpy, m_nScreen), &root_return, &child_return,
                       ^
    WinSystemX11.cpp: In member function ‘virtual bool CWinSystemX11::Minimize()’:
    WinSystemX11.cpp:833:18: error: ‘m_dpy’ was not declared in this scope
       XIconifyWindow(m_dpy, m_mainWindow, m_nScreen);
                      ^
    WinSystemX11.cpp:833:25: error: ‘m_mainWindow’ was not declared in this scope
       XIconifyWindow(m_dpy, m_mainWindow, m_nScreen);
                             ^
    WinSystemX11.cpp: In member function ‘virtual bool CWinSystemX11::Hide()’:
    WinSystemX11.cpp:844:16: error: ‘m_dpy’ was not declared in this scope
       XUnmapWindow(m_dpy, m_mainWindow);
                    ^
    WinSystemX11.cpp:844:23: error: ‘m_mainWindow’ was not declared in this scope
       XUnmapWindow(m_dpy, m_mainWindow);
                           ^
    WinSystemX11.cpp: In member function ‘virtual bool CWinSystemX11::Show(bool)’:
    WinSystemX11.cpp:850:14: error: ‘m_dpy’ was not declared in this scope
       XMapWindow(m_dpy, m_mainWindow);
                  ^
    WinSystemX11.cpp:850:21: error: ‘m_mainWindow’ was not declared in this scope
       XMapWindow(m_dpy, m_mainWindow);
                         ^
    WinSystemX11.cpp: At global scope:
    WinSystemX11.cpp:946:5: error: prototype for ‘int CWinSystemX11::XErrorHandler(Display*, XErrorEvent*)’ does not match any in class ‘CWinSystemX11’
     int CWinSystemX11::XErrorHandler(Display* dpy, XErrorEvent* error)
         ^
    In file included from WinSystemX11.cpp:25:0:
    WinSystemX11.h:124:14: error: candidate is: static int CWinSystemX11::XErrorHandler(int*, int*)
       static int XErrorHandler(Display* dpy, XErrorEvent* error);
                  ^
    WinSystemX11.cpp: In member function ‘bool CWinSystemX11::SetWindow(int, int, bool, const string&)’:
    WinSystemX11.cpp:968:8: error: ‘m_mainWindow’ was not declared in this scope
       if (!m_mainWindow)
            ^
    WinSystemX11.cpp:973:7: error: ‘m_mainWindow’ was not declared in this scope
       if (m_mainWindow && ((m_bFullScreen != fullscreen) || m_currentOutput.compare(output) != 0 || m_windowDirty))
           ^
    WinSystemX11.cpp:988:36: error: ‘m_dpy’ was not declared in this scope
           bool isInWin = XQueryPointer(m_dpy, m_mainWindow, &root_return, &child_return,
                                        ^
    WinSystemX11.cpp:1007:8: error: ‘m_mainWindow’ was not declared in this scope
       if (!m_mainWindow)
            ^
    WinSystemX11.cpp:1060:58: error: ‘m_dpy’ was not declared in this scope
           m_eglDisplay = eglGetDisplay((EGLNativeDisplayType)m_dpy);
                                                              ^
    WinSystemX11.cpp:1084:25: error: ‘m_dpy’ was not declared in this scope
         vi = XGetVisualInfo(m_dpy,
                             ^
    WinSystemX11.cpp:1115:5: error: ‘m_glWindow’ was not declared in this scope
         m_glWindow = XCreateWindow(m_dpy, m_mainWindow,
         ^
    WinSystemX11.cpp:1133:5: error: ‘m_invisibleCursor’ was not declared in this scope
         m_invisibleCursor = XCreatePixmapCursor(m_dpy, bitmapNoData, bitmapNoData,
         ^
    WinSystemX11.cpp:1161:19: error: ‘m_dpy’ was not declared in this scope
         XResizeWindow(m_dpy, m_mainWindow, width, height);
                       ^
    WinSystemX11.cpp:1161:26: error: ‘m_mainWindow’ was not declared in this scope
         XResizeWindow(m_dpy, m_mainWindow, width, height);
                              ^
    WinSystemX11.cpp:1166:19: error: ‘m_dpy’ was not declared in this scope
         XResizeWindow(m_dpy, m_glWindow, width, height);
                       ^
    WinSystemX11.cpp:1166:26: error: ‘m_glWindow’ was not declared in this scope
         XResizeWindow(m_dpy, m_glWindow, width, height);
                              ^
    WinSystemX11.cpp:1171:5: error: ‘m_icon’ was not declared in this scope
         m_icon = None;
         ^
    WinSystemX11.cpp:1193:24: error: ‘m_dpy’ was not declared in this scope
           XSetWMProperties(m_dpy, m_mainWindow, &windowName, &iconName,
                            ^
    WinSystemX11.cpp:1193:31: error: ‘m_mainWindow’ was not declared in this scope
           XSetWMProperties(m_dpy, m_mainWindow, &windowName, &iconName,
                                   ^
    WinSystemX11.cpp:1205:18: error: ‘m_dpy’ was not declared in this scope
         XWarpPointer(m_dpy, None, m_mainWindow, 0, 0, 0, 0, mouseX*width, mouseY*height);
                      ^
    WinSystemX11.cpp:1205:29: error: ‘m_mainWindow’ was not declared in this scope
         XWarpPointer(m_dpy, None, m_mainWindow, 0, 0, 0, 0, mouseX*width, mouseY*height);
                                 ^
    WinSystemX11.cpp:1207:23: error: ‘m_glWindow’ was not declared in this scope
         XMapRaised(m_dpy, m_glWindow);
                           ^
    WinSystemX11.cpp: In member function ‘bool CWinSystemX11::CreateIconPixmap()’:
    WinSystemX11.cpp:1253:24: error: ‘m_dpy’ was not declared in this scope
       XGetWindowAttributes(m_dpy, m_glWindow, &wndattribs);
                            ^
    WinSystemX11.cpp:1253:31: error: ‘m_glWindow’ was not declared in this scope
       XGetWindowAttributes(m_dpy, m_glWindow, &wndattribs);
                                   ^
    WinSystemX11.cpp:1346:3: error: ‘m_icon’ was not declared in this scope
       m_icon = XCreatePixmap(m_dpy, m_glWindow, img->width, img->height, depth);
       ^
    WinSystemX11.cpp: In member function ‘bool CWinSystemX11::HasWindowManager()’:
    WinSystemX11.cpp:1365:22: error: ‘m_dpy’ was not declared in this scope
       prop = XInternAtom(m_dpy, "_NET_SUPPORTING_WM_CHECK", True);
                          ^
    ../../../Makefile.include:93: recipe for target 'WinSystemX11.o' failed
    make: *** [WinSystemX11.o] Error 1

Something's obviously missing.

I'm not sure -- yet -- whether it's a missing Raspbian pkg dep (*thought* I got 'em all ...), or an improper/missing include in Kodi's code.

I just can't find the silly thing.

Any suggestions? I can provide add'l detail as needed.

Thanks,

Grant
Reply
#2
per chat in #kodi
Code:
    [08:42] <wsnipex> there was a very recent commit that enabled X11 on arm linux
    [08:42] <wsnipex> which is probably the issue here
noting
Code:
    ./configure --help
        ...
        --enable-x11            enable x11 (default is yes) 'Linux Only'
        ...
DISABLING it
Code:
    make clean
    ccache -c -C
    ./configure --disable-x11 ...
results in
Code:
    ...
    ------------------------
      Kodi Configuration:
    ------------------------
      Debugging:    Yes
      Profiling:    No
      Optimization: Yes
      SWIG Available:       Yes
      JRE Available:        Yes
      Doxygen Available:    Yes
      Crosscomp.:   No
      target ARCH:  arm
      target CPU:   arm1176jzf-s
      OpenGLES:     Yes
      ALSA:         No
      DBUS:         Yes
      VDPAU:        Yes
      VAAPI:        Yes
      VTBDecoder:   No
      OpenMax:      No
      Joystick:     No
      XRandR:       No
      Waveform:     Yes
      Spectrum:     Yes
      GOOM:         No
      RSXS:         Yes
      FishBMC:      No
      ProjectM:     No
      Skin Touched: No
      X11:          No
      Wayland:      No
      Bluray:       Yes
      TexturePacker:Yes
      MID Support:  Yes
      ccache:       Yes
      ALSA Support: No
      PulseAudio:   No
      DVDCSS:       Yes
      Google Test Framework Configured:     Yes
      Avahi:        No
      mDNSEmbedded: No
      Non-free:     Yes
      ASAP Codec:   No
      MySQL:        Yes
      Webserver:    Yes
      libssh support:       Yes
      libRTMP support:      Yes
      libsmbclient support: Yes
      libnfs client support:Yes
      libafpclient support: No
      AirPLay support:      No
      AirTunes support:     No
      UPnP support:         Yes
      Optical drive:        Yes
      libudev support:      Yes
      libusb support:       No
      libcec support:       Yes
      libcap support:       Yes
      additional players:   No
      additional codecs:    No
      PVR add-ons:          No
      prefix:       /usr/local/kodi
    ------------------------
then
Code:
    make
now fails differently
Code:
    ...
    CPP     xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.o
    CPP     xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.o
    In file included from /usr/include/GL/gl.h:2055:0,
                     from /usr/include/GL/glx.h:32,
                     from VDPAU.h:48,
                     from DVDVideoCodecFFmpeg.cpp:53:
    /usr/include/GL/glext.h:468:19: error: conflicting declaration ‘typedef ptrdiff_t GLsizeiptr’
     typedef ptrdiff_t GLsizeiptr;
                       ^
    In file included from /usr/local/src/xbmc/xbmc/system_gl.h:51:0,
                     from VDPAU.h:41,
                     from DVDVideoCodecFFmpeg.cpp:53:
    /usr/include/GLES2/gl2.h:66:25: note: previous declaration as ‘typedef khronos_ssize_t GLsizeiptr’
     typedef khronos_ssize_t  GLsizeiptr;
                             ^
    In file included from /usr/include/GL/gl.h:2055:0,
                     from /usr/include/GL/glx.h:32,
                     from VDPAU.h:48,
                     from DVDVideoCodecFFmpeg.cpp:53:
    /usr/include/GL/glext.h:469:19: error: conflicting declaration ‘typedef ptrdiff_t GLintptr’
     typedef ptrdiff_t GLintptr;
                       ^
    In file included from /usr/local/src/xbmc/xbmc/system_gl.h:51:0,
                     from VDPAU.h:41,
                     from DVDVideoCodecFFmpeg.cpp:53:
    /usr/include/GLES2/gl2.h:65:26: note: previous declaration as ‘typedef khronos_intptr_t GLintptr’
     typedef khronos_intptr_t GLintptr;
                              ^
    In file included from /usr/include/GL/gl.h:2055:0,
                     from /usr/include/GL/glx.h:32,
                     from VDPAU.h:48,
                     from DVDVideoCodecFFmpeg.cpp:53:
    /usr/include/GL/glext.h:777:138: error: conflicting declaration of C function ‘void glShaderSource(GLuint, GLsizei, const GLchar* const*, const GLint*)’
     GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
                                                                                                                                              ^
    In file included from /usr/local/src/xbmc/xbmc/system_gl.h:51:0,
                     from VDPAU.h:41,
                     from DVDVideoCodecFFmpeg.cpp:53:
    /usr/include/GLES2/gl2.h:600:13: note: previous declaration ‘void glShaderSource(GLuint, GLsizei, const GLchar**, const GLint*)’
     GL_APICALL void         GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length);
                 ^
    /usr/local/src/xbmc/Makefile.include:93: recipe for target 'DVDVideoCodecFFmpeg.o' failed
    make[1]: *** [DVDVideoCodecFFmpeg.o] Error 1
    Makefile:516: recipe for target 'xbmc/cores/dvdplayer/DVDCodecs/Video/Video.a' failed
    make: *** [xbmc/cores/dvdplayer/DVDCodecs/Video/Video.a] Error 2
Reply
#3
I think you need more care with the configure options. You don't want X11, VDPAU, VAAPI.
Reply
#4
> I think you need more care with the configure options.

you're absolutely correct. I made some incorect assumptions about build items being toggled by
Code:
    --with-platform=raspberry-pi \
My mistake.

Updated my config line 'manually' to be Rpi-friendly, including,
Code:
    ...
    --disable-vaapi \
    --disable-vdpau \
    --disable-x11 \
    ...
now
Code:
    make
        ...
        -----------------------
        XBMC built successfully
        -----------------------

    file ./xbmc.bin
        xbmc.bin: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=98acf7f72d4fefc9942a338e3414bfc1f5cd0dcb, not stripped

    ./xbmc.bin -v
        XBMC Media Center 14.0-ALPHA4 Git:2014-09-10-f78c550-dirty
        Copyright (C) 2005-2013 Team XBMC - http://xbmc.org

Thanks for the reminder!
Reply
#5
thank you for your help on this. I must admit there was a few things I have noticed that were missed in the steps at http://www.raspberrypi.org/forums/viewto...&start=225. I ended up having to make the config_status.h file to be writeable along with a few others. This was after I had completed Step 11 and got the same errors as above...

I know that this comment maybe seen as a little vague but I have been at it now for coming up 13 hours trying to nut out each error I have had and having to wait for make to run and pray that it would make it through...

I have a new Raspberry PI B+ if that is of any benefit to the users here....

the default directions mentioned appear to be out of date quite a bit.... I also did this as root user and not using sudo....
Reply

Logout Mark Read Team Forum Stats Members Help
kodi build on raspbian; missing dep in ./xbmc/windowing/X11 ?0