Skip to contentSkip to conversation

package/kodi: broken with sunxi mali package

PATCH New Bernd Kuhls 2 participants 4 messages Jul 15, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/3 package/kodi: broken with sunxi mali package

Building this defconfig

BR2_arm=y
BR2_cortex_a8=y
BR2_ARM_INSTRUCTIONS_THUMB2=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_KODI=y
BR2_PACKAGE_SUNXI_MALI=y
BR2_PACKAGE_PYTHON=y
BR2_PACKAGE_PYTHON_PY_ONLY=y

ends up with this build error:

[ 98%] Building CXX object build/windowing/egl/CMakeFiles/windowing_egl.dir/EGLWrapper.cpp.o /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In function ?bool {anonymous}::CorrectGuess(CEGLNativeType*, const string&)?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:63:13: error: invalid use of incomplete type ?class CEGLNativeType?

     if(guess->CheckCompatibility())
             ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:65:34: error: invalid use of incomplete type ?class CEGLNativeType?
       if (implementation == guess->GetNativeName() ||
                                  ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In member function ?bool CEGLWrapper::Initialize(const string&)?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:105:7: error: expected primary-expression before ?)? token
       )
       ^
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:109:18: error: invalid use of incomplete type ?class CEGLNativeType?
     m_nativeTypes->Initialize();
                  ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In member function ?bool CEGLWrapper::Destroy()?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:121:16: error: invalid use of incomplete type ?class CEGLNativeType?
   m_nativeTypes->Destroy();
                ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:123:10: warning: possible problem detected in invocation of delete operator: [-Wdelete-incomplete]
   delete m_nativeTypes;
          ^~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:123:10: warning: invalid use of incomplete type ?class CEGLNativeType?
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:123:10: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined
   delete m_nativeTypes;
          ^~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In member function ?std::__cxx11::string CEGLWrapper::GetNativeName()?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:131:25: error: invalid use of incomplete type ?class CEGLNativeType?
     return m_nativeTypes->GetNativeName();
                         ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In member function ?bool CEGLWrapper::CreateNativeDisplay()?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:140:23: error: invalid use of incomplete type ?class CEGLNativeType?
   return m_nativeTypes->CreateNativeDisplay();
                       ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In member function ?bool CEGLWrapper::CreateNativeWindow()?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:148:23: error: invalid use of incomplete type ?class CEGLNativeType?
   return m_nativeTypes->CreateNativeWindow();
                       ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In member function ?void CEGLWrapper::DestroyNativeDisplay()?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:154:18: error: invalid use of incomplete type ?class CEGLNativeType?
     m_nativeTypes->DestroyNativeDisplay();
                  ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In member function ?void CEGLWrapper::DestroyNativeWindow()?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:160:18: error: invalid use of incomplete type ?class CEGLNativeType?
     m_nativeTypes->DestroyNativeWindow();
                  ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In member function ?bool CEGLWrapper::SetNativeResolution(RESOLUTION_INFO&)?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:167:23: error: invalid use of incomplete type ?class CEGLNativeType?
   return m_nativeTypes->SetNativeResolution(res);
                       ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In member function ?bool CEGLWrapper::ProbeResolutions(std::vector<RESOLUTION_INFO>&)?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:174:23: error: invalid use of incomplete type ?class CEGLNativeType?
   return m_nativeTypes->ProbeResolutions(resolutions);
                       ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In member function ?bool CEGLWrapper::GetPreferredResolution(RESOLUTION_INFO*)?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:182:23: error: invalid use of incomplete type ?class CEGLNativeType?
   return m_nativeTypes->GetPreferredResolution(res);
                       ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In member function ?bool CEGLWrapper::GetNativeResolution(RESOLUTION_INFO*)?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:190:23: error: invalid use of incomplete type ?class CEGLNativeType?
   return m_nativeTypes->GetNativeResolution(res);
                       ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In member function ?bool CEGLWrapper::ShowWindow(bool)?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:198:23: error: invalid use of incomplete type ?class CEGLNativeType?
   return m_nativeTypes->ShowWindow(show);
                       ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In member function ?bool CEGLWrapper::GetQuirks(int*)?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:205:26: error: invalid use of incomplete type ?class CEGLNativeType?
   *quirks = m_nativeTypes->GetQuirks();
                          ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In member function ?bool CEGLWrapper::InitDisplay(void**)?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:217:21: error: invalid use of incomplete type ?class CEGLNativeType?
   if (!m_nativeTypes->GetNativeDisplay((XBNativeDisplayType**)&nativeDisplay))
                     ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:217:41: error: ?XBNativeDisplayType? was not declared in this scope
   if (!m_nativeTypes->GetNativeDisplay((XBNativeDisplayType**)&nativeDisplay))
                                         ^~~~~~~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:217:62: error: expected primary-expression before ?)? token
   if (!m_nativeTypes->GetNativeDisplay((XBNativeDisplayType**)&nativeDisplay))
                                                              ^
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In member function ?bool CEGLWrapper::CreateSurface(EGLDisplay, EGLConfig, void**)?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:288:21: error: invalid use of incomplete type ?class CEGLNativeType?
   if (!m_nativeTypes->GetNativeWindow((XBNativeWindowType**)&nativeWindow))
                     ^~
