v17 Kodi 17 Krypton RC4 - Raspberry Pi compilation and usage issue
#1
Hi!

My appreciations for the latest Kodi 17 RC4 release!
I grabbed the source code from git, compiled it and checked all the latest efforts in bug-fixing and improving this wonderful piece of software.
Thank you for your amazing work! Cool

I'm still using Kodi 17 03 beta (popcornmix), and I hope I won't stick with it forever, because it's the only build that suits my Raspberry Pi Linux environment, apart from the fact that the EPG database gets corrupted (fixed the potential destruction of my SdCard by moving it to a ramdrive).

Following I'll try to explain the issue I'm currently facing and hope that it will be taken care of before the Kodi 17 Krypton stable release will be finalized.

Some time ago I've struggled to get Kodi 17 03 compiled with static linking to the otherwise standard /opt/vc/lib repository for some specific EGL/GLES/MMAL libraries.
The only way I managed to do this without breaking the ./configure script was to use the following environmental changes:
export C_INCLUDE_PATH=/opt/vc/include:/opt/vc/include/interface/vcos/pthreads
export CPLUS_INCLUDE_PATH=/opt/vc/include:/opt/vc/include/interface/vcos/pthreads
export LDFLAGS="-L/opt/vc/lib"

For reference, the whole discussion on this subject:
http://forum.kodi.tv/showthread.php?tid=...pid2436871

However, something changed in the build script of Kodi starting from 17 06 beta and persisted up to the latest 17 RC4. Even if I specify the location for the libs with the commands from above the compilation script takes whatever EGL/GLES libs it finds on the system including the ones in /opt/vc/lib and it looks like it prefers the ones in /usr/lib, as I couldn't change the priority even by editing the ld.so.conf file and putting /opt/vc/lib before /usr/lib.
Apart from Raspbian (and maybe very few other distros), other maintainers have just adapted their distros for Raspberry and the mesa libraries were not specifically compiled for Raspberry Pi (broadcom GPU acceleration), the normal/standard libEGL & libGLES libraries which are part of the libmesa package and used for the X Server too are installed in the default system libraries repository (/usr/lib in my case). When Kodi 17 06 -> RC4 starts it looks after these standard libraries in the /usr/lib and if it finds them it will load them and will crash with an Unable to create GUI error, error that is widespread throughout the Kodi forums. My only option is to remove the libmesa package and leave Kodi only with the libs available in /opt/vc/lib, which are not even having the same name (no duplicates) as the standard libEGL & libGLESv2 ones:
ldd /usr/lib/kodi/kodi.bin | grep /opt/vc
libbrcmEGL.so => /opt/vc/lib/libbrcmEGL.so (0x76a85000)
libbrcmGLESv2.so => /opt/vc/lib/libbrcmGLESv2.so (0x76a60000)

I'd suggest to link Kodi statically to the libs in /opt/vc/lib if the ./configure script gets the directive --with-platform=raspberry-pi2 and the libs are to be found in /opt/vc/lib

Some hints:
https://stackoverflow.com/questions/4156...-libraries
https://stackoverflow.com/questions/8471...ingle-host
Reply
#2
Thread moved to raspberry pi
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#3
Well, I should have created separate threads for all 3 issues. I just used the general Kodi discussions category in order to make these problems visible to all for the short time left before Kodi 17 stable will be released.
But there's always time to split them Smile

I'm still not sure if this is a support issue as it behaves more like a BUG!
Reply
#4
I found out that the RaspberryPi userland EGL/GLES libs were renamed back to their originals in the latest Raspbian images and userland. As a workaround, I manged to use both X and Kodi on my Non-Raspbian environment by switching the symlinks inside /usr/lib with the following scripts:

cat /kit/glx
#! /bin/sh
cd /usr/lib
rm libEGL.so
ln -s libEGL.so.1.0.0 libEGL.so
rm libGLESv2.so
ln -s libGLESv2.so.2.0.0 libGLESv2.so


cat /kit/glkodi
#! /bin/sh
cd /usr/lib
rm libEGL.so
ln -s /opt/vc/lib/libEGL.so libEGL.so
rm libGLESv2.so
ln -s /opt/vc/lib/libGLESv2.so libGLESv2.so

I was following the latest Kodi developments on both:

https://github.com/xbmc/xbmc/pull/12021
https://github.com/xbmc/xbmc/pull/11986

and wold like to suggest to keep the Raspberry special Kodi build (target) but modify the compilation script and hard link the GL/GLES libs if they are found in /opt/vc/lib

My arguments :
- Raspbian has the same libs in both /usr/lib and /opt/vc/lib
- the destination /opt/vc/lib is hardcoded in the userland cmake scripts (if one will manually update it from the Raspberry git, the files will be compiled and put in /opt/vc)
- there are many other Linux distros that run on the Pi and have a special HowTo to get them installed and running. Usually they just need the Raspbian kernel and userland, therefore, /opt/vc will always be available with the libs contained
- it was working like this in Kodi 17.03 beta - I still don't understand why it has changed

Keep up the good work!
Smile
Reply
#5
(2017-02-04, 05:30)abga Wrote: When Kodi 17 06 -> RC4 starts it looks after these standard libraries in the /usr/lib and if it finds them it will load them and will crash with an Unable to create GUI error, error that is widespread throughout the Kodi forums. My only option is to remove the libmesa package and leave Kodi only with the libs available in /opt/vc/lib, which are not even having the same name (no duplicates) as the standard libEGL & libGLESv2 ones
This issue seems to still exist in 17.6. I built it with these options and ran into the "Unable to create GUI" error, but removing Mesa and making these symlinks:
Code:
ln -s  /opt/vc/lib/libGLESv2.so /usr/lib/
ln -s  /opt/vc/lib/libEGL.so /usr/lib/
solved the problem.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi 17 Krypton RC4 - Raspberry Pi compilation and usage issue0