xbianonpi / xbian

XBMC on Raspberry Pi, Bleeding Edge
https://xbian.org
GNU General Public License v3.0
294 stars 44 forks source link

How to build the custom Xbian Image #857

Closed amanharitsh123 closed 6 years ago

amanharitsh123 commented 6 years ago

I have made some changes to the kodi fork https://github.com/amanharitsh123/xbmc . I want to make a custom xbian image using this fork and want to test my changes. How can i do this ? Please Help

amanharitsh123 commented 6 years ago

Dependencies Errors Preparing to unpack xbian-package-xbmc15.2-1520517510.deb ... Unpacking xbian-package-xbmc (15.2-1520517510) over (17.3-1496270252) ... dpkg: dependency problems prevent configuration of xbian-package-xbmc: xbian-package-xbmc depends on libjasper1; however: Package libjasper1 is not installed. xbian-package-xbmc depends on libgif4; however: Package libgif4 is not installed. xbian-package-xbmc depends on libplist3; however: Package libplist3 is not installed. xbian-package-xbmc depends on libnfs8; however: Package libnfs8 is not installed. xbian-package-xbmc depends on alsa-base; however: Package alsa-base is not installed. xbian-package-xbmc depends on libpng16-16; however: Package libpng16-16 is not installed. xbian-package-xbmc depends on libjasper1; however: Package libjasper1 is not installed.

mkreisl commented 6 years ago

Run sudo apt-get install -f

amanharitsh123 commented 6 years ago

That overwrites the kodi 17 over 15 again

mkreisl commented 6 years ago

Are you really running Debian Jessie ???

AFAIR libpng16-16, libnfs8 is part of Stretch and not Part of Jessie

amanharitsh123 commented 6 years ago

Yes I am running Debian jessie (Confirmed) If libpng16-16, libnfs8 is part of Stretch then why isengard cross compiled in amd64jessie depends on these packages :(

mkreisl commented 6 years ago

Look at your dependencies in deb file you built dpkg-deb -I dpkg-deb -I xbian-package-xbmc15.2-xxxxxxxxx.deb And please learn a bit more about debian package and their dependencies This is not a tutorial here, sorry

mkreisl commented 6 years ago

I've absolutely no idea where the dependency libnfs8 came from. Isengard has libnfs4 as dependency configured, libnfs4 is installed in amd64jessie root, and package built has libnfs8 as dependency. You have to figure out where that came from

amanharitsh123 commented 6 years ago

Thats , what i am thinking right now :|

amanharitsh123 commented 6 years ago

Do you have any isengard .deb package ?

mkreisl commented 6 years ago

Yeah, that's extremly strange kodi.bin has libnfs.4.so as dependency, so why does debhelper put libnfs8 as depedency in and ignores hardcoded libnfs4 dep? And, I was looking into package built on Debian Jessie machine, its exactly the same, libnfs8 as dependency

mkreisl commented 6 years ago

Do you have any isengard .deb package ?

I looked into my local deb package built Nov 2015, there is libnfs4 as dependency

amanharitsh123 commented 6 years ago

Thats Strange :|

mkreisl commented 6 years ago

I'm running next test (I want to know what's going on) I'm using my old amd64jessie root and build package against this one Will see what happens.

amanharitsh123 commented 6 years ago

@mkreisl Should i try building on some old distro like ubuntu 14?

mkreisl commented 6 years ago

@mkreisl Should i try building on some old distro like ubuntu 14?

Installation of what? Ah, you mean building. Nope, I was building it on Ubuntu 14.04

amanharitsh123 commented 6 years ago

@mkreisl building*

mkreisl commented 6 years ago

That has nothing do do with host os, must be inside of schroot

amanharitsh123 commented 6 years ago

I have noticed that libnfs4 isnt installed in jessie schroot.

mkreisl commented 6 years ago

I have noticed that libnfs4 isnt installed in jessie schroot.

It is, because if not build fails

mkreisl commented 6 years ago

I gave up, have no idea where that strange dependencies came from

Now, escape to the front is the strategy:

Currently building Isengard for Stretch (libjasper-dev:armhf and libcec3 has been picked from Jessie repos) and see what happens.

And that version - if built is successful - can installed here on my Pi3

mkreisl commented 6 years ago

Build failed, source is not compatible with gcc 6.3

So, before I can not sleep tonight, I was installing XBian Debian Jessie image, modified config file:

