Kodi Community Forum

Full Version: testing KODI command gives: ```bash: ./kodi-x11: No such file or directory ```
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was building Kodi in my Ubuntu desktop according to the guide given:  https://github.com/xbmc/xbmc/blob/master....Ubuntu.md

It was fine till I ran command  ` ` ` ./kodi-x11 ` ` ` to test Kodi in my ` ` `~/kodi-build` ` ` directory.
it shows ` ` `bash: ./kodi-x11: No such file or directory` ` ` .

Then for searching the reason for this anamoly I ran again the command to Configure build for X11. 
It was the output:
` ` `
~/kodi-build$ cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=x11 -DAPP_RENDER_SYSTEM=gl
-- Source directory: /home/shardul/kodi
-- Build directory: /home/shardul/kodi-build
-- Generator: Single-configuration: Release (Unix Makefiles)
-- CMake Version: 3.16.3
-- System type: Linux
-- Linker: GNU gold
-- include/linux/dma-heap.h not found
-- Core system type: linux
-- Platform: x11
-- CPU: x86_64, ARCH: x86_64-linux
-- Cross-Compiling: FALSE
-- Execute build artefacts on host: TRUE
-- Depends based build: 
-- statx is available
-- Checking to see if CXX compiler accepts flag -msse
-- Checking to see if CXX compiler accepts flag -msse - yes
-- Checking to see if CXX compiler accepts flag -msse2
-- Checking to see if CXX compiler accepts flag -msse2 - yes
-- Checking to see if CXX compiler accepts flag -msse3
-- Checking to see if CXX compiler accepts flag -msse3 - yes
-- Checking to see if CXX compiler accepts flag -mssse3
-- Checking to see if CXX compiler accepts flag -mssse3 - yes
-- Checking to see if CXX compiler accepts flag -msse4.1
-- Checking to see if CXX compiler accepts flag -msse4.1 - yes
-- Checking to see if CXX compiler accepts flag -msse4.2
-- Checking to see if CXX compiler accepts flag -msse4.2 - yes
-- Checking to see if CXX compiler accepts flag -mavx
-- Checking to see if CXX compiler accepts flag -mavx - yes
-- Checking to see if CXX compiler accepts flag -mavx2
-- Checking to see if CXX compiler accepts flag -mavx2 - yes
-- Could NOT find CAP (missing: CAP_LIBRARY CAP_INCLUDE_DIR) 
-- Could NOT find ClangFormat (missing: CLANG_FORMAT_EXECUTABLE) 
-- Could NOT find Dav1d (missing: DAV1D_LIBRARY DAV1D_INCLUDE_DIR) 
-- Could NOT find MDNS (missing: MDNS_LIBRARY MDNS_INCLUDE_DIR) 
-- Could NOT find Pipewire (missing: PIPEWIRE_LIBRARY PIPEWIRE_INCLUDE_DIR SPA_INCLUDE_DIR) 
-- Could NOT find Sndio (missing: SNDIO_LIBRARY SNDIO_INCLUDE_DIR) 
-- Found VAAPI: /usr/lib/x86_64-linux-gnu/libva.so (found suitable version "1.7.0", minimum required is "0.39.0") 
-- FFmpeg 4.4 not found, falling back to internal build
-- dav1d not found, internal ffmpeg build will be missing AV1 support!
-- Could NOT find MariaDBClient (missing: MARIADBCLIENT_LIBRARY MARIADBCLIENT_INCLUDE_DIR) 
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- #---- CONFIGURATION ----#
-- Platforms: x11
-- -- PATH config --
-- Prefix: /usr/local
-- Libdir: /usr/local/lib
-- Bindir: /usr/local/bin
-- Includedir: /usr/local/include
-- Datarootdir: /usr/local/share
-- Datadir: /usr/local/share
-- Docdir: /usr/local/share/doc/kodi
-- ALSA enabled: Yes
-- AVAHI enabled: Yes
-- BLUETOOTH enabled: Yes
-- BLURAY enabled: Yes
-- CAP enabled: No
-- CCACHE enabled: Yes
-- CEC enabled: Yes
-- CLANGFORMAT enabled: No
-- CLANGTIDY enabled: No
-- CPPCHECK enabled: No
-- DAV1D enabled: No
-- DBUS enabled: Yes
-- INCLUDEWHATYOUUSE enabled: No
-- ISO9660PP enabled: Yes
-- LCMS2 enabled: Yes
-- LIRCCLIENT enabled: Yes
-- MDNS enabled: No
-- MICROHTTPD enabled: Yes
-- NFS enabled: Yes
-- PIPEWIRE enabled: No
-- PLIST enabled: Yes
-- PULSEAUDIO enabled: Yes
-- PYTHON enabled: Yes
-- SMBCLIENT enabled: Yes
-- SNDIO enabled: No
-- UDEV enabled: Yes
-- UDFREAD enabled: Yes
-- XSLT enabled: Yes
-- VAAPI enabled: Yes
-- GLX enabled: Yes
-- VDPAU enabled: No
-- MARIADBCLIENT enabled: No
-- MYSQLCLIENT enabled: Yes
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shardul/kodi-build
` ` `
Some packages are missing but I think configuration is complete. So can anyone please help why  ` ` `./kodi-x11` ` `  is not running kodi.
if there is no kodi-x11 or kodi.bin binary, it failed to compile.
run "make" and note the output
Thanks a lot, After running "make" command, then I was able to test kodi with ` ` ` ./kodi-x11 ` ` `.
I have one more question whether the packages like CAP, ClangFomat, Dav1d, MDNS, Sndio, Pipewire, MariaDBClient, Doxygen which were not found during  running command for configure built for x11 will have any effect later on. Should I get them individually? 
I have installed dependencies with guidance from here: https://github.com/xbmc/xbmc/blob/master...omagically
(2021-05-20, 08:12)Shardul Wrote: [ -> ]I have one more question whether the packages like CAP, ClangFomat, Dav1d, MDNS, Sndio, Pipewire, MariaDBClient, Doxygen which were not found during  running command for configure built for x11 will have any effect later on. Should I get them individually? 
Those are optional dependencies, I'd add dav1d and cap tho.

