Kodi Community Forum

Full Version: newclock4 build fail '--with-platform=raspberry-pi'; "lgpg-error" not found
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm building in a local Raspbian chroot (on Opensuse)
Code:
lsb_release -a
        No LSB modules are available.
        Distributor ID: Raspbian
        Description:    Raspbian GNU/Linux testing (jessie)
        Release:        testing
        Codename:       jessie
for target RPi, from popcornmix's newclock4 sources,
Code:
git log | head
        commit a5f3cacf300a8bcc12d7b55de5739f9d328c5f44
        Author: popcornmix <[email protected]>
        Date:   Mon Aug 25 18:32:04 2014 +0100

            [omxcodec] Tidy up 2

        commit d1a80ce65f92f59274db89a9153595f42ccc719d
        Author: popcornmix <[email protected]>
        Date:   Mon Aug 25 16:43:00 2014 +0100
with libgpg-error installed,
Code:
find / | grep libgpg-error | grep "\.so"
        /usr/lib/arm-linux-gnueabihf/libgpg-error.so
        /lib/arm-linux-gnueabihf/libgpg-error.so.0.11.0
        /lib/arm-linux-gnueabihf/libgpg-error.so.0
and
Code:
cat /etc/ld.so.conf.d/arm-linux-gnueabihf.conf
        /lib/arm-linux-gnueabihf
        /usr/lib/arm-linux-gnueabihf
configuring
Code:
./configure --with-platform=raspberry-pi
        ...
        checking for gcrypt.h... yes
        checking for main in -lgpg-error... no
        configure: error: Could not find a required library. Please see the README for your platform.
but, without the platofrm spec
Code:
./configure
    ...
    checking for gcrypt.h... yes
    checking for main in -lgpg-error... yes
    checking for gcry_control in -lgcrypt... yes
    ...

libgpg-error is clearly there. unclear what's unique about the rasppberry-pi spec'n that causes the 'miss'.

EDIT

As a test, I (re)checked-out clean/latest trees for both "newclock3" & "newclock4" branches
Code:
cd  ./newclock3
./configure                               OK
./configure --with-platform=raspberry-pi  OK

cd ../newclock4
./configure                               OK
./configure --with-platform=raspberry-pi  FAIL @ missing "-lgpg-error"

I.e., only ./configure of newclock4, with opt "--with-platform=raspberry-pi" currently fails to find lgpg-error
what
Code:
ldd /usr/lib/arm-linux-gnueabihf/libgpg-error.so
says? you have
Code:
-L/usr/lib/arm-linux-gnueabihf
in your $LDFLAGS ?
also paste the whole config.log from xbmc after you get the error
Actually I just got this on a clean build (I think if you build newclock3 first and then newclock4, I think it works).

The error in config.log was:
Code:
/home/dc4/projects/projects_v7/OpenELEC.tv/build.OpenELEC-RPi.arm-devel/toolchain/lib/gcc/armv7a-openelec-linux-gnueabi/4.9.1/../../../../armv7a-openelec-linux-gnueabi/bin/ld.gold: error: cannot find -lmmal
/home/dc4/projects/projects_v7/OpenELEC.tv/build.OpenELEC-RPi.arm-devel/toolchain/lib/gcc/armv7a-openelec-linux-gnueabi/4.9.1/../../../../armv7a-openelec-linux-gnueabi/bin/ld.gold: error: cannot find -lmmal_core
/home/dc4/projects/projects_v7/OpenELEC.tv/build.OpenELEC-RPi.arm-devel/toolchain/lib/gcc/armv7a-openelec-linux-gnueabi/4.9.1/../../../../armv7a-openelec-linux-gnueabi/bin/ld.gold: error: cannot find -lmmal_util
collect2: error: ld returned 1 exit status

