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 - phunkyfish - 2019-04-12

(2019-04-12, 16:18)kambala Wrote: created PR https://github.com/SylvainCecchetto/xbmc/pull/12, but it looks kinda strange after the upstream merge. Is there anything I can do about it?
(2019-04-12, 15:10)phunkyfish Wrote: Also put in a PR for build doc updates.

sorry, not sure what you mean. Update what exactly in the build doc? 

Changes like omitting arm64 from the configure call etc. Nothing major


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

(2019-04-12, 16:18)kambala Wrote: created PR https://github.com/SylvainCecchetto/xbmc/pull/12, but it looks kinda strange after the upstream merge. Is there anything I can do about it?
  

It's because history was rewritten. When this happens here is what I do.

For each commit that you made (we are esentially storing each commit in a stash to reapply later):
Code:
git reset HEAD~1
git stash push -m "Commit name"

Now delete the ATV branch, and check it out again (this will give you a rewritten history)

Now:
Code:
git stash list

And for each commit you have stashed (in reverse order):
Code:
git stash pop <stash-hash>
git add -u
git commit -m "Commit name"

Just make a copy of the repo before you try anything so you can get back to where you started if anything goes terribly wrong. There might be an easier way to do this but I know the above works.


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

@phunkyfish thank you very much, created proper PR


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

(2019-04-12, 17:42)kambala Wrote: @phunkyfish thank you very much, created proper PR

You’re very welcome. I look forward to testing it out once merged.


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

Hi all!
Nice to see progress!

I will merge your codes, thank you.

Edit: Merge and update ATV to upstream/master. Will try to build dependencies from scratch.


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

Maybe we should just stick with the ATV branch for the moment @sy6sy2 

Until the Leia branch nothing can happen with the depends PR anyway.


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

@sy6sy2 why merge master with the ATV branch?

Did you mean to rebase instead?


RE: TvOS Kodi Build - Fuzzard - 2019-04-12

I believe ive figured out your depends build issue. The below is the current code in tools/depends/target/openssl/Makefile

cpp:

    if test "$(OS)" = "tvos"; then \
        sed -E -ie "s|^CFLAGS=-|CFLAGS=$(CFLAGS) -|" "$(PLATFORM)/Makefile"; \
        sed -ie "s|-isysroot \$$(CROSS_TOP)/SDKs/\$$(CROSS_SDK) ||" "$(PLATFORM)/Makefile"; \
        sed -ie "s|static volatile sig_atomic_t intr_signal;|static volatile intr_signal;|" "$(PLATFORM)/crypto/ui/ui_openssl.c"; \
        sed -i -- 's/define HAVE_FORK 1/define HAVE_FORK 0/' "$(PLATFORM)/apps/speed.c"; \
        sed -i -- 's/D\_REENTRANT\:iOS/D\_REENTRANT\:tvOS/' "$(PLATFORM)/Configure"; \

autoreconf is running after the reentrant change (Line 6 above), which then blows away the earlier cflag Makefile changes (Line 1 and 2). Hence why its not an issue in iOS builds, and is new to this tvos build. Also explains why the Makefilee file (backup from the sed -E command btw (Line 1)) has the correct cflags
Below is my suggested change diff. Have tested on a single thread and multi thread complete build of the depends system, and works as expected now.

cpp:

diff --git a/tools/depends/target/openssl/Makefile b/tools/depends/target/openssl/Makefile
index 31e0a15..feb22e8 100644
--- a/tools/depends/target/openssl/Makefile
+++ b/tools/depends/target/openssl/Makefile
@@ -53,11 +53,11 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
 
        # Stolen pathes here: https://gist.github.com/felix-schwarz/c61c0f7d9ab60f53ebb0 
        if test "$(OS)" = "tvos"; then \
+                sed -i -- 's/D\_REENTRANT\:iOS/D\_REENTRANT\:tvOS/' "$(PLATFORM)/Configure"; \
                sed -E -ie "s|^CFLAGS=-|CFLAGS=$(CFLAGS) -|" "$(PLATFORM)/Makefile"; \
                sed -ie "s|-isysroot \$$(CROSS_TOP)/SDKs/\$$(CROSS_SDK) ||" "$(PLATFORM)/Makefile"; \
                sed -ie "s|static volatile sig_atomic_t intr_signal;|static volatile intr_signal;|" "$(PLATFORM)/crypto/ui/ui_openssl.c"; \
                sed -i -- 's/define HAVE_FORK 1/define HAVE_FORK 0/' "$(PLATFORM)/apps/speed.c"; \
-                sed -i -- 's/D\_REENTRANT\:iOS/D\_REENTRANT\:tvOS/' "$(PLATFORM)/Configure"; \
        fi



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

Well done, it’s will certainly help being able to run multi-threaded builds.

Testing this and will then create a PR for it.

I also created a PR for visualization.waveform binary addon for tvos. It was rightly pointed out that since support for tvOS was not decided yet addons should not be changed. Completely fair.


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

@sy6sy2 just wondering what set up you have to figure out the right way to rebase.

Do you:

a) Have a clone of https://github.com/xbmc/xbmc locally?

or

b) Have a clone of your fork at https://github.com/SylvainCecchetto/xbmc locally?


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

I think I did not express myself well concerning the merge.

I have a local clone of https://github.com/SylvainCecchetto/xbmc.

What I did:

1. git checkout ATV
2. git fetch upstream (https://github.com/xbmc/xbmc)
3. git merge upstream/master
4. git push

Not sure if is it the right way to keep ATV up to date with upstream master.
Maybe I should do:

1. git checkout ATV
2. git fetch upstream (https://github.com/xbmc/xbmc)
3. git rebase upstream/master
4. git push --force

??


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

Let me try a few things with the local repo.

The current method is problematic as it interleaves the ATV branch commits with upstream master. What we really want is the upstream master commits first and the ATV branch commits on top.


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

Yes, your rebase suggestion looks to be correct.

However you have to undo the merge commit first (assumes the merge commit is the latest):
  1. git checkout ATV
  2. git reset --hard HEAD~1
  3. git fetch upstream (https://github.com/xbmc/xbmc)
  4. git rebase upstream/master
  5. git push --force
The above should work. Maybe try on a fresh clone to make sure it works as expected.

This should also work (this also allows us to update master in the fork):
  1. git checkout master
  2. git pull upstream master (https://github.com/xbmc/xbmc)
  3. Optional: git push (would sync fork master with upstream master I think)
  4. git checkout ATV
  5. git reset --hard HEAD~1 (undo merge commit)
  6. git rebase master
  7. git push --force
My internet connection is a bit unreliable today so havn't tested either of the above but they both should work.


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

Thank you very munch for your help.
I never know if I should merge or rebase because the merge involves a new commit "merge ..." but there is no need to push force.
On another side the rebase seems to do things cleaner (no additional merge commit) but I have to push force ...

Anyway I just deleted the merge commit and rebased on ATV. Everything seems ok.

I can now try to build dependencies from scratch just to be sure everything is OK.


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

I have built them, and with the fix @Fuzzard gave above so can be built multi threaded. Creating PR shortly.

You would tend to avoid rebase on a shared repo as force pushing a branch can mess up work in progress for other contributors. Best to announce if you need to do that or to it on the same interval (i.e. a rebase happens each friday, please have your commits in by thursday night and take a fresh clone afterwards).