Solved Has anyone successfully built Kodi using -flto
#16
Hehe :-) "mine is even smaller" ...
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#17
(2021-01-15, 15:21)graysky Wrote:
(2021-01-15, 15:04)wsnipex Wrote: ok, for reference: this is the binary from our ubuntu PPA:
-rwxr-xr-x 1 root root 55M Mai 12  2013 /usr/lib/x86_64-linux-gnu/kodi/kodi.bin

I do not have a kodi.bin but I do have:
Code:
-rwxr-xr-x 1 root root 45M Jan 14 13:03 /usr/lib/kodi/kodi-x11
then you are only building for X11.

edit: do you enable ENABLE_APP_AUTONAME?
Reply
#18
(2021-01-15, 22:56)wsnipex Wrote:
(2021-01-15, 15:21)graysky Wrote:
(2021-01-15, 15:04)wsnipex Wrote: ok, for reference: this is the binary from our ubuntu PPA:
-rwxr-xr-x 1 root root 55M Mai 12  2013 /usr/lib/x86_64-linux-gnu/kodi/kodi.bin

I do not have a kodi.bin but I do have:
Code:
-rwxr-xr-x 1 root root 45M Jan 14 13:03 /usr/lib/kodi/kodi-x11
then you are only building for X11.

edit: do you enable ENABLE_APP_AUTONAME?

Correct.  Only building X11.  I do not currently build with ENABLE_APP_AUTONAME.  Should I?  See my cmake stanza here.
Need help programming a Streamzap remote?
Reply
#19
That option is automatically enabled if you only build for 1 windowing system. Any reason you disable wayland and gbm support?
Reply
#20
(2021-01-16, 08:37)wsnipex Wrote: That option is automatically enabled if you only build for 1 windowing system. Any reason you disable wayland and gbm support?

Arch builds the three separated providing a split package.  Users can select which kodi they want:
Code:
# pacman -S kodi
resolving dependencies...
:: There are 3 providers available for KODI-BIN:
:: Repository community
   1) kodi-gbm  2) kodi-wayland  3) kodi-x11

Enter a number (default=1): 

PKGBUILD is here.
Need help programming a Streamzap remote?
Reply
#21
that doesn't make any sense anymore, it's 3 times compiling and 3 times the size for no gain.
Reply
#22
I'm not sure why that switch was made... it could be to minimize the number of dependencies if a user only wants x11 for example, why pull down the wayland deps.  I am just guessing here.  I do not think it's 3 times the size although it is 3 times the compiling. The way the dependency works is in order to install any of the binary packages (kodi-x11, kodi-gbm, kodi-wayland) the common kodi package is also required which contains the lion's share of the files.

Currently (18.9-3):
Required:
kodi (common): 35.28 MiB
Optional, pick only one:
kodi-x11: 48.61 MiB
kodi-gbm: 48.48 MiB
kodi-wayland: 48.83 MiB

Is there a more efficient way to compile only once, but to get all 3 of the executables?  We could then package them via the split architecture yet only compile once.

EDIT: I did find: https://github.com/xbmc/xbmc/blob/master...gure-build
docs Wrote:Or configure build with any combination of the three (default is "x11 wayland gbm")

So x11 and wayland need to be build with -DAPP_RENDER_SYSTEM=gl whereas gbm wants -DAPP_RENDER_SYSTEM=gles.  So perhaps I could go from building 3 times to 2 times if I built x11 and wayland with:
Code:
-DCORE_PLATFORM_NAME="x11 wayland"
-DAPP_RENDER_SYSTEM=gl

And separately gbm with:
Code:
-DCORE_PLATFORM_NAME="gbm"
-DAPP_RENDER_SYSTEM=gles

Is that correct?

EDIT2: I see building x11 and wayland did not give each independent binary, but a kodi.bin that is nearly 1 MiB larger.  Is there a way to have the build system make two independent binaries?
Need help programming a Streamzap remote?
Reply
#23
no, GBM works fine with GL as well

If you really want 3 binaries, you have to compile 3 times. What's gained by that? A binary with support for all 3 windowing platforms is only slightly larger and you only compile and package once.
Reply
#24
Two questions:

1) Is there a document that explains differences of -DAPP_RENDER_SYSTEM=gl vs -DAPP_RENDER_SYSTEM=gles somewhere?
2) If I build for all 3, the system produces /usr/lib/kodi/kodi.bin so I am wondering how the user can select between say x11 or wayland on a system that has both dependencies installed.
Need help programming a Streamzap remote?
Reply
#25
(2021-01-16, 20:28)graysky Wrote: so I am wondering how the user can select between say x11 or wayland on a system that has both dependencies installed.
Code:
--windowing=x11|wayland|gbm

https://github.com/xbmc/xbmc/pull/18534
Reply
#26
(2021-01-17, 00:00)asavah Wrote:
(2021-01-16, 20:28)graysky Wrote: so I am wondering how the user can select between say x11 or wayland on a system that has both dependencies installed.
Code:
--windowing=x11|wayland|gbm

https://github.com/xbmc/xbmc/pull/18534
Kodi auto detects the correct windowing system at runtime, but you can manually force one by using ^^^

edit: as for GL vs GLES: afaik no kodi specific documentation for the differences exist, but the internet has lots of info on the topic in general.
In a nutshell: GL is for x86 desktops(although they usually support gles as well), GLES is for embedded devices.
Reply
#27
Thanks all.  If we treat LibreLE as the gold standard, I think they use gl for x11 and gles for both wayland and for gbm.
Need help programming a Streamzap remote?
Reply
#28
LE make specific builds for specific hardware depending on the capabilities of the hardware.
Generic x86 is x11, pi4 is gbm/gles etc.
LE sports some very nice approaches however not all of those approaches are suitable for general purpose distros.
However IMO your concern about minimizing runtime deps for end users is very valid.
Eg: if I have a X11 system without wayland and its deps installed I would not want to have to install all the wayland stuff if I wanted to run Kodi.

IMHO the best approach would be to have separate packages like kodi-x11, kodi-wayland, kodi-gbm without "unneeded" dependencies.
This would add to the maintainer's burden but it wouldn't trigger "minimalist" people.
Different distros also may have different policies about this.
Just my 2c.
Reply
#29
imho, as a maintainer myself: minimalist ppl can build themselves if they don't have a couple MB to spare, while their media takes > hundreds of GB
Reply
#30
(2021-01-17, 15:17)wsnipex Wrote: imho, as a maintainer myself: minimalist ppl can build themselves if they don't have a couple MB to spare, while their media takes > hundreds of GB

It pretty much depends on distro policies and/or people preferences.
For me personally multi-windowing is a boon and that's what I build for my own use.
However some people's OCD could be severely triggered by a bunch libraries that they will never use ).
Reply

Logout Mark Read Team Forum Stats Members Help
Has anyone successfully built Kodi using -flto0