v18 Cannot run kodi compiled from sources
#1
Hi,

I'm new to rpi & kodi but I'm an experienced developer and know my way in Linux.

I've (crossed) compiled kodi following the instructions in https://github.com/xbmc/xbmc/blob/master...aspberrypi
Well, almost; I've done it on Ubuntu 16.04 and not 14.04 as indicated in the page above. Apparently, the build fails on 14.04.

The build successfully ended with an executable called kodi-rbpi of size(~4.4G).
I've copied it over to my pi and launched it.
Got the following message:

Unable to find path to Kodi data files!
Segmentation fault (core dumped)


I've tried setting KODI_HOME to an arbitrary directory:

KODI_HOME=/home/pi ./kodi-rbpi

This time I got:

ERROR: Unable to create application. Exiting
Segmentation fault (core dumped)


I've removed ~/.kodi/, but this didn't make a difference.
So, whct should I do to launch the executable compiled from sources?

Thanks, Efi
Reply
#2
you have to install the build using the install target, you can't just copy the executable. there are tons of data files.

if you want a self-contained build and not install on the system os;
configure the build with some prefix -DCMAKE_INSTALL_PREFIX=/where/you/want/it
run make install DESTDIR=/some/temp/dir

then copy /some/temp/dir/* to / on your pi.

also if you get a 4.4GB exec you probably built debug? or at least with symbols. so i'd strip that bugger.
Reply
#3
additionally to the above, you might also need a few libs from depends $PREFIX (the one from the tools/depends/ step)
Reply
#4
I'm not interested in a self contained build.
I believe the executable was compiled in debug mode. For the time being I'll use it. If all goes well, I'll recompile in release mode.
I have a target directory that lists 3 sub directories, namely:
i686-linux-gnu-native/ 
raspberry-pi2-debug/ 
xbmc-tarballs/

What exactly do I need to copy over, and where to?
I do not want to override my rpi system files. I'll copy as many shared libraries as needed...
Thanks for your help and for an awesome app.
Reply
#5
then skip setting the prefix path, do the two others. it will be put in /usr/local. run ldd on binary to find out the missing libs, copy those from depends as wsnipex pointed out. don't forget to run ldconfig after copying over the shared libs.
Reply
#6
I copied the entire subdirectory raspberry-pi2-debug/ to my rpi.
I've noticed that the script raspberry-pi2-debug/bin/kodi uses the hard-coded full path directory name of the build system (in my Ubuntu machine).
I created a dummy directory with the same name in my rpi, and placed there a symbolic link to the actual place where I copied the target directory to match the hard-coded name.
I set the LD_LIBRARY_PATH environment variable to point at raspberry-pi2-debug/lib
I set the KODI_HOME environment variable to point at raspberry-pi2-debug/share/kodi
Finally, from raspberry-pi2-debug/bin I ran ./kodi --debug

The program launched, opened a fullscreen window that showed the Kodi logo and text that says Kodi v18 **** Alpha.
Then, it went black and after a (long) while it terminated with the following error messages:

 Traceback (most recent call last):  File "/usr/lib/python2.7/site.py", line 554, in <module>    main()  File "/usr/lib/python2.7/site.py", line 536, in main    known_paths = addusersitepackages(known_paths)  File "/usr/lib/python2.7/site.py", line 272, in addusersitepackages    user_site = getusersitepackages()  File "/usr/lib/python2.7/site.py", line 247, in getusersitepackages    user_base = getuserbase() # this will also set USER_BASE  File "/usr/lib/python2.7/site.py", line 237, in getuserbase    USER_BASE = get_config_var('userbase')  File "/usr/lib/python2.7/sysconfig.py", line 582, in get_config_var    return get_config_vars().get(name)  File "/usr/lib/python2.7/sysconfig.py", line 528, in get_config_vars    _init_posix(_CONFIG_VARS)  File "/usr/lib/python2.7/sysconfig.py", line 412, in _init_posix    from _sysconfigdata import build_time_vars  File "/usr/lib/python2.7/_sysconfigdata.py", line 6, in <module>    from _sysconfigdata_nd import *ImportError: No module named _sysconfigdata_ndSegmentation fault (core dumped)Crash report available at /home/pi/kodi_crashlog-20171215_115109.log
and I've noticed that indeed a log file was generated.
Any idea on what to try next?
Reply

Logout Mark Read Team Forum Stats Members Help
Cannot run kodi compiled from sources0