CAP - posix capabilities lib, I don't remember what exactly it's used for in Kodi code - install libcap-dev
ClangFormat - helps with formatting the code, you don't need this unless you're developer who plans to submit some patches.
Dav1d - AV1 encoder/decoder library, you would need it if you have AV1 media, install libdav1d-dev if you have ubuntu 20.10 or newer, for older ubuntu releases you would need to build it from source.
MDNS - android only
Sndio - sound api, AFAIK FreeBSD only
Pipewire - next gen sound server (pulseaudio replacement), forget about it for now
MariaDBClient - if you have  MYSQLCLIENT you don't need this, it's one or the other.
Doxygen - needed to generate Kodi API docs, you probably don't need this if you are not a developer.
Thank you @asavah , I have installed doxygen as I need to do some development stuffs, but I an into one more problem 

I followed the guide : https://github.com/xbmc/xbmc/blob/master...build-kodi to build kodi and it was build successfully in the ``` kodi-build ``` directory and I ran command ``` ./kodi-x11 ``` to run and test Kodi. It was working fine until in the very next command I need to install it though the command: ```sudo make install DESTDIR=$HOME/kodi```. I ran this command while I was in the ```kodi-build ```directory. But it creates a locked file inside my kodi main folder.(This locked file named after my name and has two folders inside namely kodi-build and workspace)
Now according to guide simply by running command ```kodi``` Kodi should open but it is giving ``` Kodi not found error```.

