Solved Matrix 19.1 - Can't compile
#1
I'm having some difficulty compiling Kodi for Windows UWP x64.  I searched but I was not able to find a post that addresses this.  Here are the errors I'm getting after running BuildSetup.bat:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for

'C:\Users\***\kodi\kodi-build.x64-uwp\CMakeFiles\588539c38624c47c1d9af4abaf30e981\AddonModuleXbmcaddon.i.cpp.rule;
C:\Users\***\kodi\kodi-build.x64-uwp\CMakeFiles\588539c38624c47c1d9af4abaf30e981\AddonModuleXbmcdrm.i.cpp.rule;
C:\Users\***\kodi\kodi-build.x64-uwp\CMakeFiles\588539c38624c47c1d9af4abaf30e981\AddonModuleXbmcgui.i.cpp.rule;
C:\Users\***\kodi\kodi-build.x64-uwp\CMakeFiles\588539c38624c47c1d9af4abaf30e981\AddonModuleXbmc.i.cpp.rule;
C:\Users\***\kodi\kodi-build.x64-uwp\CMakeFiles\588539c38624c47c1d9af4abaf30e981\AddonModuleXbmcplugin.i.cpp.rule;
C:\Users\***\kodi\kodi-build.x64-uwp\CMakeFiles\588539c38624c47c1d9af4abaf30e981\AddonModuleXbmcvfs.i.cpp.rule;
C:\Users\***\kodi\kodi-build.x64-uwp\CMakeFiles\588539c38624c47c1d9af4abaf30e981\AddonModuleXbmcwsgi.i.cpp.rule'

exited with code 1. [C:\Users\***\kodi\kodi-build.x64-uwp\build\swig\python_binding.vcxproj]

Here are the rest of the details:

Version of Kodi: Kodi 19.1
Windows Version: Windows Home 10 21H1
CPU/Architecture: Intel® Core™ i7-7500U CPU (x64)
RAM amount: 16 GB
Steps to reproduce: download-dependencies.bat, download-msys2.bat, make-mingwlibs.bat, BuildSetup.bat (all in kodi\tools\buildsteps\windows\x64-uwp)

Does anyone know how to resolve these errors so that I can complete the build?
Reply
#2
The Tips, tricks, and step by step guides section has a walk through for compiling, otherwise the .exe is available through link at top left of the page.
Reply
#3
(2021-06-14, 23:32)PatK Wrote: The Tips, tricks, and step by step guides section has a walk through for compiling, otherwise the .exe is available through link at top left of the page.

I saw this how-to post (https://forum.kodi.tv/showthread.php?tid=142337), but it looks like the instructions are not for UWP.  I have been following this guide to try and build it: (https://github.com/xbmc/xbmc/blob/master...Windows.md).  Instead of using an existing package, I would really like to learn how to build it myself.
Reply
#4
@Quant2 when you ran download-dependencies.bat did it complete correctly?  IIRC, I had to run it about 8 times before it finally finished without an error.  BTW, the thread you linked to references Linux builds, not Windows. As far as I know, the instructions on Github are correct as I recently followed them myself when building on Windows for the first time.
Learning Linux the hard way !!
Reply
#5
i have same error
started about a more or less month ago,
happen with Matrix and also master branch

i had opened here: https://forum.kodi.tv/showthread.php?tid=363551

has something broken in the dependencies?

also the ffmpeg dependency now creates problems with branch "Matrix" not apply the patches when build ffmpeg,
i have fixed by rename ffmpeg tag to "4.3.2-Matrix-19.2" in \tools\depends\target\ffmpeg\FFMPEG-VERSION

but the error MSB8066 on swig above is persistent

EDIT: I build Win x64 NOT UWP version, but same problem
Dev-Maintainer of InputStream Adaptive add-on, Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
Reply
#6
Ill just anecdotally say that i built win x64 build of master with no problems at all just a couple days ago from a scratch vm using VS 2019 community edition.

The swig issues that were fixed recently in master essentially came from new versions of java not playing nice with the version of swig we use.

As i build in a vm, i only have Java 8 installed, so if you are using something newer (ie 16), may want to try remove it (if possible) and try with an older java version (SE 8 or 11)
Reply
#7
I had installed JRE version 8 (1.8.0_301) only

now i have tried uninstall it
and install JDK 11.0.12 (now JRE is included only in JDK)
EDIT: tried also JDK 16

but no way, same error
Dev-Maintainer of InputStream Adaptive add-on, Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
Reply
#8
swig build error with java >=15 was fixed by https://github.com/xbmc/xbmc/pull/19891

If you still have issues, provide a build log
Reply
#9
my local sources are already in sync with kodi github

this is the output: https://paste.kodi.tv/uquyaculog.kodi
Dev-Maintainer of InputStream Adaptive add-on, Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
Reply
#10
Compilazione di "D:\kodi-build\build\swig\python_binding.vcxproj" (19) dal progetto "D:\kodi-build\libkodi.vcxproj" (16) sul nodo 1 (destinazioni predefinite). PrepareForBuild: Creazione directory "python_binding.dir\Release\". Creazione directory "D:\kodi-build\build\swig\Release\". Creazione directory "python_binding.dir\Release\python_binding.tlog\". InitializeBuildStatus: Creazione di "python_binding.dir\Release\python_binding.tlog\unsuccessfulbuild". Ô stato specificato "AlwaysCreate".
CustomBuild: Generating AddonModuleXbmcaddon.i.cpp fatal: not a git repository (or any of the parent directories): .git Problem while looking for clang-format in Chromium source tree: Could not find checkout in any parent of the current path. Set CHROMIUM_BUILDTOOLS_PATH to use outside of a chromium checkout
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'D:\kodi-build\CMakeFiles\c614df71cda2904a624b0e4a7a149b76\AddonModuleXbmcaddon.i.cpp.rule;D:\kodi-build\CMakeFiles\c614df71cda2904a624b0e4a7a149b76\AddonModuleXbmcdrm.i.cpp.rule;D:\kodi-build\CMakeFiles\c614df71cda2904a624b0e4a7a149b76\AddonModuleXbmcgui.i.cpp.rule;D:\kodi-build\CMakeFiles\c614df71cda2904a624b0e4a7a149b76\AddonModuleXbmc.i.cpp.rule;D:\kodi-build\CMakeFiles\c614df71cda2904a624b0e4a7a149b76\AddonModuleXbmcplugin.i.cpp.rule;D:\kodi-build\CMakeFiles\c614df71cda2904a624b0e4a7a149b76\AddonModuleXbmcvfs.i.cpp.rule;D:\kodi-build\CMakeFiles\c614df71cda2904a624b0e4a7a149b76\AddonModuleXbmcwsgi.i.cpp.rule;D:\GIT\kodi\xbmc\interfaces\swig\CMakeLists.txt' exited with code 1. [D:\kodi-build\build\swig\python_binding.vcxproj] Compilazione progetto "D:\kodi-build\build\swig\python_binding.vcxproj" (destinazioni predefinite) NON COMPLETATA.


No idea what's going on here, but looks like something in your local environment. Something for the windows devs. @Paxxi  maybe?
Reply
#11
im sorry for the noisy...i have found the problem

after a long research i have found that this message:
"Set CHROMIUM_BUILDTOOLS_PATH to use outside of a chromium checkout"
come from google depot tools that i have installed to build shaka packager

i think that depot tools override some build utils
after removed the PATH to depot tools, kodi build now works!
my bad...
Dev-Maintainer of InputStream Adaptive add-on, Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
Reply
#12
Thread marked solved.
Reply

Logout Mark Read Team Forum Stats Members Help
Matrix 19.1 - Can't compile0