I fixed it with:
Code:
cp ./build.OpenELEC-RPi.arm-devel/bcm2835-driver-fb3e439/hardfp/opt/vc/lib/libmmal.so ./build.OpenELEC-RPi.arm-devel/toolchain/armv7a-openelec-linux-gnueabi/sysroot/usr/lib
cp ./build.OpenELEC-RPi.arm-devel/bcm2835-driver-fb3e439/hardfp/opt/vc/lib/libmmal_core.so ./build.OpenELEC-RPi.arm-devel/toolchain/armv7a-openelec-linux-gnueabi/sysroot/usr/lib
cp ./build.OpenELEC-RPi.arm-devel/bcm2835-driver-fb3e439/hardfp/opt/vc/lib/libmmal_utils.so ./build.OpenELEC-RPi.arm-devel/toolchain/armv7a-openelec-linux-gnueabi/sysroot/usr/lib

I think the build system does copy these files, but possibly not early enough to make the configure stage work.
Ah - I think this patch may be needed. Milhouse can confirm:
Code:
diff --git a/packages/graphics/bcm2835-driver/package.mk b/packages/graphics/bcm2835-driver/package.mk
index cfcc8c8..0823d88 100644
--- a/packages/graphics/bcm2835-driver/package.mk
+++ b/packages/graphics/bcm2835-driver/package.mk
@@ -48,6 +48,10 @@ make_target() {
     cp -PRv $FLOAT/opt/vc/lib/libbcm_host.so $SYSROOT_PREFIX/usr/lib
     cp -PRv $FLOAT/opt/vc/lib/libvchiq_arm.so $SYSROOT_PREFIX/usr/lib
     cp -PRv $FLOAT/opt/vc/lib/libvcos.so $SYSROOT_PREFIX/usr/lib
+    cp -PRv $FLOAT/opt/vc/lib/libmmal.so $SYSROOT_PREFIX/usr/lib
+    cp -PRv $FLOAT/opt/vc/lib/libmmal_core.so $SYSROOT_PREFIX/usr/lib
+    cp -PRv $FLOAT/opt/vc/lib/libmmal_util.so $SYSROOT_PREFIX/usr/lib
+    cp -PRv $FLOAT/opt/vc/lib/libmmal_vc_client.so $SYSROOT_PREFIX/usr/lib
}

