Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kodi on RPi2, compiling errors - INCLUDE pathing issues
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
jackie225
n00b
n00b


Joined: 23 Jul 2016
Posts: 1

PostPosted: Sat Jul 23, 2016 10:42 pm    Post subject: Kodi on RPi2, compiling errors - INCLUDE pathing issues Reply with quote

Hi All!

I'm really new to gentoo (less than two weeks) and it's been quite a learning curve, and I'm loving it :) I'm pretty much switching all my computers over one by one.
I'm now trying to set up my RPi2 up as a bit of server/kodi media centre but I'm having some rather fun problems with the installation of kodi.

I added the sabayon and sabayon-distro overlays as I came across this https://gpo.zugaina.org/media-tv/kodi-raspberrypi and ran

sudo emerge -a media-tv/kodi-raspberrypi

I had some issues when it tried to build omxplayer (https://gpo.zugaina.org/media-video/omxplayer) but i think i fixed it by adding in some modifications to the patchfile (in bold). There was an issue finding a library file and also bcm_host.h in the /opt/vc/include directory)


Quote:

--- omxplayer-9999/Makefile
+++ omxplayer-9999/Makefile
@@ -2,9 +2,11 @@

CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST

-LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz
+PKGS=freetype2 dbus-1 libavcodec libavutil libavformat libswresample libswscale libpcre
+
+LIBS+=-lrt -lpthread $(shell pkg-config --libs $(PKGS)) -L /opt/vc/lib/

-INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/ -I /usr/include/dbus-1.0 -I /usr/lib/arm-linux-gnueabihf/dbus-1.0/include
+INCLUDES+=$(shell pkg-config --cflags $(PKGS)) -I. -Ilinux -I /opt/vc/include/

DIST ?= omxplayer-dist

@@ -51,8 +47,7 @@
bash gen_version.sh > version.h

omxplayer.bin: version $(OBJS)
- $(CXX) $(LDFLAGS) -o omxplayer.bin $(OBJS) -lvchiq_arm -lvcos -ldbus-1 -lrt -lpthread -lavutil -lavcodec -lavformat -lswscale -lswresample -lpcre
- $(STRIP) omxplayer.bin
+ $(CXX) $(LDFLAGS) -o omxplayer.bin $(OBJS) $(LIBS)

help.h: README.md Makefile
awk '/SYNOPSIS/{p=1;print;next} p&&/KEY BINDINGS/{p=0};p' $< \


fingers crossed i didn't do anything stupid so far :)

so now on to the main event..
Code:

sudo emerge -a media-tv/kodi-raspberrypi

....

checking for main in -lgpg-error... no
configure: error: Could not find a required library. Please see the README for your platform.

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/media-tv/kodi-raspberrypi-16.1/work/xbmc-16.1-Jarvis/config.log
 * ERROR: media-tv/kodi-raspberrypi-16.1::sabayon-distro failed (configure phase):
 *   econf failed
 *
 * Call stack:
 *               ebuild.sh, line  133:  Called src_configure
 *             environment, line 5132:  Called econf '--docdir=/usr/share/doc/kodi-raspberrypi-16.1' '--disable-gl' '--enable-gles' '--with-platform=raspberry-pi' '--disable-sdl' '--enable-optimizations' '--disable-x11' '--disable-goom' '--disable-xrandr' '--disable-mid' '--enable-nfs' '--disable-profiling' '--enable-rsxs' '--disable-debug' '--disable-joystick' '--disable-vaapi' '--disable-vdpau' '--disable-avahi' '--enable-libcec' '--disable-pulse' '--disable-projectm' '--disable-optical-drive' '--disable-dvdcss' '--disable-vtbdecoder' '--enable-alsa' '--enable-player=omxplayer'
 *        phase-helpers.sh, line  662:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line  117:  Called die
 * The specific snippet of code:
 *         die "$@"
 *
 * If you need support, post the output of `emerge --info '=media-tv/kodi-raspberrypi-16.1::sabayon-distro'`,
 * the complete build log and the output of `emerge -pqv '=media-tv/kodi-raspberrypi-16.1::sabayon-distro'`.
 * The complete build log is located at '/var/tmp/portage/media-tv/kodi-raspberrypi-16.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-tv/kodi-raspberrypi-16.1/temp/environment'.
 * Working directory: '/var/tmp/portage/media-tv/kodi-raspberrypi-16.1/work/xbmc-16.1-Jarvis'
 * S: '/var/tmp/portage/media-tv/kodi-raspberrypi-16.1/work/xbmc-16.1-Jarvis'

>>> Failed to emerge media-tv/kodi-raspberrypi-16.1, Log file:

>>>  '/var/tmp/portage/media-tv/kodi-raspberrypi-16.1/temp/build.log'

 * Messages for package media-tv/kodi-raspberrypi-16.1:

 * Unable to find kernel sources at /usr/src/linux
 * Unable to calculate Linux Kernel version for build, attempting to use running version
 * Unable to check for the following kernel config options due
 * to absence of any configured kernel sources or compiled
 * config:
 *  - IP_MULTICAST -
 * In some cases Kodi needs to access multicast addresses.
 * Please consider enabling IP_MULTICAST under Networking options.
 *
 * You're on your own to make sure they are set if needed.
 * ERROR: media-tv/kodi-raspberrypi-16.1::sabayon-distro failed (configure phase):
 *   econf failed
 *
 * Call stack:
 *               ebuild.sh, line  133:  Called src_configure
 *             environment, line 5132:  Called econf '--docdir=/usr/share/doc/kodi-raspberrypi-16.1' '--disable-gl' '--enable-gles' '--with-platform=raspberry-pi' '--disable-sdl' '--enable-optimizations' '--disable-x11' '--disable-goom' '--disable-xrandr' '--disable-mid' '--enable-nfs' '--disable-profiling' '--enable-rsxs' '--disable-debug' '--disable-joystick' '--disable-vaapi' '--disable-vdpau' '--disable-avahi' '--enable-libcec' '--disable-pulse' '--disable-projectm' '--disable-optical-drive' '--disable-dvdcss' '--disable-vtbdecoder' '--enable-alsa' '--enable-player=omxplayer'
 *        phase-helpers.sh, line  662:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line  117:  Called die
 * The specific snippet of code:
 *         die "$@"
 *
 * If you need support, post the output of `emerge --info '=media-tv/kodi-raspberrypi-16.1::sabayon-distro'`,
 * the complete build log and the output of `emerge -pqv '=media-tv/kodi-raspberrypi-16.1::sabayon-distro'`.
 * The complete build log is located at '/var/tmp/portage/media-tv/kodi-raspberrypi-16.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-tv/kodi-raspberrypi-16.1/temp/environment'.
 * Working directory: '/var/tmp/portage/media-tv/kodi-raspberrypi-16.1/work/xbmc-16.1-Jarvis'
 * S: '/var/tmp/portage/media-tv/kodi-raspberrypi-16.1/work/xbmc-16.1-Jarvis'


Code:

sudo emerge --info '=media-tv/kodi-raspberrypi-16.1::sabayon-distro'

Portage 2.2.28 (python 3.4.3-final-0, default/linux/arm/13.0/armv7a/desktop, gcc-4.9.3, glibc-2.22-r4, 4.4.14-v7+ armv7l)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.4.14-v7+-armv7l-with-gentoo-2.2
KiB Mem:      947756 total,    144808 free
KiB Swap:    2047996 total,   2013576 free
Timestamp of repository gentoo: Wed, 20 Jul 2016 08:00:02 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
distcc 3.2rc1 armv7a-hardfloat-linux-gnueabi [enabled]
app-shells/bash:          4.3_p42-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.19.1::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

zugaina
    location: /var/lib/layman/zugaina
    masters: gentoo
    priority: 0

sabayon-distro
    location: /var/lib/layman/sabayon-distro
    masters: gentoo
    priority: 1

sabayon
    location: /var/lib/layman/sabayon
    masters: gentoo
    priority: 2

ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
CHOST="armv7a-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/etc /usr/lib/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=armv7-a"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe -march=armv7-a"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv7-a"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa arm armv5te armv6 armv6t2 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jpeg lcms ldap libnotify mad mng modules mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf php png policykit ppds qt3support qt4 readline sdl seccomp session spell ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets xattr xcb xml xv xvid zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap omapfb dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


Code:
sudo emerge -pqv '=media-tv/kodi-raspberrypi-16.1::sabayon-distro'

[ebuild  N    ] media-tv/kodi-raspberrypi-16.1  USE="X alsa bluetooth cec dbus java nfs opengl samba texturepacker udisks upower usb -airplay -airtunes -avahi (-bluray) -caps -css -debug -gles -joystick -midi -mysql -profile -projectm -pulseaudio (-rtmp) -sftp {-test} (-upnp) (-vaapi) (-vdpau) -webserver" PYTHON_TARGETS="python2_7"


running

Code:
sudo LIBS="-L/opt/vc/lib/" emerge -a media-tv/kodi-raspberrypi


with the LIBS option seemed to fix this problem, but then the process stopped once more again as with omxplayer with the INCLUDE parameter being the problem it seems.

At first it could not locate the 'IL/OMX_Core.h' file called by DllBMC.h (https://github.com/xbmc/xbmc/blob/master/xbmc/linux/DllBCM.h) and stopped at this stage.

Code:
sudo LIBS="-L/opt/vc/lib/" INCLUDE="-I/opt/vc/include/IL" emerge -a media-tv/kodi-raspberrypi


seemed to fix this issue but then it couldn't find 'bcm_host.h' (in /opt/vc/include).

i added another INCLUDE option

Code:
sudo LIBS="-L/opt/vc/lib/" INCLUDE="-I/opt/vc/include/ -I/opt/vc/include/IL" emerge -a media-tv/kodi-raspberrypi


and tried the main path on it's own

Code:
sudo LIBS="-L/opt/vc/lib/" INCLUDE="-I/opt/vc/include/" emerge -a media-tv/kodi-raspberrypi


none of them seemed to make any difference

in desperation and likely some ignorance I tried creating a patchfile to manually add the path these files require thinking that I had broken the path to /opt/vc/include/bcm_host.h with the INCLUDE option in the command above (-I/opt/vc/include/IL).

Code:
--- xbmc/linux/DllOMX.h
+++ xbmc/linux/DllOMX.h
@@ -38,12 +38,12 @@
 #include "DynamicDll.h"
 #include "utils/log.h"
 
-#include <IL/OMX_Core.h>
-#include <IL/OMX_Component.h>
-#include <IL/OMX_Index.h>
-#include <IL/OMX_Image.h>
-#include <IL/OMX_Video.h>
-#include <IL/OMX_Broadcom.h>
+#include </opt/vc/include/IL/OMX_Core.h>
+#include </opt/vc/include/IL/OMX_Component.h>
+#include </opt/vc/include/IL/OMX_Index.h>
+#include </opt/vc/include/IL/OMX_Image.h>
+#include </opt/vc/include/IL/OMX_Video.h>
+#include </opt/vc/include/IL/OMX_Broadcom.h>


That at least got rid of the error messages :P
I realise at this stage I'm applying a bandage a problem that doesn't exist, especially as it did not fix the issue of not being able to find '/opt/vc/include/bcm_host.h'

so...

Code:
--- xbmc/linux/DllBCM.h
+++ xbmc/linux/DllBCM.h
@@ -30,7 +30,7 @@
 #endif
 
 extern "C" {
-#include <bcm_host.h>
+#include </opt/vc/include/bcm_host.h>
 }
 
 #include "DynamicDll.h"


and then

Code:
--- /opt/vc/include/bcm_host.h
+++ /opt/vc/include/bcm_host.h
@@ -47,11 +47,11 @@
 unsigned bcm_host_get_peripheral_size(void);
 unsigned bcm_host_get_sdram_address(void);
 
-#include "interface/vmcs_host/vc_dispmanx.h"
-#include "interface/vmcs_host/vc_tvservice.h"
-#include "interface/vmcs_host/vc_cec.h"
-#include "interface/vmcs_host/vc_cecservice.h"
-#include "interface/vmcs_host/vcgencmd.h"
+#include "/opt/vc/include/interface/vmcs_host/vc_dispmanx.h"
+#include "/opt/vc/include/interface/vmcs_host/vc_tvservice.h"
+#include "/opt/vc/include/interface/vmcs_host/vc_cec.h"
+#include "/opt/vc/include/interface/vmcs_host/vc_cecservice.h"
+#include "/opt/vc/include/interface/vmcs_host/vcgencmd.h"
 
 #ifdef __cplusplus
 }


and down the rabbit hole I go :)

So I've reached what feels like an impasse as I can't find much to go on on how to fix this issue. Should I continue replacing all the paths manually? I know there must be a way to affect the root of all of these pathing issues, but I couldn't find the information so far :(

Is this a problem on my system, the overlay or the kodi source? my impression is it's going to be my system :D

any advice or pointing in the right direction would be greatly appreciated :)

Jackie
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum