Add Kodi snap for stable release. #197

Merged
merged 11 commits into from Aug 10, 2016

Conversation

Projects
None yet
2 participants
Contributor

dgmvecuador commented Jul 27, 2016

Add a snap for Kodi for the last stable tag "16.1-Jarvis"

checking mpeg2dec/mpeg2.h usability... no
checking mpeg2dec/mpeg2.h presence... no
checking for mpeg2dec/mpeg2.h... no
configure: error: Could not find a required library. Please see the README for your platform.
Command '['/bin/sh', '/tmp/tmpudwgxd8_', './configure', '--prefix=', '--prefix=/']' returned non-zero exit status 1```
- <a href='https://github.com/dholbach'><img border=0 src='https://avatars.githubusercontent.com/u/1346979?v=3' height=16 width=16'></a> On my machine locally it fails with

checking for LIBDCADEC... no
configure: error: libdcadec not found
Command '['/bin/sh', '/tmp/tmpwwmf3jxr', './configure', '--prefix=', '--prefix=/']' returned non-zero exit status 1

- <a href='https://github.com/dholbach'><img border=0 src='https://avatars.githubusercontent.com/u/1346979?v=3' height=16 width=16'></a> Can we somehow adjust where ffmpeg comes from? This is how the build fails (both using 'snapcraft' or 'snapcraft cleanbuild'): http://paste.ubuntu.com/21252125/
- <a href='https://github.com/dholbach'><img border=0 src='https://avatars.githubusercontent.com/u/1346979?v=3' height=16 width=16'></a> :+1:<a href='#crh-update-none'></a>
- <a href='https://github.com/dgmvecuador'><img border=0 src='https://avatars.githubusercontent.com/u/406504?v=3' height=16 width=16'></a> Kodi developers usually recommend to use version of ffmpeg provided inside the code, so we should use that one.  They update ffmpeg each major release.
- <a href='https://github.com/dholbach'><img border=0 src='https://avatars.githubusercontent.com/u/1346979?v=3' height=16 width=16'></a> Ok, let's pick whatever works. Can you apply the patch I specified earlier? That way you should see in the next Travis build how it's currently failing. Currently it's missing some build-packages.
- <a href='https://github.com/dgmvecuador'><img border=0 src='https://avatars.githubusercontent.com/u/406504?v=3' height=16 width=16'></a> I have applied your patch and other changes. Now the build is successful in Travis
- <a href='https://github.com/dholbach'><img border=0 src='https://avatars.githubusercontent.com/u/1346979?v=3' height=16 width=16'></a> Great work!
When I try to run it, I see this though:
daniel@daydream:~/dev/snappy/snappy-playpen/kodi-stable$ kodi
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
And I get a black screen. Anything I'm missing?
- <a href='https://github.com/dgmvecuador'><img border=0 src='https://avatars.githubusercontent.com/u/406504?v=3' height=16 width=16'></a> Its a problem with opengl libs, there are multiple bugs reported like https://bugs.launchpad.net/snappy/+bug/1574851
As workaround, you can copy your driver libs to the folder "/var/lib/snapd/lib/gl/" in my case, I copied all the content of "/usr/lib/nvidia-xxx". I dont know about your graphic card, but it seems to work with intel without problems.
- <a href='https://github.com/dholbach'><img border=0 src='https://avatars.githubusercontent.com/u/1346979?v=3' height=16 width=16'></a> I'm on intel too (i915).
- <a href='https://github.com/dgmvecuador'><img border=0 src='https://avatars.githubusercontent.com/u/406504?v=3' height=16 width=16'></a> You should copy all the libs from Intel, "i965_dri.so" and the dependencies to "/var/lib/snapd/lib/gl/", maybe check the deb package from the repository.
- <a href='https://github.com/dgmvecuador'><img border=0 src='https://avatars.githubusercontent.com/u/406504?v=3' height=16 width=16'></a> Hi, did you solve the problem in your environment??
- <a href='https://github.com/dholbach'><img border=0 src='https://avatars.githubusercontent.com/u/1346979?v=3' height=16 width=16'></a> Sorry for the long wait. This makes it work for me: http://paste.ubuntu.com/22795846/
- <a href='https://github.com/dholbach'><img border=0 src='https://avatars.githubusercontent.com/u/1346979?v=3' height=16 width=16'></a> Brilliant work! :-D
- [ ] <a href='#crh-comment-Pull 43e19fe8398103a3994e25cc56e52622e9405ccb kodi-stable/snapcraft.yaml 49'></a> <img src='http://www.codereviewhub.com/site/github-remaining.png' height=16 width=60>&nbsp;<b><a href='https://github.com/ubuntu/snappy-playpen/pull/197#discussion_r72583865'>File: kodi-stable/snapcraft.yaml:L1-209</a></b>
- <a href='https://github.com/dholbach'><img border=0 src='https://avatars.githubusercontent.com/u/1346979?v=3' height=16 width=16'></a> Can you apply this? http://paste.ubuntu.com/21252024/
It add's a few `build-packages`.
- [x] <a href='#crh-comment-Pull abebc4a09f34fd3c26b67a0859efc2342aaf69dc kodi-stable/setup/gui/kodi.desktop 14'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/ubuntu/snappy-playpen/pull/197#discussion_r72477168'>File: kodi-stable/setup/gui/kodi.desktop:L1-23</a></b>
- <a href='https://github.com/dholbach'><img border=0 src='https://avatars.githubusercontent.com/u/1346979?v=3' height=16 width=16'></a> Do these actions work as expected?
- <a href='https://github.com/dgmvecuador'><img border=0 src='https://avatars.githubusercontent.com/u/406504?v=3' height=16 width=16'></a> Yes, they work as expected
![kodi_desktop_snap](https://cloud.githubusercontent.com/assets/406504/17200199/e016032c-5448-11e6-852f-acd7bef7fba1.png)


<a href='https://www.codereviewhub.com/ubuntu/snappy-playpen/pull/197?mark_as_completed=1'><img src='http://www.codereviewhub.com/site/github-mark-as-completed.png' height=26></a>&nbsp;<a href='https://www.codereviewhub.com/ubuntu/snappy-playpen/pull/197?approve=1'><img src='http://www.codereviewhub.com/site/github-approve.png' height=26></a>&nbsp;<a href='https://github.com/ubuntu/snappy-playpen/pull/197'><img src='http://www.codereviewhub.com/site/github-refresh.png' height=26></a>
<a href='#crh-end'></a>
+Jul 18 21:35:49 XXXXXXXX kernel: [ 5027.856093] exe="/usr/bin/dbus-daemon" sauid=106 hostname=? addr=? terminal=?'
+Jul 18 21:35:49 XXXXXXXX kernel: [ 5027.860905] audit: type=1107 audit(1468895749.325:2882): pid=886 uid=106 auid=4294967295 ses=4294967295 msg='apparmor="ALLOWED" operation="dbus_method_call" bus="system" path="/org/freedesktop/login1" interface="org.freedesktop.login1.Manager" member="CanReboot" mask="send" name="org.freedesktop.login1" pid=10058 label="snap.kodi.kodi" peer_pid=903 peer_label="unconfined"
+Jul 18 21:35:49 XXXXXXXX kernel: [ 5027.860905] exe="/usr/bin/dbus-daemon" sauid=106 hostname=? addr=? terminal=?'
+
@dholbach

dholbach Jul 27, 2016

Collaborator

Do you know if they were discussed on snapcraft@lists.snapcraft.io? It looks like we might need another interface or two.

@dgmvecuador

dgmvecuador Jul 28, 2016

Contributor

I dont think so, maybe is a new issue and I havent reported it

@dholbach

dholbach Jul 28, 2016

Collaborator

I think it'd be good to at least bring it up there and see if others can work on resolving them.

+
+Actions=Fullscreen;Standalone;
+
+[Desktop Action Fullscreen]
@dholbach

dholbach Jul 27, 2016

Collaborator

Do these actions work as expected?

@dgmvecuador

dgmvecuador Jul 28, 2016

Contributor

Yes, they work as expected

kodi_desktop_snap

@dholbach

dholbach Jul 28, 2016

Collaborator

👍

Collaborator

dholbach commented Jul 27, 2016

In Travis this fails to build with checking mpeg2dec/mpeg2.h usability... no.

Collaborator

dholbach commented Jul 27, 2016

On my machine locally it fails with configure: error: libdcadec not found.

+ plugin: x_kodiautotools
+ configflags:
+ - --prefix=/
+ build-packages:
@dholbach

dholbach Jul 28, 2016

Collaborator

Can you apply this? http://paste.ubuntu.com/21252024/

It add's a few build-packages.

Collaborator

dholbach commented Jul 28, 2016

Can we somehow adjust where ffmpeg comes from? This is how the build fails (both using 'snapcraft' or 'snapcraft cleanbuild'): http://paste.ubuntu.com/21252125/

Contributor

dgmvecuador commented Jul 28, 2016

Kodi developers usually recommend to use version of ffmpeg provided inside the code, so we should use that one. They update ffmpeg each major release.

Collaborator

dholbach commented Jul 28, 2016

Ok, let's pick whatever works. Can you apply the patch I specified earlier? That way you should see in the next Travis build how it's currently failing. Currently it's missing some build-packages.

Contributor

dgmvecuador commented Jul 29, 2016

I have applied your patch and other changes. Now the build is successful in Travis

Collaborator

dholbach commented Jul 29, 2016

Great work!

When I try to run it, I see this though:
daniel@daydream:~/dev/snappy/snappy-playpen/kodi-stable$ kodi
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

And I get a black screen. Anything I'm missing?

Contributor

dgmvecuador commented Jul 29, 2016

Its a problem with opengl libs, there are multiple bugs reported like https://bugs.launchpad.net/snappy/+bug/1574851

As workaround, you can copy your driver libs to the folder "/var/lib/snapd/lib/gl/" in my case, I copied all the content of "/usr/lib/nvidia-xxx". I dont know about your graphic card, but it seems to work with intel without problems.

Collaborator

dholbach commented Aug 1, 2016

I'm on intel too (i915).

Contributor

dgmvecuador commented Aug 1, 2016

You should copy all the libs from Intel, "i965_dri.so" and the dependencies to "/var/lib/snapd/lib/gl/", maybe check the deb package from the repository.

Contributor

dgmvecuador commented Aug 3, 2016

Hi, did you solve the problem in your environment??

Collaborator

dholbach commented Aug 9, 2016

Sorry for the long wait. This makes it work for me: http://paste.ubuntu.com/22795846/

Collaborator

dholbach commented Aug 10, 2016

Brilliant work! :-D

@dholbach dholbach merged commit c9a331e into Ubuntu:master Aug 10, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@dgmvecuador dgmvecuador deleted the dgmvecuador:kodi-snap branch Aug 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment