Kodi Community Forum

Full Version: Building HDHomeRun PVR on Windows - Cannot load DLL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I think I successfully built the DLL, which was copied to the Kodi build tree along with the XML and .po files. There is one error in the build, which I have not yet figured out:

Code:
3>  Performing gitconfig step: Disabling autocrlf to enable patching for 'hdhomerun'
3>  fatal: pathspec '.' did not match any files
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 128.

I get a pop-up message saying the PVR cannot be loaded, and in the debug log I see these entries:

Code:
15:27:44.629 T:23564   DEBUG: PVR - PVR::CPVRClient::Create - creating PVR add-on instance 'PVR HDHomeRun Client'
15:27:44.629 T:23564   DEBUG: ADDON: Dll Initializing - PVR HDHomeRun Client
15:27:44.629 T:23564   DEBUG: SECTION:LoadDLL(C:\Kodi-Build\xbmc\kodi-build\addons\pvr.hdhomerun\pvr.hdhomerun.dll)
15:27:44.631 T:23564   ERROR: Win32DllLoader::Load: Failed to load "C:\Kodi-Build\xbmc\kodi-build\addons\pvr.hdhomerun\pvr.hdhomerun.dll" with error 126: "The specified module could not be found.

                                            "

Full log is here: https://pastebin.com/CR9VAkDd

There is nothing in the Windows event log.

Any clues to get me further? Ideas of things to check or try?
full build log required.
From the error I'd guess https://github.com/kodi-pvr/pvr.hdhomeru...un/1.patch fails to apply
It must be related to the way I have downloaded the code.

I put the libhdhomerun code beside the xbmc and pvr.hdhomerun directories, and modified the Findhdhomerun.cmake file to suit. However, it looks like the PVR code wants to download the libhdhomerun files by itself. This did not happen and I just got an error, however this was before I fixed the typo in the Windows configuration command; there is a missing space in the upstream (xbmc repo).

How do you build this for inclusion into a Kodi release?

Output from the configuration command
Code:
set ROOT=%~dp0\..\..
cmake -G "Visual Studio 14" -DADDONS_TO_BUILD=pvr.hdhomerun -DCMAKE_BUILD_TYPE=Release -DADDON_SRC_PREFIX=%ROOT% -DCMAKE_INSTALL_PREFIX=%ROOT%\xbmc\addons -DCMAKE_USER_MAKE_RULES_OVERRIDE=%ROOT%\xbmc\cmake\scripts\windows\CFlagOverrides.cmake -DCMAKE_USER_MAKE_RULES_OVERRIDE_CXX=%ROOT%\xbmc\cmake\scripts\windows\CXXFlagOverrides.cmake -DPACKAGE_ZIP=1 %ROOT%\xbmc\cmake\addons

https://pastebin.com/XS4RfeFf

Output from the build command
Code:
set ROOT=%~dp0\..\..
cmake --build . --config Release

https://pastebin.com/gtEir9A6

Output from Visual Studio, rebuild target ALL_BUILD: https://pastebin.com/7S7dTiqd
And this was enough of a clue to get it running.

I built the HDR code as a DLL, per the SD instructions. The pvr.hdhomerun expects static linking.

I know that this it the problem, because copying the libhdhomerun.dll to the same directory as the pvr.hdhomerun.dll in the Kodi addon tree allows the code to load and run.

I'm still worried about the incorrect configure command. How do you guys build this? I've fixed a few problems in this PVR already, but there are more to go. In particular, it is still using strStreamURL.