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)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45


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

(2019-04-11, 16:00)sy6sy2 Wrote: Alternatively I can use the "delete _CodeSignature and embedded.provisioning" hack each time I want to Run kodi on the device until I find the source of this error.

it's not an issue with Kodi but rather with Xcode, as occasionally I have this issue when doing iOS development as well and still haven't found the real reason or a better workaround. You could also write a simple script that would do it automatically for you and put it in a run script phase of Xcode project.
(2019-04-11, 16:03)phunkyfish Wrote: So I just built for tvOS using Xcode 9 and tried to deploy. This of course failed as Xcode 9 doesn't support 12.2.

this can be easily resolved: just copy or make a symbolic link of directory /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/DeviceSupport/12.2* into same path of Xcode 9 and restart Xcode if it's running.

Btw tvOS build doc says
Quote:Xcode 10.x against tvOS SDK 12.x on 10.14.x (Mojave)(recommended)
but I'm doing Xcode 10/SDK 12 on 10.13 just fine Smile


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

Ya, they were just the combinations I tested the builds on!


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

one hint: if you're running app multiple times without making code changes, better press cmd+ctrl+R (run without building) instead of cmd+R to save some time


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

Nice, also came across another run problem. Got the error: "App installation failed - no code signature found". Fixed by going to the build phases of the kodi target and checking "Code sign on copy" for all the copy files targets.

"delete _CodeSignature and embedded.provisioning" seems to work as a fix for this. Have to do it every time.


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

I did not know the tip about CMD+CTRL+R! Thank you.

Hum, interesting, I will check about this settings.


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

So what will our next steps be? I guess we need to start fixing the startup issues now that we have many workarounds to our collective build and deploy issues!


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

@kambala did you get past the settings issues?

If I run it now I get this error:

Code:

dyld: Library not loaded: @executable_path/Frameworks/libbluray.2.dylib
  Referenced from: /var/containers/Bundle/Application/78AB90CF-F2E5-4FEB-B18A-FBFC01AFC8C0/Kodi.app/Kodi
  Reason: no suitable image found.  Did find:
/var/containers/Bundle/Application/78AB90CF-F2E5-4FEB-B18A-FBFC01AFC8C0/Kodi.app/Frameworks/libbluray.2.dylib: code signature invalid for '/var/containers/Bundle/Application/78AB90CF-F2E5-4FEB-B18A-FBFC01AFC8C0/Kodi.app/Frameworks/libbluray.2.dylib'

/private/var/containers/Bundle/Application/78AB90CF-F2E5-4FEB-B18A-FBFC01AFC8C0/Kodi.app/Frameworks/libbluray.2.dylib: code signature invalid for '/private/var/containers/Bundle/Application/78AB90CF-F2E5-4FEB-B18A-FBFC01AFC8C0/Kodi.app/Frameworks/libbluray.2.dylib'

/private/var/containers/Bundle/Application/78AB90CF-F2E5-4FEB-B18A-FBFC01AFC8C0/Kodi.app/Frameworks/libbluray.2.dylib: stat() failed with errno=1

Which means the code signing is not working at all now. Sad


RE: TvOS Kodi Build - pogar - 2019-04-11

(2019-04-11, 11:40)sy6sy2 Wrote: Hi pogar,

Glad to see people interested and involved in this project :-D

The current development repo is https://github.com/SylvainCecchetto/xbmc/tree/ATV.

The majority stuff was imported from here https://github.com/Memphiz/xbmc/tree/yab where you can find a working version of Kodi 17 for Apple TV.

You can find the build guide here https://github.com/SylvainCecchetto/xbmc/blob/ATV/docs/README.tvOS.md

Right now Kodi crash on start up, but a least we can build it ;-)

so I've just tried:

* git clone -b ATV https://github.com/SylvainCecchetto/xbmc
* cd tools/depends/
* ./bootstrap
* ./configure --host=arm-apple-darwin --with-cpu=arm64 --with-platform=tvos
and I got an error:
Code:
checking for "*86"... arm64 is not "*86"
./configure: line 3252: /Library/Developer/CommandLineTools/usr/bin/xcodebuild: No such file or directory
configure: error: error in configure of --with-sdk=

Xcode 10.2, macOS 10.14.4 , java installed today. 

:-(

EDIT: solved by 
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

EDIT2: got an error on "make -j$(getconf _NPROCESSORS_ONLN)" part:

Code:

make[2]: Nothing to be done for `all'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C TexturePacker
make[3]: *** No targets specified and no makefile found.  Stop.
make[2]: *** [x86_64-osx-native/src/tar] Error 2
make[1]: *** [tar-native] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: Nothing to be done for `all'.

(...)

touch .installed-x86_64-osx-native
make: *** [native/.installed-x86_64-osx-native] Error 2
not idea what is wrong..


RE: TvOS Kodi Build - pogar - 2019-04-11

<to be deleted>


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

@pogar you might need to start from scratch. I think xcode select would have needed to be run prior to any of the steps.

And just run "make" instead of "make -j$(getconf _NPROCESSORS_ONLN)". Then at least you will get to see the error. Using the latter is multithreaded so the error can be hidden in the output.


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

@kambala @sy6sy2

No matter what I try now there is no way I have to get this running where all the files are signed. I always get the errors above.

Can either of you provide the order of targets you run to get a real crash on start as opposed to a signing error?


RE: TvOS Kodi Build - pogar - 2019-04-11

(2019-04-11, 19:16)phunkyfish Wrote: @pogar you might need to start from scratch. I think xcode select would have needed to be run prior to any of the steps.

And just run "make" instead of "make -j$(getconf _NPROCESSORS_ONLN)". Then at least you will get to see the error. Using the latter is multithreaded so the error can be hidden in the output.

thanks, I'll try. I had some Errors 23 and did build as root. Trying again .
xcode-select run once seems to be enough.


TvOS Kodi Build - Memphiz - 2019-04-11

There is a reason we use a build phase for manually signing the app - it does a proper deep sign of all binaries including extensions Xcode would never sign (like python eggs).
Look up the iOS build or have a look into tools/Darwin/support/ (something with code sign script).

Just no time to catch up on your work but you are doing good it seems Wink.

Integration into upstream can start after leia is branched off and master is free for v19 commits again. It should start with adding the depends support back in again as PR1 and have the rest as PR2.
I fear the PR2 makes no sense to merge until it’s clear that the goal is achievable.

So if you have a state we’re remote and video playback works - I might be able to add Jenkins support for tvOS.
It makes no sense to merge a new platform without ensuring it does not get compile broken by others ...


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

currently trying to figure out the settings error.

@phunkyfish  I don't have any issues with signing. I simply run the kodi target. Maybe try to build ALL_BUILD target first, I think I did that at one point in the past.


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

(2019-04-11, 21:04)kambala Wrote: currently trying to figure out the settings error.

@phunkyfish  I don't have any issues with signing. I simply run the kodi target. Maybe try to build ALL_BUILD target first, I think I did that at one point in the past.

Hmmm, when was the last time you updated your ATV branch?

I did a fresh checkout this morning. I wonder did something change.