Win Building addons
#1
Hi there,

so i build Kodi successfully from the retroplayer-15alpha2 branch and could start it. I then tried to build the addons as told using the generated kodi-addons.sln. Unfortunately only game.libretro managed to build - both game.libretro.nestopia as well as peripheral.joystick failed.

I digged through all the scripts, cmake files and batches but hell this is a complicated buildscript beast Smile I couldnt find any hint as to what exactly is going wrong so i thought some of you guys might be able to help.

So game.libretro.nestopia says (http://pastebin.com/5uHgrGpy) :

The error seems to be:
Code:
4> Performing build step for 'nestopia'
4> Der Befehl "mingw32-make" ist entweder falsch geschrieben oder konnte nicht gefunden werden.

I dont know why hes complaining bout this because part of kodi building was executing "DownloadMingwBuildEnv.bat" which dl'ed exactly this and i even checked if its there (it is). So something in the cmake files might be going wrong? But again im kind of lost in all these different makefiles calling each other.

The second one peripheral.joystick is even funnier (http://pastebin.com/9EV46bqi) :

Code:
4>------ Neues Erstellen gestartet: Projekt: peripheral.joystick (ExternalProjectTargets\peripheral.joystick\peripheral.joystick), Konfiguration: Debug Win32 ------
4>  Building Custom Rule D:/Dev/xbmc_dev/retroplayer/project/cmake/addons/CMakeLists.txt
4>  CMake does not need to re-run because D:\Dev\xbmc_dev\retroplayer\project\cmake\addons\build\CMakeFiles\generate.stamp is up-to-date.
4>  Creating directories for 'peripheral.joystick'
4>  No download step for 'peripheral.joystick'
4>  No update step for 'peripheral.joystick'
4>  No patch step for 'peripheral.joystick'
4>  Performing configure step for 'peripheral.joystick'
4>  -- Checking to see if CXX compiler accepts flag -flto
4>  -- Checking to see if CXX compiler accepts flag -flto - yes
4>  -- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
4>  -- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
4>  -- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
...
...
...

It goes on for a while trying to find PkgConfig until cmake crashes and then quits building. Im even more lost here because 1st i dont know why hes endlessly looping to try finding pckconfig and 2nd where this dependency comes from.

So guys, any clues? Im on win7, kodi build and i verified that all dependency loading scripts went through and i now dont know what else to do Big Grin

Thanx for your time!
Reply
#2
First of all the win32 addon buildsystem doesn't have MinGW integration (yet).
Secondly we don't support PkgConfig on win32 either (although I heard it would be possible).

So all in all it looks like the game addon buildsystems have only been written with linux (and maybe OSX) in mind so far.

I have done the win32 integration of the whole binary addon buildsystem but I never looked at game/peripheral addons so far because they aren't part of mainline.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
As far as I know they should compile as garbear works on OSX and Windows.
Please make sure you did read the Readme.md of the corresponding addon:
https://github.com/kodi-game/game.libretro.nestopia

Under the Windows section there's explicitly stated that you need to install MinGW and add it to your path.
Seems you missed this one.

Other than that I do not work on windows myself, so I won't be of much help here.
Reply
#4
Concerning the PkgConfig problem see my comment in https://github.com/kodi-game/peripheral....f4e36ede60 as to why it happens.

@a1rwolf: It doesn't look like this was tested on win32 because we don't support pkg-config there. The commit linked above even says "Only linux side is handled ATM".
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#5
I see - sorry for the misleading information then.
Reply
#6
(2015-04-24, 08:24)a1rwolf Wrote: Please make sure you did read the Readme.md of the corresponding addon:
https://github.com/kodi-game/game.libretro.nestopia

Under the Windows section there's explicitly stated that you need to install MinGW and add it to your path.
Seems you missed this one.

Good find! I came from garbears xbmc repo installation instructions which only mentioned "To build game add-ons, follow the building in-tree instructions from the game.libretro readme" which in this case doesnt mention that mingw path has to be set on win. Ill see if i can add that to the instructions there.

(2015-04-24, 10:02)Montellese Wrote: Concerning the PkgConfig problem see my comment in https://github.com/kodi-game/peripheral....f4e36ede60 as to why it happens.

@a1rwolf: It doesn't look like this was tested on win32 because we don't support pkg-config there. The commit linked above even says "Only linux side is handled ATM".

Ah your the one who build this, kudos for that, im having a hard time seeing through it Big Grin

Anyways.
So, i added the mingw path to the installation which is already there (came with kodis msys) and nestopia builds now. Can you provide a hint what has to be changed that cmake uses this automatically?

After that i tried the joystick lib again and came a bit further (http://pastebin.com/A0w1awhP):
Despite your sayings it seems to use the pkg-config from the mingw folder now.
Code:
4>  -- Found PkgConfig: D:/Dev/xbmc_dev/retroplayer/project/BuildDependencies/msys/mingw/bin/pkg-config.exe (found version "0.28")

Now it complains about missing sdl and some linux includes (syslog.h missing is breaking it), so i guess it really comes down that this part has not yet been adapted for the win32 buildsystem.

Code:
4>D:\Dev\xbmc_dev\retroplayer\project\cmake\addons\build\peripheral.joystick\src\log\LogSyslog.cpp(24): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "syslog.h": No such file or directory [D:\Dev\xbmc_dev\retroplayer\project\cmake\addons\build\peripheral.joystick-prefix\src\peripheral.joystick-build\peripheral.joystick.vcxproj]

I searched the mingw folder but it doesnt seem to include a syslog.h - whats the usual workaround for this on win?

@Montellese: What are the chances you can have look at this until garbear comes back in two month? Smile

Thanks so far for your help!
Reply
#7
(2015-04-24, 11:45)aquiles2k Wrote: Anyways.
So, i added the mingw path to the installation which is already there (came with kodis msys) and nestopia builds now. Can you provide a hint what has to be changed that cmake uses this automatically?

The buildsystem is not responsible for making the buildtools accessible.
IMHO this is part of the developer, correct me if I'm wrong...
Reply
#8
(2015-04-24, 11:45)aquiles2k Wrote: @Montellese: What are the chances you can have look at this until garbear comes back in two month? Smile
Not very high since I've got a lot of other stuff to do.

(2015-04-24, 12:50)a1rwolf Wrote: The buildsystem is not responsible for making the buildtools accessible.
IMHO this is part of the developer, correct me if I'm wrong...

We'll have to disagree on that. Check out our depends buildsystem which builds almost everything from autotools over cmake to other libraries. We have to do this due to cross-release builds.

Obviously cross-compiling is not an issue on Windows and we expect certain build tools to be present like Visual C++ compiler, DirectX SDK and Java but e.g. SDL must be provided by the buildsystem and the same goes for MinGW because you can't expect the developer to have MinGW set up with exactly the libraries installed that you need. This is why we have a pre-build step for downloading and setting up MSYS and MinGW but it's simply not integrated into the cmake buildsystem (yet).
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#9
Sure but what i meant was that the buildsystem already offically (by official i mean there are batch files in the repo which download mingw as part of building kodi on win [link]) provides a mingw installation to build libs like ffmpeg for win.

So this can surely be reused, it just needs to be propagated to cmake i think, correct me if im wrong Smile
Reply
#10
Ah Montellese was faster, ignore my previous post Smile

Ill suppose i then have to see what i can achieve by myself.
Reply
#11
(2015-04-24, 13:39)Montellese Wrote: We'll have to disagree on that. Check out our depends buildsystem which builds almost everything from autotools over cmake to other libraries. We have to do this due to cross-release builds.

Obviously cross-compiling is not an issue on Windows and we expect certain build tools to be present like Visual C++ compiler, DirectX SDK and Java but e.g. SDL must be provided by the buildsystem and the same goes for MinGW because you can't expect the developer to have MinGW set up with exactly the libraries installed that you need. This is why we have a pre-build step for downloading and setting up MSYS and MinGW but it's simply not integrated into the cmake buildsystem (yet).

Got it. Under the given aspect I can agree with your point.
My first thought was that the MinGW installation is like for Visual C++ compiler in the responsibility of the dev.
Given, that it is possible to create the needed environment automagically, it should of course be done Smile
Reply
#12
Just FYI, with the newest version from the repo i now get the 3 mentioned kodi addons (libretro, nes core and joystick peripheral) to compile on windows (with mingw bin set in PATH).
Reply
#13
In case anyone is interested I've taken a look at the MinGW problem and have come up with https://github.com/Montellese/xbmc/commits/cmake_mingw which will download the same MSYS/MinGW environment as we use in our normal dependency build scripts but this one is integrated into the cmake buildsystem for binary addons.

I have merged that branch with garbear's retroplayer-15alpha2 into https://github.com/Montellese/xbmc/commi...r-15alpha2. With a few minor adjustments to https://github.com/kodi-game/game.libretro.nestopia I was able to build it with the integrated MinGW using https://github.com/Montellese/game.libre...in32_mingw. That way you don't need MinGW in your PATH anymore.

I only did some very basic tests and I was able to launch Super Mario Bros. with the Nestopia game emulator but I don't have any input controller setup so I wasn't able to actually play the game.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#14
Cool, thanks for your efforts, that will ease it alot - i will test it this evening.

Just a quick question, what are the chances to switch to some more recent compiler like 4.9.2 any time soon? I remember getting compiler errors when using the old provided 4.6.2. while fiddling with the desmume core.

Anyway thanks again!
Reply
#15
(2015-05-18, 11:57)aquiles2k Wrote: Just a quick question, what are the chances to switch to some more recent compiler like 4.9.2 any time soon? I remember getting compiler errors when using the old provided 4.6.2. while fiddling with the desmume core.

TBH I just took the exact same packages that we currently use to build ffmpeg et al. Any changes to it would also have to be compatible with that build environment.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply

Logout Mark Read Team Forum Stats Members Help
Building addons0