Please help with removal of this error
What did you configure as the install directory when you ran cmake?  In other words, what did you put for -DCMAKE_INSTALL_PREFIX=? sudo make install should install it into what you put there, eg /usr or /usr/local.  If you installed it elsewhere you will need to add the install path to $PATH for the system to be able to find the binary.
(2021-05-22, 19:32)black_eagle Wrote: [ -> ]What did you configure as the install directory when you ran cmake?  In other words, what did you put for -DCMAKE_INSTALL_PREFIX=? sudo make install should install it into what you put there, eg /usr or /usr/local.  If you installed it elsewhere you will need to add the install path to $PATH for the system to be able to find the binary.

I put DCMAKE_INSTALL_PREFIX =/usr/local in it. 
And to avoid any error I used the command   sudo make install=$HOME/kodi 
But I am not able to run Kodi.
And what happens if you just put sudo make install ? (which is what the docs tell you to do).
(2021-05-22, 19:44)Shardul Wrote: [ -> ]And to avoid any error I used the command   sudo make install=$HOME/kodi 

It's not how it works. You just invented something that's not valid. Smile
If you specified -DCMAKE_INSTALL_PREFIX=/usr/local just do sudo make install ,

if you wish to create an archive or view what's going to be installed by installing in another folder first you could do something like this
Code:
mkdir -p $HOME/test-install
make install DESTDIR=$HOME/test-install
But you won't be able to run Kodi from $HOME/test-install because Kodi expects to finds it's data files (skins and stuff) at /usr/local

If you would like to run Kodi from a non-standard path you need to set that path at configure time with -DCMAKE_INSTALL_PREFIX=$HOME/kodi and just use make install (no sudo here!)
To run kodi you would need to call the script by using an absolute path eg $HOME/kodi/bin/kodi or by adding $HOME/kodi/bin to your PATH environment variable.
Thank you @asavah , @black_eagle for your kind guidance.
Now I issue the command, "sudo make install" while in the "kodi-build" directory. This time it builts a locked "workspace" folder in Home path( same path where Kodi and kodi-build are present). I think this time it is the right path where it should be.
But now also only by writing "kodi" did not run Kodi as it should according to the guide given. Please help regarding it Smile  which command will be used to run it.
(2021-05-23, 04:13)Shardul Wrote: [ -> ]This time it builts a locked "workspace" folder in Home path

No idea what this is, I build Kodi regularly and don't see that.  Please post the full output of sudo make install to a paste site and share the link.  Also, it might be helpful if you post the whole cmake line you used to configure the build with. eg, for ref. mine is cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE ../xbmc -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug -DAPP_RENDER_SYSTEM=gl -DCORE_PLATFORM_NAME=x11 -DENABLE_MARIADBCLIENT=ON -DENABLE_INTERNAL_DAV1D=ON -DENABLE_OPTICAL=ON -DCMAKE_LIBRARY_PATH=/lib

Part of the output of that command tells you where Kodi will be installed.
xml:
-- #---- CONFIGURATION ----#
-- Platforms: x11
-- -- PATH config --
-- Prefix: /usr/local
-- Libdir: /usr/local/lib
-- Bindir: /usr/local/bin
-- Includedir: /usr/local/include
-- Datarootdir: /usr/local/share
-- Datadir: /usr/local/share
-- Docdir: /usr/local/share/doc/kodi
It is slightly silly but I deleted whole Kodi and rebuild it. I am advised by my mentor to not to use "sudo make install" so that all the installation files will remain only in build directory, so there is no error till now this time, I will encountered any I will take guidance from you again ,Thank you.Smile
(2021-05-24, 08:24)Shardul Wrote: [ -> ]It is slightly silly but I deleted whole Kodi and rebuild it. I am advised by my mentor to not to use "sudo make install" so that all the installation files will remain only in build directory, so there is no error till now this time, I will encountered any I will take guidance from you again ,Thank you.Smile

No problem.  You can run it from the build directory with ./kodi-x11 or whatever windowing system you have built it for.  You can optionally add the -p flag to the end of that too if you need portable mode.  Good luck with GSOC Smile