In file included from /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:40:0:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.h:28:7: note: forward declaration of ?class CEGLNativeType?
 class CEGLNativeType;
       ^~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:288:40: error: ?XBNativeWindowType? was not declared in this scope
   if (!m_nativeTypes->GetNativeWindow((XBNativeWindowType**)&nativeWindow))
                                        ^~~~~~~~~~~~~~~~~~
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:288:60: error: expected primary-expression before ?)? token
   if (!m_nativeTypes->GetNativeWindow((XBNativeWindowType**)&nativeWindow))
                                                            ^

Kodi has no support for sunxi hardware so we disable the usage of the sunxi-mali package as egl provider:
http://linux-sunxi.org/Kodi#Support_for_sunxi_in_Kodi

---
v3: added note about upstream support (Thomas)
v2: no changes

 package/kodi/Config.in | 5 +++++
 1 file changed, 5 insertions(+)
package/kodi/Config.in +5 -0
index 658670139..00e4fbaef 100644
@@ -22,16 +22,21 @@ config BR2_PACKAGE_KODI_EGL_GLES
 	depends on BR2_PACKAGE_HAS_LIBEGL
 	depends on BR2_PACKAGE_HAS_LIBGLES
 	depends on !BR2_PACKAGE_KODI_GL_EGL # prefer GL if available
+	depends on !BR2_PACKAGE_SUNXI_MALI
 
 config BR2_PACKAGE_KODI_GL_EGL
 	bool
 	default y
 	depends on BR2_PACKAGE_HAS_LIBEGL
 	depends on BR2_PACKAGE_HAS_LIBGL
+	depends on !BR2_PACKAGE_SUNXI_MALI
 
 comment "kodi needs an OpenGL EGL with either an openGL or an OpenGL ES backend"
 	depends on !BR2_PACKAGE_KODI_GL_EGL && !BR2_PACKAGE_KODI_EGL_GLES
 
+comment "kodi does not support the sunxi mali driver"
+	depends on BR2_PACKAGE_SUNXI_MALI
+
 menuconfig BR2_PACKAGE_KODI
 	bool "kodi"
 	depends on BR2_ENABLE_LOCALE
Signature · 1 line
2.11.0
#1 lore raw

PATCH v3 2/3 package/kodi: remove -DCMAKE_C_FLAGS needed for sunxi-mali

https://git.buildroot.net/buildroot/commit/package/kodi/kodi.mk?id=23c3919c5e5b4fa69af9d16ce6a9286869740fd3
added CFLAGS "because configure uses gcc to detect egl support".

This was needed for the autoconf build system and is not needed for the cmake build system anymore, tested using this defconfig

BR2_arm=y
BR2_cortex_a8=y
BR2_ARM_INSTRUCTIONS_THUMB2=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_KODI=y
BR2_PACKAGE_RPI_USERLAND=y
BR2_PACKAGE_PYTHON=y
BR2_PACKAGE_PYTHON_PY_ONLY=y

