egl error while compiling Kodi 17
#1
Using a fresh install of Ubuntu 14.04 LTS for the Pi, with xubuntu dektop. I've built Kodi 16 just fine, but when it comes to Kodi 17, it gives an error...

Code:
CPP     xbmc/windowing/egl/EGLNativeTypeRaspberryPI.o
EGLNativeTypeRaspberryPI.cpp: In member function ‘virtual bool CEGLNativeTypeRaspberryPI::ProbeResolutions(std::vector<RESOLUTION_INFO>&)’:
EGLNativeTypeRaspberryPI.cpp:529:32: error: ‘VC_LCD_ATTACHED_DEFAULT’ was not declared in this scope
     else if ((tv_state.state & VC_LCD_ATTACHED_DEFAULT) != 0) // lcd
                                ^
make[1]: *** [EGLNativeTypeRaspberryPI.o] Error 1
make: *** [xbmc/windowing/egl/windowing_egl.a] Error 2

My understanding, is using egl in Kodi is a new thing. I just don't know if this is a bug, or I have the wrong package of some sort installed. I want to install libegl1-mesa-dev, but it complains that libraspberrypi-dev will screw things up. I tried building Ubuntu without libraspberrypi-dev, but that brought up other issues. I even tried using --disable-egl... it didn't work. Tongue

Any ideas?
Reply
#2
What is your version of the pi firmware ?

I had a problem building master on Raspian Jessie some months ago, which was solved using a later version of the firmware.
Firmware versions after Dec 8 2015 should be ok.

I have a build of Kodi master (17.0-ALPHA1 Git:2016-04-25-eddf7ee Media Center Kodi) running on Ubuntu Mate Raspberry 15.10 (Wily). This is using Firmware: Apr 23 2016 12:23:18, version f7b1f98b10da9d5d0961807f4667fe38ef28dda6 (clean) (release)

Note: Ubuntu Mate Raspberry 16.04 (Xenial) is now available, I have not, yet, tried building Kodi.

Mike
Reply
#3
(2016-04-27, 10:01)MikeB2013 Wrote: What is your version of the pi firmware ?

I had a problem building master on Raspian Jessie some months ago, which was solved using a later version of the firmware.
Firmware versions after Dec 8 2015 should be ok.

I have a build of Kodi master (17.0-ALPHA1 Git:2016-04-25-eddf7ee Media Center Kodi) running on Ubuntu Mate Raspberry 15.10 (Wily). This is using Firmware: Apr 23 2016 12:23:18, version f7b1f98b10da9d5d0961807f4667fe38ef28dda6 (clean) (release)

Note: Ubuntu Mate Raspberry 16.04 (Xenial) is now available, I have not, yet, tried building Kodi.

Mike

Thanks, Mike.

Ubuntu 14.04 doesn't use rpi-firmware.. rpi-update doesn't work. I've tried Ubuntu Mate 15.10, but prefer regular Ubuntu.. basically because it will be supported until 2020 or so. Ubuntu Mate 16.04 was a little buggy.. they're already planning a July release. I couldn't build on it anyway.. a lot of the stuff isn't in the xenial repos yet.

I'm not sure this is firmware related.. it's video drivers.

I'll try Mate 15.10 again.
Reply
#4
You need rpi firmware,userland libs and includes recent enough, and kodi buildsystem must know where to find those.
Not sure which version is shipped in ubuntu and where all this stuff is located.
VC_LCD_ATTACHED_DEFAULT is declared here https://github.com/raspberrypi/userland/...efs.h#L354
In raspbian it's located in /opt/vc so to build kodi you would need to do something like

Code:
export CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
export LDFLAGS="-L/opt/vc/lib"

and then all the usual stuff (bootstrap|configure|make).
In configure add
Code:
---with-platform=raspberry-pi2 --enable-player=omxplayer

Better ask on ubuntu forums about versions and locations and another tip: start with easier stuff and figure out the basics of linux software building first.
Reply
#5
(2016-04-27, 20:27)asavah Wrote: You need rpi firmware,userland libs and includes recent enough, and kodi buildsystem must know where to find those.
Not sure which version is shipped in ubuntu and where all this stuff is located.
VC_LCD_ATTACHED_DEFAULT is declared here https://github.com/raspberrypi/userland/...efs.h#L354
In raspbian it's located in /opt/vc so to build kodi you would need to do something like

Code:
export CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
export LDFLAGS="-L/opt/vc/lib"

and then all the usual stuff (bootstrap|configure|make).
In configure add
Code:
---with-platform=raspberry-pi2 --enable-player=omxplayer

Better ask on ubuntu forums about versions and locations and another tip: start with easier stuff and figure out the basics of linux software building first.

Thanks asavah.

I already have that in my config line.. it's from the kodi15.txt instructions floating around. But in Ubuntu, /opt/vc/ gets changed to /usr/. As for raspberry-pi2.. that's for popcornmix's releases.. I'm building directly from -b master. I never did get popcornmix's compiled with --with-platform=raspberry-pi2.

