Kodi 16.1 Build Error LD on Raspberry Pi - Slackware ARM
#1
Hi there!

I'm desperately (for two weeks now) trying to set up a simple tvheadend - backend -- kodi - frontend PVR combo on a raspberry pi 2 running Slackware arm current (32bit HardFloat). I tried to figure all the issues - mainly a ton of needed unneeded dependencies - on my own and hesitated to ask for help until I ended up with a pretty curious build error. I know you only support Ubuntu and I respect that, but Slackware is the only distro I've been using for the last 18 years and it's for me still the fastest, cleanest and simplest of all. Cool
Currently, after dropping kodi 15.2 / 16.0 (which both failed in the same stage as I'm describing now), I'm trying to compile directly on the Raspberry Pi the xbmc-16.1-Jarvis and ffmpeg-2.8.6-Jarvis-16.0 and I'm getting an error apparently at the end of the Makefile - ld command:

collect2: error: ld returned 1 exit status
Makefile:437: recipe for target 'kodi.bin' failed
make: *** [kodi.bin] Error 1

Some extra info before I paste the confs and the last make steps ante-error. I bought the MPEG2 license from Raspberry and I built ffmpeg with HW Accel support (MMAL), the Raspberry VC libraries are available and working in the /opt/vc/lib folder, the GLES libs are both available in /usr/lib (the ones that come with Slack) and in /opt/vc/lib (the ones specific for the Pi). The only nasty trick I needed to adopt was stealing the libtinyXML.so from an arm-32-bit-hf Debian package, as I was unable to build the .so lib on my own (actually I was irritated about your choice with that rather unfinished work and then just got lazy&bored). The stolen .so works and the other necessary libtinywathever a. libs I've compiled on my own. Ffmpeg on it's own compiles ok, I tried to use it as shared (kodi 16.0 upwards takes it) but ended up with the same error.

I'd be really happy to know why ld drops the error and actually cannot find a lot of ffmpeg related "undefined reference"s. I'd also like to mention that I removed the ffmpeg x264 support for the same reason, as it was the first error before these ones and I thought it was my fault in not properly compiling the x264 libs from git.

Many thanks in advance! Blush

Some important startup/environmental stuff:
export PATH="$PATH:$PWD/tools/depends/native/JsonSchemaBuilder/bin"
export PATH="$PATH:/opt/java/bin"
# as Kodi doesn't support any --extra-cflags and I badly need some HW specific for performance
CFLAGS="-O2 -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard"
# manually prepare some deps - otherwise kodi build fails
make -C tools/depends/target/libdcadec PREFIX=/usr/local
make -C tools/depends/target/crossguid PREFIX=/usr/local

Kodi configure statement:
./configure \
--prefix=/usr \
--with-lirc-device=/var/run/lirc/lircd \
--enable-static=no \
--disable-debug \
--disable-libcec \
--disable-nfs \
--disable-x11 \
--disable-openmax \
--disable-optical-drive \
--disable-dvdcss \
--disable-libbluray \
--disable-joystick \
--disable-vtbdecoder \
--disable-vaapi \
--disable-vdpau \
--disable-avahi \
--disable-gl \
--enable-gles \
--enable-alsa \
--enable-pulse \
--disable-asap-codec \
--disable-mysql \
--disable-webserver \
--with-platform=raspberry-pi2 \
--enable-texturepacker \
--disable-upnp \
--disable-mdnsembedded \

Ffmpeg configure statement (actually I've modified the autobuild.sh to add cflags, enable HW Accel and disable a lot of things I'll never ever need):
./configure --prefix=$FFMPEG_PREFIX \
--extra-version="kodi-${VERSION}" \
--extra-cflags='-march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard' \
--enable-version3 \
--disable-w32threads \
--enable-ffplay \
--disable-ffmpeg \
--extra-libs=-ldl \
--enable-shared \
--enable-libass \
--disable-devices \
--disable-sdl \
--disable-ffprobe \
--disable-ffserver \
--disable-doc \
--enable-gpl \
--enable-postproc \
--enable-mmal \
--enable-hwaccel=h264_mmal \
--enable-opengl \
--enable-neon \
--enable-bzlib \
--enable-gnutls \
--enable-muxer=spdif \
--enable-muxer=adts \
--enable-muxer=asf \
--enable-encoder=ac3 \
--enable-encoder=aac \
--enable-encoder=wmav2 \
--enable-libvorbis \
--enable-muxer=ogg \
--enable-encoder=libvorbis \
--enable-nonfree \
--enable-pthreads \
--enable-zlib \
--disable-mips32r2 \
--disable-mipsdspr1 \
--disable-mipsdspr2

Build Error:

make[1]: Leaving directory '/kit/tmp/SBo/xbmc-16.1-Jarvis/xbmc/guilib'
/usr/bin/ccache g++ -O2 -DNDEBUG=1 -O2 -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu++11 -mno-apcs-stack-check -mfpu=neon -mvectorize-with-neon-quad -O2 -DNDEBUG=1 -O2 -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu++11 -mno-apcs-stack-check -mfpu=neon -mvectorize-with-neon-quad -o kodi.bin xbmc/main/main.a -Wl,--start-group xbmc/main/main.a xbmc/linux/linux.a xbmc/network/network.a xbmc/video/windows/videowindows.a xbmc/utils/utils.a xbmc/cores/DllLoader/exports/util/exports_utils.a xbmc/cores/DllLoader/exports/exports.a xbmc/settings/settings.a xbmc/video/video.a xbmc/pvr/addons/pvraddons.a xbmc/pvr/windows/pvrwindows.a xbmc/guilib/guilib.a /kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a /kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavfilter.a /kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libswresample.a /kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavformat.a /kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavutil.a /kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libpostproc.a /kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libswscale.a xbmc/cores/dvdplayer/DVDPlayer.a xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.a xbmc/cores/dvdplayer/DVDCodecs/Audio/Audio.a xbmc/cores/dvdplayer/DVDCodecs/Overlay/Overlay.a xbmc/cores/dvdplayer/DVDCodecs/Video/Video.a xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxers.a xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreams.a xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitles.a xbmc/addons/addons.a xbmc/cdrip/cdrip.a xbmc/contrib/kissfft/kissfft.a xbmc/cores/AudioEngine/audioengine.a xbmc/cores/DllLoader/dllloader.a xbmc/cores/ExternalPlayer/ExternalPlayer.a xbmc/cores/VideoRenderers/VideoRenderer.a xbmc/cores/VideoRenderers/VideoShaders/VideoShaders.a xbmc/cores/cores.a xbmc/cores/paplayer/paplayer.a xbmc/cores/playercorefactory/playercorefactory.a xbmc/dbwrappers/dbwrappers.a xbmc/dialogs/dialogs.a xbmc/epg/epg.a xbmc/events/events.a xbmc/filesystem/MusicDatabaseDirectory/musicdatabasedirectory.a xbmc/filesystem/VideoDatabaseDirectory/videodatabasedirectory.a xbmc/filesystem/filesystem.a xbmc/input/input.a xbmc/interfaces/builtins/builtins.a xbmc/interfaces/generic/interfaces-generic.a xbmc/interfaces/info/info.a xbmc/interfaces/interfaces.a xbmc/interfaces/json-rpc/json-rpc.a xbmc/interfaces/legacy/legacy.a xbmc/interfaces/python/python_binding.a xbmc/listproviders/listproviders.a xbmc/main/posix/MessagePrinter.a xbmc/media/media.a xbmc/messaging/messaging.a xbmc/messaging/helpers/messagingHelpers.a xbmc/music/dialogs/musicdialogs.a xbmc/music/infoscanner/musicscanner.a xbmc/music/music.a xbmc/music/tags/musictags.a xbmc/music/windows/musicwindows.a xbmc/network/dacp/dacp.a xbmc/network/websocket/websocket.a xbmc/peripherals/bus/peripheral-bus.a xbmc/peripherals/devices/peripheral-devices.a xbmc/peripherals/dialogs/peripheral-dialogs.a xbmc/peripherals/peripherals.a xbmc/pictures/pictures.a xbmc/playlists/playlists.a xbmc/powermanagement/powermanagement.a xbmc/profiles/profiles.a xbmc/profiles/dialogs/profiles_dialogs.a xbmc/profiles/windows/profiles_windows.a xbmc/programs/programs.a xbmc/pvr/channels/pvrchannels.a xbmc/pvr/dialogs/pvrdialogs.a xbmc/pvr/pvr.a xbmc/pvr/recordings/pvrrecordings.a xbmc/pvr/timers/pvrtimers.a xbmc/rendering/rendering.a xbmc/settings/dialogs/settings_dialogs.a xbmc/settings/lib/settings_lib.a xbmc/settings/windows/settings_windows.a xbmc/storage/storage.a xbmc/video/dialogs/videodialogs.a xbmc/video/jobs/video-jobs.a xbmc/video/videosync/videosync.a xbmc/view/view.a xbmc/windowing/windowing.a xbmc/windows/windows.a xbmc/xbmc.a xbmc/rendering/gles/rendering_gles.a xbmc/windowing/egl/windowing_egl.a xbmc/input/linux/input_linux.a xbmc/input/touch/input_touch.a xbmc/input/touch/generic/input_touch_generic.a xbmc/network/linux/network_linux.a xbmc/powermanagement/linux/powermanagement_linux.a xbmc/storage/linux/storage_linux.a xbmc/windowing/X11/windowing_X11.a lib/UnrarXLib/UnrarXLib.a -Wl,--end-group xbmc/threads/threads.a xbmc/commons/commons.a -lssh -ljasper -lresolv -lbluetooth -lssl -lcrypto -lz -llzo2 -lpthread -ltiff -ljpeg -lbz2 -lgcrypt -lgpg-error -lGLESv2 -lEGL -L/usr/lib -lpython2.7 -ltinyxml -lcrossguid -luuid -L/usr/local/lib -lyajl -lxml2 -lxslt -lxml2 -lz -llzma -lm -ldl -lm -lxml2 -lfribidi -lglib-2.0 -lsqlite3 -ldl -lpng16 -lpcre -lpcrecpp -lpcre -lfreetype -ltag -lasound -ldbus-1 -lasound -lpulse -Wl,-rpath,/usr/lib -lsmbclient -ludev -lcap -L/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib -L/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/native/libsquish-native/squish-install/lib -lsquish -lgnutls -lp11-kit -lgmp -lhogweed -lgmp -lnettle -lidn -lp11-kit -lz -lvorbisenc -lvorbis -lm -logg -ldcadec -rdynamic
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `output_callback':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:205: undefined reference to `mmal_queue_put'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `input_callback':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:197: undefined reference to `mmal_buffer_header_release'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `control_port_cb':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:222: undefined reference to `mmal_buffer_header_release'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:222: undefined reference to `mmal_buffer_header_release'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_fill_input_port':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:544: undefined reference to `mmal_queue_get'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:550: undefined reference to `mmal_buffer_header_reset'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:560: undefined reference to `mmal_port_send_buffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:561: undefined reference to `mmal_buffer_header_release'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_stop_decoder':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:146: undefined reference to `mmal_port_disable'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:147: undefined reference to `mmal_port_disable'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:148: undefined reference to `mmal_port_disable'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:150: undefined reference to `mmal_port_flush'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:151: undefined reference to `mmal_port_flush'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:152: undefined reference to `mmal_port_flush'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:155: undefined reference to `mmal_buffer_header_release'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:154: undefined reference to `mmal_queue_get'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_flush':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:421: undefined reference to `mmal_port_enable'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:423: undefined reference to `mmal_port_enable'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:425: undefined reference to `mmal_port_enable'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_release_frame':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:106: undefined reference to `mmal_buffer_header_release'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_poolref_unref':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:97: undefined reference to `mmal_pool_destroy'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmal_update_format':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:277: undefined reference to `mmal_port_parameter_set_uint32'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_poolref_unref':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:97: undefined reference to `mmal_pool_destroy'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmal_update_format':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:286: undefined reference to `mmal_port_format_commit'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:304: undefined reference to `mmal_pool_create'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_fill_output_port':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:236: undefined reference to `mmal_port_send_buffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:235: undefined reference to `mmal_queue_get'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_read_frame':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:656: undefined reference to `mmal_queue_timedwait'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:723: undefined reference to `mmal_buffer_header_release'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_fill_output_port':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:236: undefined reference to `mmal_port_send_buffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:235: undefined reference to `mmal_queue_get'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:237: undefined reference to `mmal_buffer_header_release'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_read_frame':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:663: undefined reference to `mmal_queue_get'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:674: undefined reference to `mmal_event_format_changed_get'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:679: undefined reference to `mmal_port_disable'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:683: undefined reference to `mmal_buffer_header_release'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:682: undefined reference to `mmal_queue_get'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:685: undefined reference to `mmal_format_copy'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:690: undefined reference to `mmal_port_enable'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_fill_output_port':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:236: undefined reference to `mmal_port_send_buffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:235: undefined reference to `mmal_queue_get'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_read_frame':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:708: undefined reference to `mmal_buffer_header_release'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_fill_output_port':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:237: undefined reference to `mmal_buffer_header_release'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_set_ref':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:133: undefined reference to `mmal_buffer_header_acquire'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_read_frame':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:723: undefined reference to `mmal_buffer_header_release'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_fill_output_port':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:237: undefined reference to `mmal_buffer_header_release'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_close_decoder':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:177: undefined reference to `mmal_component_destroy'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:179: undefined reference to `mmal_queue_destroy'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:180: undefined reference to `mmal_pool_destroy'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_poolref_unref':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:97: undefined reference to `mmal_pool_destroy'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_close_decoder':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:186: undefined reference to `mmal_vc_deinit'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(mmaldec.o): In function `ffmmal_init_decoder':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:325: undefined reference to `bcm_host_init'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:327: undefined reference to `mmal_vc_init'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:337: undefined reference to `mmal_component_create'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:366: undefined reference to `mmal_format_extradata_alloc'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:372: undefined reference to `mmal_port_format_commit'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:379: undefined reference to `mmal_pool_create'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:388: undefined reference to `mmal_queue_create'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:396: undefined reference to `mmal_port_enable'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:398: undefined reference to `mmal_port_enable'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:400: undefined reference to `mmal_port_enable'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/mmaldec.c:403: undefined reference to `mmal_component_enable'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavfilter.a(vf_subtitles.o): In function `config_input':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:145: undefined reference to `ass_set_frame_size'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:150: undefined reference to `ass_set_shaper'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:147: undefined reference to `ass_set_aspect_ratio'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavfilter.a(vf_subtitles.o): In function `filter_frame':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:183: undefined reference to `ass_render_frame'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavfilter.a(vf_subtitles.o): In function `uninit':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:127: undefined reference to `ass_free_track'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:129: undefined reference to `ass_renderer_done'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:131: undefined reference to `ass_library_done'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavfilter.a(vf_subtitles.o): In function `init':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:104: undefined reference to `ass_library_init'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:109: undefined reference to `ass_set_message_cb'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:111: undefined reference to `ass_set_fonts_dir'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:113: undefined reference to `ass_renderer_init'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavfilter.a(vf_subtitles.o): In function `init_ass':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:235: undefined reference to `ass_set_fonts'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:237: undefined reference to `ass_read_file'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavfilter.a(vf_subtitles.o): In function `init_subtitles':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:313: undefined reference to `ass_new_track'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:367: undefined reference to `ass_add_font'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:378: undefined reference to `ass_set_fonts'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:418: undefined reference to `ass_set_style_overrides'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:423: undefined reference to `ass_process_codec_private'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavfilter/vf_subtitles.c:443: undefined reference to `ass_process_data'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(vaapi.o): In function `ff_vaapi_render_picture':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:78: undefined reference to `vaUnmapBuffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:82: undefined reference to `vaUnmapBuffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:87: undefined reference to `vaUnmapBuffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:91: undefined reference to `vaBeginPicture'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:95: undefined reference to `vaRenderPicture'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:99: undefined reference to `vaRenderPicture'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:104: undefined reference to `vaEndPicture'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(vaapi.o): In function `ff_vaapi_commit_slices':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:127: undefined reference to `vaCreateBuffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:136: undefined reference to `vaCreateBuffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(vaapi.o): In function `alloc_buffer':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:155: undefined reference to `vaCreateBuffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:157: undefined reference to `vaMapBuffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:155: undefined reference to `vaCreateBuffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:157: undefined reference to `vaMapBuffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:155: undefined reference to `vaCreateBuffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:157: undefined reference to `vaMapBuffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(vaapi.o): In function `destroy_buffers':
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:38: undefined reference to `vaDestroyBuffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:38: undefined reference to `vaDestroyBuffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:38: undefined reference to `vaDestroyBuffer'
/kit/tmp/SBo/xbmc-16.1-Jarvis/tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vaapi.c:38: undefined reference to `vaDestroyBuffer'
collect2: error: ld returned 1 exit status
Makefile:437: recipe for target 'kodi.bin' failed
make: *** [kodi.bin] Error 1
Reply
#2
You miss the relevant mmal libs to build ffmpeg as you specified it. Also vaapi is useless on your system.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
Danke!

The libs are there in /opt/vc/lib and I manually copied the mmal specific ones in the /usr/lib too (both folders being contained anyway in the ld.so.conf file). I even went so far and backed up all the GLES related libs that came with Slackware and copied the ones from /opt/vc in their place, rebuilt ffmpeg and ended up with the same Kodi build error. It just seems to me that Kodi is not looking after them and I'd like to fix that, if you are so kind and actually able to guide me. Furthermore, there are also other objects affected, additionally to mmal:
vf_subtitles.o and vaapi.o

You're right, I don't need vaapi (together with a lot of other things I was unable to disable) and I tried to get it disabled in the kodi config with --disable-vaapi \

I said that FFmpeg builds and installs clean on its own, no errors or missing libs.

Where should I put/copy the missing libs so that Kodi will find them ?

Here is my actual environment:
cat /etc/ld.so.conf
/lib
/usr/lib
/usr/local/lib
/usr/arm-slackware-linux-gnueabi/lib
/opt/vc/lib

ls -al /opt/vc/lib/
total 2592
drwxr-xr-x 4 root root 4096 Sep 27 17:56 .
drwxr-xr-x 7 root root 4096 May 27 14:11 ..
-rw-r--r-- 1 root root 201752 May 4 17:09 libEGL.so
-rw-r--r-- 1 root root 243058 May 27 12:20 libEGL_static.a
lrwxrwxrwx 1 root root 12 Sep 13 10:30 libGLESv1_CM.so -> libGLESv2.so
-rw-r--r-- 1 root root 105768 Apr 1 19:41 libGLESv2.so
-rw-r--r-- 1 root root 100008 May 27 12:20 libGLESv2_static.a
-rw-r--r-- 1 root root 99200 Apr 1 19:41 libOpenVG.so
-rw-r--r-- 1 root root 78532 Apr 1 19:41 libWFC.so
-rw-r--r-- 1 root root 96040 Apr 1 19:41 libbcm_host.so
-rw-r--r-- 1 root root 360988 Apr 1 19:41 libcontainers.so
-rw-r--r-- 1 root root 15348 Apr 1 19:41 libdebug_sym.so
-rw-r--r-- 1 root root 12426 May 27 12:20 libdebug_sym_static.a
-rw-r--r-- 1 root root 48504 May 27 12:20 libdtovl.so
-rw-r--r-- 1 root root 13548 May 27 12:20 libkhrn_client.a
-rw-r--r-- 1 root root 448178 May 27 12:20 libkhrn_static.a
-rw-r--r-- 1 root root 13736 May 4 17:10 libmmal.so
-rw-r--r-- 1 root root 68856 May 4 17:10 libmmal_components.so
-rw-r--r-- 1 root root 81928 May 4 17:10 libmmal_core.so
-rw-r--r-- 1 root root 88336 May 4 17:10 libmmal_util.so
-rw-r--r-- 1 root root 44428 May 4 17:10 libmmal_vc_client.so
-rw-r--r-- 1 root root 33200 May 4 17:10 libopenmaxil.so
-rw-r--r-- 1 root root 3264 May 27 12:20 libvcfiled_check.a
-rw-r--r-- 1 root root 30032 May 4 17:08 libvchiq_arm.so
-rw-r--r-- 1 root root 136502 May 27 12:20 libvchostif.a
-rw-r--r-- 1 root root 28462 May 27 12:20 libvcilcs.a
-rw-r--r-- 1 root root 172520 May 4 17:10 libvcos.so
-rw-r--r-- 1 root root 21164 Apr 1 19:41 libvcsm.so
-rw-r--r-- 1 root root 31078 May 27 12:20 libvmcs_rpc_client.a
drwxr-xr-x 3 root root 4096 May 27 14:09 plugins

ls -al /opt/vc/include/
total 48
drwxr-xr-x 11 root root 4096 May 27 14:11 .
drwxr-xr-x 7 root root 4096 May 27 14:11 ..
drwxr-xr-x 2 root root 4096 May 27 14:11 EGL
drwxr-xr-x 2 root root 4096 May 27 14:11 GLES
drwxr-xr-x 2 root root 4096 May 27 14:11 GLES2
drwxr-xr-x 2 root root 4096 May 27 14:11 IL
drwxr-xr-x 2 root root 4096 May 27 14:11 KHR
drwxr-xr-x 2 root root 4096 May 27 14:11 VG
drwxr-xr-x 2 root root 4096 May 27 14:11 WF
-rw-r--r-- 1 root root 2342 Aug 21 2015 bcm_host.h
drwxr-xr-x 8 root root 4096 May 27 14:11 interface
drwxr-xr-x 2 root root 4096 May 27 14:11 vcinclude
Reply
#4
since your ffmpeg is statically linked, you also need to link kodi against the needed MMAL libs.
to check which you need run pkg-config --static --libs libavcodec
Reply
#5
Thank you for your hint! It applies if I build and install ffmpeg on my own, but not if Kodi does it and puts all the compiled libs in /xbmc/tools/depends/target/ffmpeg/lib and uses them from there without actually installing ffmpeg.

I was under the impression that the build script from within Kodi will handle all the linking processes, since I let it do the ffmpeg compilation. I just added some specific configure parameters in the ffmpeg autobuild.sh script before running the Kodi ./configure & make.

I ended up manually building and installing ffmpeg and found out that by using both (or either) LDFLAGS="" and LIBS="" to define the dependencies, the Kodi ./configure script breaks with either compiler error or not able to find some libs.

These were the ffmpeg libavcodec and libavfilter (which was also affected in the make (ld) error log above) dependencies:
pkg-config --static --libs libavcodec
-L/usr/local/lib -L/opt/vc/lib/ -L/usr/local/lib -lavcodec -lva -lva-x11 -lva -lxcb -lxcb-shm -lxcb -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lxcb-shape -lxcb -lX11 -lgmp -lGL -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host -lvorbisenc -lvorbis -logg -lass -lgnutls -lm -llzma -lbz2 -lz -pthread -ldl -lswresample -lm -lavutil -lm

pkg-config --static --libs libavfilter
-L/usr/local/lib -L/opt/vc/lib/ -L/usr/local/lib -L/opt/vc/lib/ -L/usr/local/lib -L/opt/vc/lib/ -L/usr/local/lib -lavfilter -lva -lva-x11 -lva -lxcb -lxcb-shm -lxcb -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lxcb-shape -lxcb -lX11 -lgmp -lGL -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host -lvorbisenc -lvorbis -logg -lass -lgnutls -lm -llzma -lbz2 -lz -pthread -ldl -lswscale -lm -lpostproc -lavformat -lva -lva-x11 -lva -lxcb -lxcb-shm -lxcb -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lxcb-shape -lxcb -lX11 -lgmp -lGL -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host -lvorbisenc -lvorbis -logg -lass -lgnutls -lm -llzma -lbz2 -lz -pthread -ldl -lavcodec -lva -lva-x11 -lva -lxcb -lxcb-shm -lxcb -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lxcb-shape -lxcb -lX11 -lgmp -lGL -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host -lvorbisenc -lvorbis -logg -lass -lgnutls -lm -llzma -lbz2 -lz -pthread -ldl -lswresample -lm -lavutil -lm


Resolution:
- I've compiled and installed ffmpeg manually
- added to the Kodi ./configure --with-ffmpeg=shared and removed the one that was causing all the problems from the very beginning --enable-static=no
- successfully built Kodi and opened a beer

--enable-static=no was the parameter that was stopping Kodi build scripts to link against the ffmpeg dependencies

I drank the beer, installed Kodi and ended up with a crash:

./startkodi
ERROR: Unable to create GUI. Exiting
*** Error in `/usr/lib/kodi/kodi.bin': free(): invalid pointer: 0x018e21dc ***
/usr/bin/kodi: line 165: 2314 Aborted (core dumped) "$LIBDIR/${bin_name}/${bin_name}.bin" $SAVED_ARGS
Crash report available at /root/kodi_crashlog-20160929_222316.log
^C

tail -20 /root/kodi_crashlog-20160929_222316.log
22:22:59 T:1897900384 NOTICE: No settings file to load (special://masterprofile/advancedsettings.xml)
22:22:59 T:1897900384 NOTICE: Default DVD Player: dvdplayer
22:22:59 T:1897900384 NOTICE: Default Video Player: dvdplayer
22:22:59 T:1897900384 NOTICE: Default Audio Player: paplayer
22:22:59 T:1897900384 NOTICE: Disabled debug logging due to GUI setting. Level 0.
22:22:59 T:1897900384 NOTICE: Log level changed to "LOG_LEVEL_NORMAL"
22:22:59 T:1897900384 NOTICE: Loading player core factory settings from special://xbmc/system/playercorefactory.xml.
22:22:59 T:1897900384 NOTICE: Loaded playercorefactory configuration
22:22:59 T:1897900384 NOTICE: Loading player core factory settings from special://masterprofile/playercorefactory.xml.
22:22:59 T:1897900384 NOTICE: special://masterprofile/playercorefactory.xml does not exist. Skipping.
22:22:59 T:1897886688 NOTICE: PulseAudio: Opened device Default in pcm mode with Buffersize 150 ms
22:22:59 T:1897900384 NOTICE: Running database version Addons20
22:23:00 T:1897900384 NOTICE: ADDONS: Using repository repository.xbmc.org
22:23:00 T:1897900384 ERROR: InitWindowSystem: Could not initialize
22:23:00 T:1897900384 FATAL: CApplication::Create: Unable to init windowing system

############### END LOG FILE ################
############ END Kodi CRASH LOG #############

- strace output:

recvmsg(10, 0x7e92ac34, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC_RAW, {185760, 738344445}) = 0
open("/sys/class/graphics/fb0/device/modalias", O_RDONLY|O_LARGEFILE) = 21
read(21, "of:NfbT<NULL>Cbrcm,bcm2708-fb", 256) = 29
read(21, "", 256) = 0
close(21) = 0
write(9, "09:54:31 T:1898264928 ERROR: I"..., 70) = 70
write(9, "09:54:31 T:1898264928 FATAL: C"..., 85) = 85
write(2, "ERROR: Unable to create GUI. Exi"..., 37ERROR: Unable to create GUI. Exiting
) = 37
futex(0x6fefecb4, FUTEX_CMP_REQUEUE_PRIVATE, 1, 2147483647, 0x6fefece8, 2) = 1
futex(0x6fefece8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xe93c80, FUTEX_WAKE_PRIVATE, 1) = 1
open("/dev/tty", O_RDWR|O_NOCTTY|O_NONBLOCK) = 21
writev(21, [{"*** Error in `", 14}, {"./kodi.bin", 10}, {"': ", 3}, {"free(): invalid pointer", 23}, {": 0x", 4}, {"013ff6ac", 8}, {" ***\n", 5}], 7*** Error in `./kodi.bin': free(): invalid pointer: 0x013ff6ac ***
) = 67
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76fda000
futex(0x74a8758c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
getpid() = 10716
gettid() = 10716
tgkill(10716, 10716, SIGABRT) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=10716, si_uid=0} ---
+++ killed by SIGABRT +++
Aborted

Which is the same crash as I had by stealing and manually installing (including some missing deps) Kodi 15.2 from a Raspbian (Debian Jessie) precompiled package, before starting my own compilation.
Worth to mention that I'm using Raspberry Pi's original and always actual kernel / modules / firmware and /opt/vc, as I'm really not interested in compiling a clean kernel under Slackware (not yet, maybe when I grow older).

Should someone else attempt a native compilation, I can state that building ffmpeg took me around 30 minutes and Kodi (as simplistic as I needed it) took me another 40 minutes (including ./bootstrap). That's on a not-overclocked Raspberry Pi 2B (quad core / 1 GB RAM - actually 756MB - 256MB reserved for the GPU), with a Samsung EVO SdCard, running Slackware -current - HardFloat. I guess, wasting time with a cross-compilation environment - toolchain installations - doesn't really make any sense.

Cheers!

P.S. Wish you all the best with your interesting project an I'm sorry for not being able to contribute to it, as I'm really busy with other activities and IT became just a hobby (1-2 hours a day) for me. I'll unsubscribe.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi 16.1 Build Error LD on Raspberry Pi - Slackware ARM0