makeinstall_target() {
@@ -61,6 +65,10 @@ makeinstall_target() {
     cp -PRv $FLOAT/opt/vc/lib/libopenmaxil.so $INSTALL/usr/lib
     cp -PRv $FLOAT/opt/vc/lib/libvchiq_arm.so $INSTALL/usr/lib
     cp -PRv $FLOAT/opt/vc/lib/libvcos.so $INSTALL/usr/lib
+    cp -PRv $FLOAT/opt/vc/lib/libmmal.so $INSTALL/usr/lib
+    cp -PRv $FLOAT/opt/vc/lib/libmmal_core.so $INSTALL/usr/lib
+    cp -PRv $FLOAT/opt/vc/lib/libmmal_util.so $INSTALL/usr/lib
+    cp -PRv $FLOAT/opt/vc/lib/libmmal_vc_client.so $INSTALL/usr/lib

# some usefull debug tools
   mkdir -p $INSTALL/usr/bin
Yes, that patch is required (and called "keep/build/enable_mmal.patch" in my hacked together build system, the patch applied in oepull.sh).
milhouse, can you PR this patch for our master?
Will do (created PR:3451).
Hi, is there a way to "duplicate" this patch for a non-openelec build? I have the exact same error on a cc machine since beta1 (till alpha4 builds were ok). Thanks in advance
Shouldn't really be that hard, just track down where the firmware libraries are referenced and add the mmal libraries, although chances are your problem is due to re-branding as this mmal change pre-dates the alpha builds.
yup, you're right, just needed to copy the libs...(still donĀ“t know why it broke)

anyways, ill leave here what i needed to copy:

/opt/vc/lib/libmmal.so /usr/lib/arm-linux-gnueabihf/libmmal.so
/opt/vc/lib/libmmal_core.so /usr/lib/arm-linux-gnueabihf/libmmal_core.so
/opt/vc/lib/libmmal_util.so /usr/lib/arm-linux-gnueabihf/libmmal_util.so
/opt/vc/lib/libmmal_vc_client.so /usr/lib/arm-linux-gnueabihf/libmmal_vc_client.so
add to LDFLAGS
export LDFLAGS="-march=$TARGET_SUBARCH -mtune=$TARGET_CPU $TARGET_LOPT -L /usr/lib/arm-linux-gnueabihf"
Hi,

I have the same issue as in the title.
I am trying to ./configure KODI Helix 14.0 RC3 from git on Raspberry PI.
I have libgpg-error-dev installed.
The config.log file is at http://pastebin.com/tCs22Hhb

[edit] Worked after folowing the copy steps above.

Andrei
Code:
/usr/bin/ld: cannot find -lmmal
/usr/bin/ld: cannot find -lmmal_core
/usr/bin/ld: cannot find -lmmal_util

see #11
Hello and sorry to disturb you from your rather profound meditation, but I might need some help over here and ran out of ideas.
First, I'd like to thank you for the resolution provided in this thread, as it was my first problem that I've solved by adding LDFLAGS="-L /opt/vc/lib/" before configuring Kodi and managed to get rid of the reported confusing lgpg-error that actually hasn't had anything to do with the real dependencies issue:
/usr/bin/ld: cannot find -lmmal
/usr/bin/ld: cannot find -lmmal_core
/usr/bin/ld: cannot find -lmmal_util


Now, to be more specific, I'm trying to compile a minimal and PVR (tvheadend) specific Kodi popcornmix (newclock 5) - with omxplayer and support for OpenMAX (not really sure why I need this one, tried to disable it with --disable-openmax without any success) on a Slackware (14.2)-CURRENT arm HF driven Pi2B and failing due to some openmax dependencies, detailed in the following make error lines:

- I deliberately renamed the release (folder) in xbmc-16.1-Jarvis because I'm using a Slackbuild script to build and generate a Slackware package and I've found it simpler to just rename the archive&folder instead of modifying parts of the script
__________________________________________________________________________________________
In file included from /kit/tmp/SBo/xbmc-16.1-Jarvis/xbmc/linux/OMXCore.h:33:0,
from /kit/tmp/SBo/xbmc-16.1-Jarvis/xbmc/linux/OMXClock.h:26,
from /kit/tmp/SBo/xbmc-16.1-Jarvis/xbmc/cores/omxplayer/OMXAudio.h:31,
from Sinks/AESinkPi.h:29,
from AESinkFactory.cpp:29:
/kit/tmp/SBo/xbmc-16.1-Jarvis/xbmc/linux/DllOMX.h:35:25: fatal error: IL/OMX_Core.h: No such file or directory
compilation terminated.
ar crs addons.a Addon.o AddonBuilder.o BinaryAddonCache.o AddonDatabase.o AddonInstaller.o AddonManager.o AddonStatusHandler.o AddonSystemSettings.o AddonVersion.o AudioEncoder.
/kit/tmp/SBo/xbmc-16.1-Jarvis/Makefile.include:97: recipe for target 'AESinkFactory.o' failed
make[1]: *** [AESinkFactory.o] Error 1
make[1]: Leaving directory '/kit/tmp/SBo/xbmc-16.1-Jarvis/xbmc/cores/AudioEngine'
Makefile:428: recipe for target 'xbmc/cores/AudioEngine/audioengine.a' failed
make: *** [xbmc/cores/AudioEngine/audioengine.a] Error 2
make: *** Waiting for unfinished jobs....
/usr/bin/ccache g++ -MF OverlayRenderer.d -MD -c -O2 -DNDEBUG=1 -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu++11 -DTARGET_POSIX -DTARGET_LINUX
&& cp OverlayRenderer.d OverlayRenderer.P && sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$//' -e '/^$/ d' -e 's/$/ :/' < OverlayRenderer.d >> OverlayRenderer.P && rm -f Overla
make[1]: Leaving directory '/kit/tmp/SBo/xbmc-16.1-Jarvis/xbmc/addons'
/usr/bin/ccache g++ -MF OverlayRendererUtil.d -MD -c -O2 -DNDEBUG=1 -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu++11 -DTARGET_POSIX -DTARGET_L
&& cp OverlayRendererUtil.d OverlayRendererUtil.P && sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$//' -e '/^$/ d' -e 's/$/ :/' < OverlayRendererUtil.d >> OverlayRendererUtil.P
/usr/bin/ccache g++ -MF OverlayRendererGUI.d -MD -c -O2 -DNDEBUG=1 -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu++11 -DTARGET_POSIX -DTARGET_LI
&& cp OverlayRendererGUI.d OverlayRendererGUI.P && sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$//' -e '/^$/ d' -e 's/$/ :/' < OverlayRendererGUI.d >> OverlayRendererGUI.P &&
/usr/bin/ccache g++ -MF RenderCapture.d -MD -c -O2 -DNDEBUG=1 -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu++11 -DTARGET_POSIX -DTARGET_LINUX -
&& cp RenderCapture.d RenderCapture.P && sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$//' -e '/^$/ d' -e 's/$/ :/' < RenderCapture.d >> RenderCapture.P && rm -f RenderCapture.
In file included from /kit/tmp/SBo/xbmc-16.1-Jarvis/xbmc/linux/RBP.h:38:0,
from RenderCapture.h:142,
from RenderCapture.cpp:21:
/kit/tmp/SBo/xbmc-16.1-Jarvis/xbmc/linux/DllBCM.h:33:22: fatal error: bcm_host.h: No such file or directory
compilation terminated.
/kit/tmp/SBo/xbmc-16.1-Jarvis/Makefile.include:97: recipe for target 'RenderCapture.o' failed
make[1]: *** [RenderCapture.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/kit/tmp/SBo/xbmc-16.1-Jarvis/xbmc/cores/VideoPlayer/VideoRenderers'
Makefile:428: recipe for target 'xbmc/cores/VideoPlayer/VideoRenderers/VideoRenderer.a' failed
make: *** [xbmc/cores/VideoPlayer/VideoRenderers/VideoRenderer.a] Error 2
_________________________________________________________________________________


I'm building Kodi natively and I didn't set up a chroot / sysroot, therefore I tried to add the path to the Raspberry Firmware and Libs, like I did with the missing mmal deps, with the help of LDFLAGS="-L /opt/vc/lib/ -L /opt/vc/include" and I'm still failing. Additionally, by considering that all the patches have merged into the latest Kodi releases, I tried both Kodi 16.1 Stable and latest master branch 17.03 Beta, but to no avail. Worth to mention that although I'm running Slackware, I'm using Raspberry's original and actual (some weeks ago) kernel and /opt/vc (firmware) and the needed dependencies are functional and available in /opt/vc:

cat /etc/ld.so.conf
/lib
/usr/lib
/usr/local/lib
/usr/arm-slackware-linux-gnueabi/lib
/opt/vc/lib


ls -al /opt/vc/include/
total 48
drwxr-xr-x 11 root root 4096 Sep 23 05:34 .
drwxr-xr-x 7 root root 4096 Sep 23 05:34 ..
drwxr-xr-x 2 root root 4096 Sep 23 05:34 EGL
drwxr-xr-x 2 root root 4096 Sep 23 05:34 GLES
drwxr-xr-x 2 root root 4096 Sep 23 05:34 GLES2
drwxr-xr-x 2 root root 4096 Sep 23 05:34 IL
drwxr-xr-x 2 root root 4096 Sep 23 05:34 KHR
drwxr-xr-x 2 root root 4096 Sep 23 05:34 VG
drwxr-xr-x 2 root root 4096 Sep 23 05:34 WF
-rw-r--r-- 1 root root 2342 Aug 21 2015 bcm_host.h
drwxr-xr-x 8 root root 4096 Sep 23 05:34 interface
drwxr-xr-x 2 root root 4096 Sep 23 05:34 vcinclude

and

ls -al /opt/vc/include/IL/
total 472
drwxr-xr-x 2 root root 4096 Sep 23 05:34 .
drwxr-xr-x 11 root root 4096 Sep 23 05:34 ..
-rw-r--r-- 1 root root 82279 Feb 9 2016 OMX_Audio.h
-rw-r--r-- 1 root root 98109 Sep 22 11:07 OMX_Broadcom.h
-rw-r--r-- 1 root root 23869 Aug 21 2015 OMX_Component.h
-rw-r--r-- 1 root root 71220 Apr 1 2016 OMX_Core.h
-rw-r--r-- 1 root root 3229 Aug 21 2015 OMX_ILCS.h
-rw-r--r-- 1 root root 37454 Sep 23 2015 OMX_IVCommon.h
-rw-r--r-- 1 root root 14684 Aug 21 2015 OMX_Image.h
-rw-r--r-- 1 root root 41087 Sep 22 11:07 OMX_Index.h
-rw-r--r-- 1 root root 18255 Aug 21 2015 OMX_Other.h
-rw-r--r-- 1 root root 13146 Aug 21 2015 OMX_Types.h
-rw-r--r-- 1 root root 45522 Feb 9 2016 OMX_Video.h

QUESTION - is there any specific place (Makefile) where I can hard code the path to the missing openmax deps or any trick to make the build scripts see them, without setting up a cross-compilation / toolchain /sysroot environment (useless, since I can compile Kodi natively in 25 minutes and my SD Card is a very good and resisting Samsung EVO). I can build all Kodi releases starting from 15.2 up to the actual Beta if I don't use --with-platform=raspberry-pi2 --enable-player=omxplayer.

Thanks!

____________________________________________________
Following are my actual configure parameters (maybe you can help me with one that disables the unneeded airplay too):

./configure \
--prefix=/usr \
--with-platform=raspberry-pi2 \
--enable-player=omxplayer \
--disable-debug \
--with-lirc-device=/var/run/lirc/lircd \
--with-ffmpeg=shared \
--disable-x11 \
--disable-gl \
--enable-gles \
--disable-libcec \
--disable-nfs \
--disable-optical-drive \
--disable-dvdcss \
--disable-libbluray \
--disable-joystick \
--disable-vtbdecoder \
--disable-vaapi \
--disable-vdpau \
--disable-avahi \
--enable-alsa \
--enable-pulse \
--disable-asap-codec \
--disable-mysql \
--disable-webserver \
--disable-upnp \
--disable-mdnsembedded \
--enable-texturepacker
_________

Kodi Configuration:
------------------------
Kodi Version: 17.0-BETA3
git Rev.: Unknown
Debugging: No
Profiling: No
Optimization: Yes
SWIG Available: Yes
JRE Available: Yes
Doxygen Available: Yes
Crosscomp.: No
target ARCH: arm
target CPU: cortex-a7
OpenGLES: Yes
ALSA: Yes
DBUS: Yes
VDPAU: No
VAAPI: No
OpenMax: No
X11: No
Bluray: No
XSLT scrapers: Yes
TexturePacker:Yes
MID Support: No
ccache: Yes
ALSA Support: Yes
PulseAudio: Yes
Google Test Framework Configured: Yes
Avahi: No
mDNSEmbedded: No
Non-free: Yes
MySQL: No
Webserver: No
libssh support: Yes
libsmbclient support: Yes
libnfs client support:No
AirPlay support: Yes
AirTunes support: No
UPnP support: No
Optical drive: No
libudev support: Yes
libusb support: No
libcec support: No
lcms2 support: Yes
libbluetooth support: Yes
libcap support: Yes
additional players: Yes, omxplayer
additional codecs: No
prefix: /usr
_______________
Apparently I got over it by manually copying the following dependencies from /opt/vc/include :

drwxr-xr-x 2 root root 4096 Oct 14 08:58 IL
-rw-r--r-- 1 root root 2342 Oct 14 08:50 bcm_host.h
drwxr-xr-x 8 root root 4096 Sep 23 05:34 interface
drwxr-xr-x 2 root root 4096 Oct 14 08:58 vcinclude

into the /kit/tmp/SBo/xbmc-16.1-Jarvis/xbmc/linux directory, where they were needed and statically linked in some .h files with include statements. Why?
I hope that there are no permanent static linking (relative/absolute) inherited in the resulting build, otherwise Kodi will not work without having them in that specific place...

And then, just for encouragement, I got into another EGL related issue - opened here:
http://forum.kodi.tv/showthread.php?tid=...pid2436419

I was wondering why is the pretty standard /opt/vc folder not checked during the configure script / make file? There should be some standards/discipline, otherwise things are getting really messy and it's a pity for such a great project like Kodi. I must confess, I had a lot of issues with missing libs, then crash-testing the Kodi configure/make scripts and I'm still grateful that my SdCard hasn't got destroyed by my ~ at least 50 build attempts (including removing the whole build directory and unpacking a fresh Kodi.tgz).
Pages: 1 2