But as I said.. I've already built kodi 16... it's kodi 17 that's having issues.
Reply
#6
Well.. I got Kodi 17 compiled on Ubuntu Mate 15.10 successfully. I had an issue with it before, an ffmpeg error in the dvdlayout section. The only difference with this build, was I installed libtag1-dev, instead of the one supplied in kodi 16's source. I don't see that being the issue though, so it may have been a ccache error, as suggested in another thread. That's Ubuntu Mate. Regular Ubuntu 14.04 still has that egl error. I guess I'm running Ubuntu Mate then. Smile

I have Mate running on an external drive, as well as a usb stick turned to a swap partition. Using make -j4 works fine for me, but some may need to use make -j3 instead. I also install libspeex-dev, then add --enable-libspeex to ~/kodi/tools/depends/target/ffmpeg/autobuild.sh. That's what --with-ffmpeg=auto is for. It's for a certain plugin, that uses speex audio. 'nuff said. Tongue

Code:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo rpi-update

sudo apt-get install build-essential make git-core checkinstall

sudo apt-get install libboost1.58-all-dev swig curl libgnutls-dev libxml2-dev libxslt1-dev libfreetype6-dev libfontconfig1-dev libfribidi-dev libmpeg2-4-dev libmad0-dev libjpeg8-dev libsamplerate0-dev libogg-dev libvorbis-dev libflac-dev libtiff5-dev liblzo2-dev cmake zip unzip libsqlite3-dev libpng12-dev libpcre3-dev libjasper-dev libsdl1.2-dev libsdl-image1.2-dev libass-dev libmodplug-dev libcdio-dev libtinyxml2-dev libyajl-dev libgpg-error-dev libgcrypt11-dev libmicrohttpd-dev autoconf libtool autopoint libudev-dev python-dev python-imaging libmysqlclient-dev libcurl4-gnutls-dev libbz2-dev libtinyxml-dev libssh-dev libxrandr-dev libsmbclient-dev libcap-dev gawk gperf debhelper libiso9660-dev liblockdev1-dev ccache git-core checkinstall default-jre doxygen librtmp-dev libnfs-dev libgif-dev libplist-dev libshairport-dev libbluray-dev libbluray1 libbluetooth-dev uuid-dev libtag1-dev


git clone -b master git://github.com/xbmc/xbmc.git kodi


git clone --recursive git://github.com/Pulse-Eight/libcec.git

cd libcec/src/platform
mkdir build
cd build
cmake ..
make -j4
sudo make install
cd


cd libcec
mkdir build
cd build
cmake -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib ..
make -j4
sudo make install
cd


sudo make -C kodi/tools/depends/target/crossguid PREFIX=/usr/local


cd kodi/project

git clone -b master https://github.com/kodi-pvr/pvr.hts.git


cmake -DADDONS_TO_BUILD=pvr.hts -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../kodi/addons -DPACKAGE_ZIP=1 ../../kodi/project/cmake/addons

make -j4


cd ..

./bootstrap


CFLAGS="-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -mfloat-abi=hard -mcpu=cortex-a7 -mfpu=neon-vfpv4" CXXFLAGS="-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -mfloat-abi=hard -mcpu=cortex-a7 -mfpu=neon-vfpv4" LDFLAGS="-L/opt/vc/lib" FFMPEG_OPTS="--cpu=cortex-a7" ./configure --disable-gl --enable-gles --with-platform=raspberry-pi --disable-x11 --disable-vaapi --disable-vdpau --disable-avahi --enable-libcec --disable-pulse --enable-optical-drive --enable-dvdcss --enable-libusb --disable-vtbdecoder --enable-alsa --enable-player=omxplayer --enable-libbluray --with-ffmpeg=auto


make -j4

sudo checkinstall


** 10 to 20 minutes later.....


tar: (India): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
OK

Stripping ELF binaries and libraries...OK

Compressing man pages...OK

Building file list...OK

Building Debian package...OK

Installing Debian package...OK

Erasing temporary files...OK

Deleting temp dir...OK


**********************************************************************

Done. The new package has been installed and saved to

/home/ubuntu/kodi/kodi_17.0.000-1_armhf.deb

You can remove it from your system anytime using:

      dpkg -r kodi

**********************************************************************
Reply
#7
Thanks for sharing, greenbag! I will try to compile on regular raspbian within the next days following your how-to ...
Reply
#8
(2016-04-28, 16:55)rucksman Wrote: Thanks for sharing, greenbag! I will try to compile on regular raspbian within the next days following your how-to ...

The packages might be a bit different, but it's still the same.
Reply
#9
One package for sure... if building on Raspbian, don't install libbluray packages from the repos. You'll need to build that in manually. At least I did. If you already built it in when building kodi 16 from the steps I gave before, then it'll already be in your system.
Reply
#10
(2016-04-27, 20:27)asavah Wrote:
Code:
In configure add
[code]
---with-platform=raspberry-pi2 --enable-player=omxplayer

