WIP Kodi x86_64-linux-gnu static build
#1
*UPDATE

This is dead, there's no way to get Kodi to build a 100% static binary because there's too many dependencies that won't have it.

* 2023-01-09, 07:15

Well I sure stepped in it, I'm trying to do a static linux build using the unified build system and I must be doing it wrong.

I'm having to back track into each dependency and build it instead of as a whole.

Did my bootstrap and configure from tools/depends (configure --with-toolchain=/usr --prefix=/opt/xbmc-deps --host=x86_64-linux-gnu --with-rendersystem=gl --enable-debug=no)

Performed make -j$(getconf _NPROCESSORS_ONLN) from the tools/depends sub directory first.

Figured out some things are not specifically built from there so I installed them via apt.

I've been going back and fourth trying to do make -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build from the source directory only to find out another depend is needed.

Finally my question is, even though I'm clearly not doing this the way it is intended from the README shouldn't all the depends make when I perform the make command from the depends folder.

Is there a platform specific list of depends I'm not seeing and since this is linux instead of android that's why the unified build system isn't doing it?
Reply
#2
the tools/depend system is built around using the toolchain.cmake file generated as part of the configure step for the actual Kodi cmake system.
The key part to this, is paths set to point the cmake project at WHERE the dependencies have been built/installed to (search paths). You can do this without the toolchain file, but thats how the CI system is done. Another key thing is the definition of KODI_DEPENDSBUILD in the toolchain file. A number of dependencies are built during the kodi cmake build, and on linux, this requires KODI_DEPENDSBUILD be set, otherwise its expected not to be a CI build, and therefore system libs should be present.

Its strongly recommended to not use this for linux systems. Apparently its counter intuitive to "linux philosophies", and its really only ever used/tested for the exact CI workflow, and past the actual kodi-test binary for the test suite, its never actively run/used.

As for a list of dependencies, they are located at https://github.com/xbmc/xbmc/blob/8c2aaf...#L162-L211 with platform specific deps (for linux) found in https://github.com/xbmc/xbmc/tree/master...form/linux in the cmake files for the windowing system being built.

the expectation for linux compilation is to use system provided libs.
Reply
#3
Well that explains everything.

I thought I could build Kodi the way I build ffmpeg, completely from downloaded source so I have all the exact versions that have the functions and features required.

Since I'm this far I'll try to salvage my sanity using the provided info to make a full build system anyway.

Very much appreciated.
Reply
#4
Well something doesn't seem right about this.

I did a full build with system libs, it works for the most part.

It won't use the system's input stream (kodi-inputstream-adaptive) so it has no inputstream support, which could have been built from depends but you're not supposed to unless cross compiling.

What a wonderful experience this has been.

**EDIT

I'm already rebuilding with the addons. Just would have been nice to have a concise build.

Build 344643490832 in progress.

**EDIT

Nevermind.

Code:
make[1]: *** No rule to make target 'supported_addons'.  Stop.

Now I'm laughing as I nuke another docker. Thank god I use docker.
Reply
#5
if you have all needed dependencies installed, this is all you need to do:
$ mkdir -p build ; cd build ; cmake -DAPP_RENDER_SYSTEM=gl .. && make -j8 && make -j8 binary-addons
Reply
#6
There we go, I was missing make && make binary-addons all set to run test builds now.

I didn't see that in the README, guess it's implied.

Thanks @wsnipex
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi x86_64-linux-gnu static build0