Kodi Community Forum
TvOS Kodi Build - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: iOS & tvOS (https://forum.kodi.tv/forumdisplay.php?fid=137)
+---- Thread: TvOS Kodi Build (/showthread.php?tid=312805)



RE: TvOS Kodi Build - phunkyfish - 2019-04-07

I tried to build depends on xcode 10.2 (9 works just fine).

Fails on openssl: https://gist.github.com/phunkyfish/fb43a24577e56446fc0730bb9fc10251

It appears that sysroot is incorrectly set to /SDKS/, something to do with $CROSS_TOP and $CROSS_SDK being empty or not set correctly.

Could also be a setup error in Xcode 10.2, which I'm not that familiar with.

Any ideas?


RE: TvOS Kodi Build - sy6sy2 - 2019-04-07

Already had this error a few time ago but I don't remember how I fixed it Undecided
But I think that is related to your system and not to config files.

Last night I did a build from scratch and I had no problem during the depends build with Mojave and Xcode 10.2.

Did you just upgrade your Xcode?


RE: TvOS Kodi Build - phunkyfish - 2019-04-07

(2019-04-07, 10:05)sy6sy2 Wrote: Already had this error a few time ago but I don't remember how I fixed it Undecided
But I think that is related to your system and not to config files.

Last night I did a build from scratch and I had no problem during the depends build with Mojave and Xcode 10.2.

Did you just upgrade your Xcode?
Yes, I wanted to check that the xcode 9 support change didn't effect xcode 10 builds. 

After I installed Xcode 10.2 I had to run the following so I could build just for MacOSX:
Code:
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

The strange this is that when I build for MacOSX sysroot is set correctly to:
Code:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/

But on AppleTVOS sysroot should be set to:
Code:
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/

But instead is set to:
Code:
/SDKs/

I think there is something TVOS specific missing somewhere that correctly defines these.


RE: TvOS Kodi Build - phunkyfish - 2019-04-07

Ah, so the fact I had to run:
Code:
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

on macOSX just for openssl means the issue persists there too. So sysroot is not calculated correctly for openssl but it is for all other targets.


RE: TvOS Kodi Build - sy6sy2 - 2019-04-07

Hum very strange Undecided Did you find why?

On my side I just pushed some other commit. It seems that libkodi build and link correctly now!

I have just an error at this end of the build process with a bash file:

bash:
Error copying file "/Users/sylvain/Kodi_dev/kodi-build/build/Debug-appletvos/kodi.bin.app/kodi.bin" to "/Users/sylvain/Kodi_dev/kodi-build/build/Debug-appletvos/kodi.bin.app/Kodi.bin".

But I am not at home to try on my Apple TV. But pretty sure that a lot of things will not working as expected xD

Edit: This error seems to come form line 37 of Cmake/script/tvos/install.cmake file.


RE: TvOS Kodi Build - phunkyfish - 2019-04-07

I think it's cause we don't set CROSS_TOP and CROSS_SDK in configure.ac/Makefile.include.in. Trying out a fix now.

Looks like you're close. Will be cool to see what happens on first run (if anything)! I wonder will the simulator work also.


RE: TvOS Kodi Build - sy6sy2 - 2019-04-07

Thank you.

Don't know if the simulator can works with Kodi (I'm not even sure it works with iOS) because (maybe I'm wrong) we have to compile dependencies for x86 because I think that the simulator use x86 (it's not like a "real" emulator).


RE: TvOS Kodi Build - kambala - 2019-04-08

(2019-04-07, 19:00)sy6sy2 Wrote: Thank you.

Don't know if the simulator can works with Kodi (I'm not even sure it works with iOS) because (maybe I'm wrong) we have to compile dependencies for x86 because I think that the simulator use x86 (it's not like a "real" emulator).

x86_64, to be precise


RE: TvOS Kodi Build - phunkyfish - 2019-04-08

Probably more trouble than it’s worth to try and get the simulator running. Cross compiling is tricky enough as it is.


RE: TvOS Kodi Build - phunkyfish - 2019-04-08

So it appears my issue with Openssl on building the tools on XCode 10 was nothing more than bad install. Removing Xcode and re-installing fixed all the issues.


RE: TvOS Kodi Build - sy6sy2 - 2019-04-08

Good news!

On my side I just cloned the master branch in order to build Kodi separately for iOS in order to see what happen.

Don't understand yet why I get the Cmake error with tvOS because this is the same command on iOS an everything works.

Code:
PhaseScriptExecution CMake\ PostBuild\ Rules /Users/sylvain/Kodi_dev/kodi-build/kodi.build/Debug-appletvos/kodi.build/Script-3BA0378B522A453197E52343.sh
    cd /Users/sylvain/Kodi_dev/kodi
    /bin/sh -c /Users/sylvain/Kodi_dev/kodi-build/kodi.build/Debug-appletvos/kodi.build/Script-3BA0378B522A453197E52343.sh

/Users/Shared/xbmc-depends/x86_64-darwin18.5.0-native/bin/cmake -E copy /Users/sylvain/Kodi_dev/kodi-build/build/Debug-appletvos/kodi.bin.app/kodi.bin /Users/sylvain/Kodi_dev/kodi-build/build/Debug-appletvos/kodi.bin.app/Kodi.bin
Error copying file "/Users/sylvain/Kodi_dev/kodi-build/build/Debug-appletvos/kodi.bin.app/kodi.bin" to "/Users/sylvain/Kodi_dev/kodi-build/build/Debug-appletvos/kodi.bin.app/Kodi.bin".
make: *** [kodi_buildpart_0] Error 1
Command /bin/sh failed with exit code 2



RE: TvOS Kodi Build - phunkyfish - 2019-04-08

It's copying the same file to the same file, it that what's intended? Doesn't really make sense.


RE: TvOS Kodi Build - sy6sy2 - 2019-04-08

No really, it is copying "kodi.bin" to "Kodi.bin" (with an uppercase 'K')


RE: TvOS Kodi Build - phunkyfish - 2019-04-08

Jeez, that’s not easy to spot.

Can you run the command manually? Is it because the file already exists or has the wrong permissions?


RE: TvOS Kodi Build - phunkyfish - 2019-04-09

So I finally opened the file in XCode and hit build. Instant fail Sad

A lot of unsupported arch errror's etc. Is there some manual setup I need to do in Xcode?