You were right. I just built 17 on the new Ubuntu Mate 16.04 LTS, and using rpi2 worked. I was going by what the Kodi15.txt guide said, and that it was only for popcornmix's sources.

Code:
### if using newclock4 branch, use 'with-platform=raspberry-pi2' (instead of ..-pi)

But I guess that was 2 versions ago, and the code is now in the master.

Thanks. Smile
Reply
#11
(2016-04-30, 13:00)greenbag Wrote:
(2016-04-27, 20:27)asavah Wrote:
Code:
In configure add
[code]
---with-platform=raspberry-pi2 --enable-player=omxplayer

You were right. I just built 17 on the new Ubuntu Mate 16.04 LTS, and using rpi2 worked. I was going by what the Kodi15.txt guide said, and that it was only for popcornmix's sources.

Code:
### if using newclock4 branch, use 'with-platform=raspberry-pi2' (instead of ..-pi)

But I guess that was 2 versions ago, and the code is now in the master.

Thanks. Smile

Try popcornmix's excellent newclock5 branch, it has a bunch of optimizations and patches which are not yet in master.
Reply
#12
(2016-04-30, 14:32)asavah Wrote:
(2016-04-30, 13:00)greenbag Wrote:
(2016-04-27, 20:27)asavah Wrote:
Code:
In configure add
[code]
---with-platform=raspberry-pi2 --enable-player=omxplayer

You were right. I just built 17 on the new Ubuntu Mate 16.04 LTS, and using rpi2 worked. I was going by what the Kodi15.txt guide said, and that it was only for popcornmix's sources.

Code:
### if using newclock4 branch, use 'with-platform=raspberry-pi2' (instead of ..-pi)

But I guess that was 2 versions ago, and the code is now in the master.

Thanks. Smile

Try popcornmix's excellent newclock5 branch, it has a bunch of optimizations and patches which are not yet in master.

I had issues with it before, but that's a few months back, before I had a successful compile of any version. I think it was my dependency packages, or just my steps. I just got it to compile 2 nights ago, but the pvr.hts from master branch wouldn't work with his source. Searching came across an older post, where someone had same issue, and was told to use the pvr.hts from milhouse. I haven't gotten there yet. The main reason I wanted the newclock version, is from what I've heard, it's the same as OpenELEC. My remote works out of the box in OE, but it's limited functions in my own build of the master. I thought it might be in his source. It didn't make a difference. Tongue



edit: I just looked at the branch selector tab at pvr.hts's github page, and it has 3.01 available.. I think I have 3.0.0. I'll try again later with popcornmix's master branch.
Reply
#13
WoW. Using the pi2 flag sure makes a difference! My OTA live tv is so much smoother. I used to have to sync to display.. even though I've read popcornmix say sync display to video. Syncing to video would result in my display blanking here and there. But with rpi2 optimizations, it's silky smooth without changing any settings. The picture even looks better.. unless that's the egl being used now. Hell.. I even pulled in 5 new stations while scanning. Maybe a coincidence, or just seasonal.
Reply
#14
(2016-04-28, 02:37)greenbag Wrote:
Code:
CFLAGS="-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -mfloat-abi=hard -mcpu=cortex-a53 -mfpu=neon-fp-armv8" CXXFLAGS="-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -mfloat-abi=hard -mcpu=cortex-a53 -mfpu=neon-fp-armv8" LDFLAGS="-L/opt/vc/lib" FFMPEG_OPTS="--cpu=cortex-a53" ./configure --disable-gl --enable-gles --with-platform=raspberry-pi --disable-x11 --disable-vaapi --disable-vdpau --disable-avahi --enable-libcec --disable-pulse --enable-optical-drive --enable-dvdcss --enable-libusb --disable-vtbdecoder --enable-alsa --enable-player=omxplayer --enable-libbluray --with-ffmpeg=auto

I just got Kodi 17 compiled on a Raspberry Pi 3 following the instructions from greenbag ... thanks!
I changed the CFLAGS as noted above.
The package list that I installed did not exactly match the one initially given. Sorry, I did not keep notes on that but it was not too far off.

I am now trying to figure out if I can add support for an eGalax touchscreen to this build.
I read in a different thread that Kodi 17 makes this easier. Does anybody know anything about this before I start digging?
Reply
#15
(2016-08-12, 14:38)northriver Wrote: I am now trying to figure out if I can add support for an eGalax touchscreen to this build.
I read in a different thread that Kodi 17 makes this easier. Does anybody know anything about this before I start digging?

There is a means of calibrating touchscreen through advancedsettings.xml that wasn't in kodi 16,
https://github.com/xbmc/xbmc/pull/7978
Reply

Logout Mark Read Team Forum Stats Members Help
egl error while compiling Kodi 170