$ grep -i gles .config
BR2_PACKAGE_KODI_EGL_GLES=y
BR2_PACKAGE_PROVIDES_LIBGLES="rpi-userland"
BR2_PACKAGE_HAS_LIBGLES=y

---
v3: no changes
v2: no changes

 package/kodi/kodi.mk | 1 -
 1 file changed, 1 deletion(-)
package/kodi/kodi.mk +0 -1
index 309d0d3af..3d6c70bee 100644
@@ -231,7 +231,6 @@ ifeq ($(BR2_PACKAGE_KODI_EGL_GLES),y)
 KODI_DEPENDENCIES += libegl libgles
 KODI_CONF_OPTS += \
 	-DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags --libs egl`" \
-	-DCMAKE_C_FLAGS="$(TARGET_CFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags --libs egl`" \
 	-DENABLE_OPENGLES=ON
 else
 KODI_CONF_OPTS += -DENABLE_OPENGLES=OFF
Signature · 1 line
2.11.0
#2 lore raw

PATCH v3 3/3 package/kodi: Add support for more archs

In reply to Bernd Kuhls

For the autoconf-based build system it was necessary to allow each supported architecture separatly:
https://github.com/xbmc/xbmc/blob/Krypton/m4/xbmc_arch.m4

For the CMake build system this is not necessary anymore so we only blacklist archs in Config.in known to be broken.

---
v3: fixed "KODI_CXX_FLAGS +=" (Samuel)
v2: rebased

 package/kodi/Config.in |  6 +++---
 package/kodi/kodi.mk   | 45 +++++++++++++++++++++++++++++++++++----------
 2 files changed, 38 insertions(+), 13 deletions(-)
package/kodi/Config.in +3 -3
index 00e4fbaef..e0c16fac3 100644
@@ -1,9 +1,9 @@
 config BR2_PACKAGE_KODI_ARCH_SUPPORTS
 	bool
-	default y if (BR2_arm || (BR2_mipsel && BR2_TOOLCHAIN_USES_GLIBC) || BR2_i386 || BR2_x86_64) \
-		&& BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS \
-		&& BR2_TOOLCHAIN_HAS_SYNC_8
 	depends on BR2_USE_MMU # libcdio, and others
+# i386: needs sse (see upstream PR 10351)
+	default y if BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS \
+		&& !(BR2_i386 && !BR2_X86_CPU_HAS_SSE)
 
 comment "kodi needs python w/ .py modules, a uClibc or glibc toolchain w/ C++, locale, threads, wchar, dynamic library, gcc >= 4.8, host gcc >= 4.6"
 	depends on BR2_PACKAGE_KODI_ARCH_SUPPORTS
package/kodi/kodi.mk +35 -10

70 lines not on this page · raw message

Signature · 1 line
2.11.0
#3 lore raw

PATCH v3 1/3 package/kodi: broken with sunxi mali package

In reply to Bernd Kuhls

Hello,

Quoted 11 lines · Bernd Kuhls

Building this defconfig

BR2_arm=y
BR2_cortex_a8=y
BR2_ARM_INSTRUCTIONS_THUMB2=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_KODI=y
BR2_PACKAGE_SUNXI_MALI=y
BR2_PACKAGE_PYTHON=y
BR2_PACKAGE_PYTHON_PY_ONLY=y

Quoted 6 lines

ends up with this build error:

[ 98%] Building CXX object build/windowing/egl/CMakeFiles/windowing_egl.dir/EGLWrapper.cpp.o /home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp: In function ?bool {anonymous}::CorrectGuess(CEGLNativeType*, const string&)?:
/home/buildroot/output/build/kodi-17.3-Krypton/xbmc/windowing/egl/EGLWrapper.cpp:63:13: error: invalid use of incomplete type ?class CEGLNativeType?

     if(guess->CheckCompatibility())

I already replied to the v2 of this patch series that I wasn't really happy with this solution, at least not until we have an explanation other than "it doesn't work, let's disable it".

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com