manfred@kmnote5-debian9:/usr/src/xbian/xbian-package-xbmc$ git diff
diff --git a/build/rpi2-cross-isengard/config b/build/rpi2-cross-isengard/config
index 6fbdcd1..0262a6a 100644
--- a/build/rpi2-cross-isengard/config
+++ b/build/rpi2-cross-isengard/config
@@ -6,5 +6,5 @@ config_deb_pkgname=xbian-package-xbmc
 config_deb_ctrlextra=Breaks: xbian-package-xbmc-gotham-nightly (<<3.0.0~)
 config_source_reset=no
 config_source_refresh=yes
-config_deb_depends=\${shlibs:Depends}, libgif4, consolekit, udisks2, upower, xbian-package-config-xbmc, libplist2, libnfs4, libass5, libsdl-image1.2, libssh-4, librtmp1, udisks, libpulse0, libmpeg2-4, libxslt1.1, xbian-package-xbianhome, xbian-package-xbmc-scripts (>= 1.1.0), alsa-base, alsa-tools, libbluetooth3, libcec (>=3.0.1), libmad0, libtiff5, libafpclient0, python-sqlite, libmysqlclient18, libtinyxml2.6.2, libyajl2, liblzo2-2, libpython2.7, libpcrecpp0, libcdio13, libsamplerate0, libsmbclient, libpng12-0, libaacs0, libbluray1, libenca0, libfontconfig1, libjasper1, ttf-dejavu-core, libvorbisfile3, libcurl3-gnutls, xbian-package-firmware (>=2.6.0)
+config_deb_depends=\${shlibs:Depends}, libgif4, consolekit, udisks2, upower, xbian-package-config-xbmc, libass5, libsdl-image1.2, libssh-4, librtmp1, udisks, libpulse0, libmpeg2-4, libxslt1.1, xbian-package-xbianhome, xbian-package-xbmc-scripts (>= 1.1.0), alsa-base, alsa-tools, libbluetooth3, libcec (>=3.0.1), libmad0, libtiff5, libafpclient0, python-sqlite, libmysqlclient18, libtinyxml2.6.2, libyajl2, liblzo2-2, libpython2.7, libpcrecpp0, libcdio13, libsamplerate0, libsmbclient, libpng12-0, libaacs0, libbluray1, libenca0, libfontconfig1, libjasper1, ttf-dejavu-core, libvorbisfile3, libcurl3-gnutls, xbian-package-firmware (>=2.6.0)
 config_build_addons=

built new Kodi Isengard package, added stretch to /etc/apt/sources.list

root@xbian:/mnt# cat /etc/apt/sources.list
deb http://http.debian.net/debian jessie main non-free
deb http://http.debian.net/debian stretch main non-free

and installed missing packages

sudo apt-get install libjasper1 libgif4 alsa-base libpng16-16

libpng16-16 picked from Stretch, other packages from Jessie

libpng16-16 is only installed to fulfill dependency, it is supposed never to be used:

root@xbian:/usr/local/lib/kodi# ldd kodi.bin | grep png
        libpng12.so.0 => /lib/arm-linux-gnueabihf/libpng12.so.0 (0x762b8000)

Now everything looks ok and Kodi 15.2 comes up

hth

amanharitsh123 commented 6 years ago

@mkreisl Thanks a lot , Your guidance has cleared many of my concepts regarding cross compilation , schroot and debian packages . I will try your suggested fix soon , Thank you :)

mkreisl commented 6 years ago

:exclamation: Last but not least, I found the reason for that strange behavior :exclamation:

You have to edit config file xbian/config, and change stretch to jessie (2x).

The old configuration xbian-package-xbmc/build/rpi2-cross-isengard/config has not been updated from config_build_env=schroot -c cross -p -- to config_build_env=schroot -c amd64${config_os_version} -p -- but the hook script xbian-package-xbmc/hooks.d/pre-deb.d/fix-dependencies requires this

So, after editing xbian/config, it is enough to build Isengard package again by $xbiangit --arch rpi2-cross-isengard --action install,deb, no recompiling necessary

But, nevertheless, I suppose, you'll have to install missing packages manually

amanharitsh123 commented 6 years ago

@mkreisl Thank You for the Suggestion I have successfully build the package by changing the config_deb_depends and manually installing some dependencies . Although some cec error occured after installing deb package, that I fixed by reinstalling libcec on xbian . Everthing seems to work fine now .

Thanks a lot @mkreisl I have got some idea about the xbian project now and look forward to contribute to this project in the future. Thanks You :)

mkreisl commented 6 years ago

Although some cec error occured after installing deb package, that I fixed by

Yeah, that was to be expected, because latest Jessie image has libcec4 installed, and we know that Isengard is built against libcec3

I have got some idea about the xbian project now and look forward to contribute to this project in the future

Nice to hear :smile: Thanks for your response