v17 Adding Rpi2 support to CMAKE build system
#16
> https://github.com/xbmc/xbmc/pull/10372 should hopefully fix the sse issue.

thanks, I'll give that a try

my attempt, above, almost finiished
Code:
...
[100%] Linking CXX executable kodi.bin
/usr/bin/cmake -E cmake_link_script CMakeFiles/kodi.dir/link.txt --verbose=1
/usr/local/src/kodi/build/build/ffmpeg-link-wrapper /usr/bin/g++  -O3 -pipe -fmessage-length=0 -fstack-protector -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -mtune=cortex-a7 -mcpu=cortex-a7 -ftree-vectorize -Wno-psabi -Wa,-mno-warn-deprecated -Wno-deprecated-declarations -Wl,--dynamic-linker=/lib/ld-linux-armhf.so.3 -std=c++11 -O3 -DNDEBUG   -fuse-ld=gold CMakeFiles/kodi.dir/usr/local/src/kodi/xbmc/platform/posix/main.cpp.o -o kodi.bin -rdynamic -Wl,--whole-archive build/unrarxlib/libunrarxlib.a build/upnp/libupnp.a build/swig/libpython_binding.a -Wl,--no-whole-archive libkodi.a -lpthread -lsqlite3 -lfreetype -lpcrecpp -lpcre build/libdvd/lib/libdvdnav.a build/libdvd/lib/libdvdread.a build/libdvd/lib/libdvdcss.a -ltinyxml -lpython2.7 -lyajl -llzo2 -lfribidi -ltag build/lib/libcrossguid.a -luuid -lz -lmicrohttpd -lgcrypt -lgpg-error -lrt -lmysqlclient -lssh -lxslt -lxml2 -lasound -ludev -ldbus-1 -lssl -lcrypto -lGL -lGLU -lX11 -lXext -ldrm -lXrandr -lEGL -ldl build/unrarxlib/libunrarxlib.a build/upnp/libupnp.a build/swig/libpython_binding.a
libkodi.a(Artist.cpp.o):Artist.cpp:function CArtist::Load(TiXmlElement const*, bool, bool): error: undefined reference to 'operator<<(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, TiXmlNode const&)'
libkodi.a(Artist.cpp.o):Artist.cpp:function CArtist::Load(TiXmlElement const*, bool, bool): error: undefined reference to 'operator<<(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, TiXmlNode const&)'
libkodi.a(Artist.cpp.o):Artist.cpp:function CArtist::Load(TiXmlElement const*, bool, bool): error: undefined reference to 'operator<<(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, TiXmlNode const&)'
libkodi.a(Control.cpp.o):Control.cpp:function XBMCAddon::xbmcgui::Control::setAnimations(std::vector<XBMCAddon::Tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, XBMCAddon::tuple_null_type, XBMCAddon::tuple_null_type, XBMCAddon::tuple_null_type>, std::allocator<XBMCAddon::Tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, XBMCAddon::tuple_null_type, XBMCAddon::tuple_null_type, XBMCAddon::tuple_null_type> > > const&): error: undefined reference to 'TiXmlElement::SetAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
libkodi.a(Control.cpp.o):Control.cpp:vtable for CXBMCTinyXML: error: undefined reference to 'TiXmlDocument::StreamIn(std::istream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
libkodi.a(SettingsManager.cpp.o):SettingsManager.cpp:function CSettingsManager::Serialize(TiXmlNode*) const: error: undefined reference to 'TiXmlElement::TiXmlElement(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
libkodi.a(SettingsManager.cpp.o):SettingsManager.cpp:function CSettingsManager::Serialize(TiXmlNode*) const: error: undefined reference to 'TiXmlElement::TiXmlElement(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
libkodi.a(AddonManager.cpp.o):AddonManager.cpp:function ADDON::CAddonMgr::AddonsFromRepoXML(ADDON::CRepository::DirInfo const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::shared_ptr<ADDON::IAddon>, std::allocator<std::shared_ptr<ADDON::IAddon> > >&): error: undefined reference to 'operator<<(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, TiXmlNode const&)'
libkodi.a(Skin.cpp.o):Skin.cpp:function ADDON::CSkinSetting::Serialize(TiXmlElement*) const: error: undefined reference to 'TiXmlElement::SetAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
libkodi.a(Skin.cpp.o):Skin.cpp:function ADDON::CSkinInfo::SettingsToXML(CXBMCTinyXML&) const: error: undefined reference to 'TiXmlElement::SetAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
libkodi.a(Skin.cpp.o):Skin.cpp:function ADDON::CSkinInfo::SettingsToXML(CXBMCTinyXML&) const: error: undefined reference to 'TiXmlElement::SetAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
libkodi.a(ButtonTranslator.cpp.o):ButtonTranslator.cpp:function CButtonTranslator::TranslateKeyboardButton(TiXmlElement*): error: undefined reference to 'TiXmlAttributeSet::Find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
libkodi.a(ButtonTranslator.cpp.o):ButtonTranslator.cpp:function CButtonTranslator::TranslateKeyboardButton(TiXmlElement*): error: undefined reference to 'TiXmlAttributeSet::Find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
libkodi.a(XBMCTinyXML.cpp.o):XBMCTinyXML.cpp:function CXBMCTinyXML::CXBMCTinyXML(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): error: undefined reference to 'TiXmlDocument::TiXmlDocument(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
libkodi.a(XBMCTinyXML.cpp.o):XBMCTinyXML.cpp:function CXBMCTinyXML::CXBMCTinyXML(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): error: undefined reference to 'TiXmlDocument::TiXmlDocument(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
libkodi.a(ViewStateSettings.cpp.o):ViewStateSettings.cpp:function CViewStateSettings::Save(TiXmlNode*) const: error: undefined reference to 'TiXmlElement::TiXmlElement(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
libkodi.a(TagLoaderTagLib.cpp.o):TagLoaderTagLib.cpp:function (anonymous namespace)::StringListToVectorString(TagLib::StringList const&): error: undefined reference to 'TagLib::String::to8Bit[abi:cxx11](bool) const'
libkodi.a(TagLoaderTagLib.cpp.o):TagLoaderTagLib.cpp:function (anonymous namespace)::GetASFStringList(TagLib::List<TagLib::ASF::Attribute> const&): error: undefined reference to 'TagLib::String::to8Bit[abi:cxx11](bool) const'
libkodi.a(TagLoaderTagLib.cpp.o):TagLoaderTagLib.cpp:function bool CTagLoaderTagLib::ParseTag<TagLib::ID3v1::Tag>(TagLib::ID3v1::Tag*, MUSIC_INFO::EmbeddedArt*, MUSIC_INFO::CMusicInfoTag&): error: undefined reference to 'TagLib::String::to8Bit[abi:cxx11](bool) const'
libkodi.a(TagLoaderTagLib.cpp.o):TagLoaderTagLib.cpp:function bool CTagLoaderTagLib::ParseTag<TagLib::ID3v1::Tag>(TagLib::ID3v1::Tag*, MUSIC_INFO::EmbeddedArt*, MUSIC_INFO::CMusicInfoTag&): error: undefined reference to 'TagLib::String::to8Bit[abi:cxx11](bool) const'
collect2: error: ld returned 1 exit status
CMakeFiles/kodi.dir/build.make:138: recipe for target 'kodi.bin' failed
make[2]: *** [kodi.bin] Error 1
make[2]: Leaving directory '/usr/local/src/kodi/build'
CMakeFiles/Makefile2:680: recipe for target 'CMakeFiles/kodi.dir/all' failed
make[1]: *** [CMakeFiles/kodi.dir/all] Error 2
make[1]: Leaving directory '/usr/local/src/kodi/build'
Makefile:141: recipe for target 'all' failed
make: *** [all] Error 2

taglib and tinylib ARE installed; not sure yet what's missing
Reply
#17
which versions of tinyxml and taglib do you have?

output of grep TINYXML CMakeCache.txt
Reply
#18
> which versions of tinyxml and taglib do you have?

What kodi requires
Code:
    egrep -i "PKG_CHECK.*tag|PKG_CHECK.*tiny" configure.ac
        PKG_CHECK_MODULES([TINYXML], [tinyxml >= 2.6.2],
        PKG_CHECK_MODULES([TAGLIB],  [taglib >= 1.9],
What's installed
Code:
    dpkg -l | grep ^ii | egrep "tinyxml|libtag"
        ii  libtag1-dev                        1.9.1-2.1        armhf        audio meta-data library - development files
        ii  libtag1-vanilla:armhf              1.9.1-2.1        armhf        audio meta-data library - vanilla flavour
        ii  libtag1c2a:armhf                   1.9.1-2.1        armhf        audio meta-data library
        ii  libtagc0:armhf                     1.9.1-2.1        armhf        audio meta-data library - C bindings
        ii  libtagc0-dev                       1.9.1-2.1        armhf        audio meta-data library - development files for C bindings
        ii  libtagcoll2-dev                    2.0.14-1         armhf        Functions used to manipulate tagged collections (development version)
        ii  libtinyxml-dev:armhf               2.6.2-2          armhf        TinyXml library - header and static library
        ii  libtinyxml-doc                     2.6.2-2          all          TinyXml library - documentation files
        ii  libtinyxml2.6.2:armhf              2.6.2-2          armhf        C++ XML parsing library

> output of grep TINYXML CMakeCache.txt

Code:
grep TINYXML CMakeCache.txt
    TINYXML_INCLUDE_DIR:PATH=/usr/include
    TINYXML_LIBRARY_DEBUG:FILEPATH=TINYXML_LIBRARY_DEBUG-NOTFOUND
    TINYXML_LIBRARY_RELEASE:FILEPATH=/usr/lib/arm-linux-gnueabihf/libtinyxml.so
    PC_TINYXML_CFLAGS:INTERNAL=
    PC_TINYXML_CFLAGS_I:INTERNAL=
    PC_TINYXML_CFLAGS_OTHER:INTERNAL=
    PC_TINYXML_FOUND:INTERNAL=1
    PC_TINYXML_INCLUDEDIR:INTERNAL=/usr/include
    PC_TINYXML_INCLUDE_DIRS:INTERNAL=
    PC_TINYXML_LDFLAGS:INTERNAL=-ltinyxml
    PC_TINYXML_LDFLAGS_OTHER:INTERNAL=
    PC_TINYXML_LIBDIR:INTERNAL=/usr/lib/arm-linux-gnueabihf
    PC_TINYXML_LIBRARIES:INTERNAL=tinyxml
    PC_TINYXML_LIBRARY_DIRS:INTERNAL=
    PC_TINYXML_LIBS:INTERNAL=
    PC_TINYXML_LIBS_L:INTERNAL=
    PC_TINYXML_LIBS_OTHER:INTERNAL=
    PC_TINYXML_LIBS_PATHS:INTERNAL=
    PC_TINYXML_PREFIX:INTERNAL=/usr
    PC_TINYXML_STATIC_CFLAGS:INTERNAL=
    PC_TINYXML_STATIC_CFLAGS_I:INTERNAL=
    PC_TINYXML_STATIC_CFLAGS_OTHER:INTERNAL=
    PC_TINYXML_STATIC_INCLUDE_DIRS:INTERNAL=
    PC_TINYXML_STATIC_LDFLAGS:INTERNAL=-ltinyxml
    PC_TINYXML_STATIC_LDFLAGS_OTHER:INTERNAL=
    PC_TINYXML_STATIC_LIBDIR:INTERNAL=
    PC_TINYXML_STATIC_LIBRARIES:INTERNAL=tinyxml
    PC_TINYXML_STATIC_LIBRARY_DIRS:INTERNAL=
    PC_TINYXML_STATIC_LIBS:INTERNAL=
    PC_TINYXML_STATIC_LIBS_L:INTERNAL=
    PC_TINYXML_STATIC_LIBS_OTHER:INTERNAL=
    PC_TINYXML_STATIC_LIBS_PATHS:INTERNAL=
    PC_TINYXML_VERSION:INTERNAL=2.6.2
    PC_TINYXML_tinyxml_INCLUDEDIR:INTERNAL=
    PC_TINYXML_tinyxml_LIBDIR:INTERNAL=
    PC_TINYXML_tinyxml_PREFIX:INTERNAL=
    PC_TINYXML_tinyxml_VERSION:INTERNAL=
    //ADVANCED property for variable: TINYXML_INCLUDE_DIR
    TINYXML_INCLUDE_DIR-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: TINYXML_LIBRARY_DEBUG
    TINYXML_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: TINYXML_LIBRARY_RELEASE
    TINYXML_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
    __pkg_config_checked_PC_TINYXML:INTERNAL=1
Reply
#19
testing with

Code:
-DCMAKE_EXE_LINKER_FLAGS="-L/usr/lib/arm-linux-gnueabihf -L/usr/local/lib -L/usr/lib" \
  -DCMAKE_SHARED_LINKER_FLAGS="-L/usr/lib/arm-linux-gnueabihf -L/usr/local/lib -L/usr/lib" \

now
Reply
#20
After installing new (?) dep
Code:
apt-get install libavfilter-dev
STILL fails
Code:
...
[100%] Linking CXX executable kodi.bin
/usr/bin/cmake -E cmake_link_script CMakeFiles/kodi.dir/link.txt --verbose=1
/usr/local/src/kodi/build/build/ffmpeg-link-wrapper /usr/bin/g++  -O3 -pipe -fmessage-length=0 -fstack-protector -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -mtune=cortex-a7 -mcpu=cortex-a7 -ftree-vectorize -Wno-psabi -Wa,-mno-warn-deprecated -Wno-deprecated-declarations -Wl,--dynamic-linker=/lib/ld-linux-armhf.so.3 -std=c++11 -O3 -DNDEBUG  -L/usr/lib/arm-linux-gnueabihf -L/usr/local/lib -L/usr/lib -fuse-ld=gold CMakeFiles/kodi.dir/usr/local/src/kodi/xbmc/platform/posix/main.cpp.o -o kodi.bin -rdynamic -Wl,--whole-archive build/unrarxlib/libunrarxlib.a build/upnp/libupnp.a build/swig/libpython_binding.a -Wl,--no-whole-archive libkodi.a -lpthread -lsqlite3 -lfreetype -lpcrecpp -lpcre build/libdvd/lib/libdvdnav.a build/libdvd/lib/libdvdread.a build/libdvd/lib/libdvdcss.a -ltinyxml -lpython2.7 -lyajl -llzo2 -lfribidi -ltag build/lib/libcrossguid.a -luuid -lz -lmicrohttpd -lgcrypt -lgpg-error -lrt -lmysqlclient -lssh -lxslt -lxml2 -lasound -ludev -ldbus-1 -lssl -lcrypto -lGL -lGLU -lX11 -lXext -ldrm -lXrandr -lEGL -ldl build/unrarxlib/libunrarxlib.a build/upnp/libupnp.a build/swig/libpython_binding.a
libkodi.a(Artist.cpp.o):Artist.cpp:function CArtist::Load(TiXmlElement const*, bool, bool): error: undefined reference to 'operator<<(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, TiXmlNode const&)'
libkodi.a(Artist.cpp.o):Artist.cpp:function CArtist::Load(TiXmlElement const*, bool, bool): error: undefined reference to 'operator<<(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, TiXmlNode const&)'
libkodi.a(Artist.cpp.o):Artist.cpp:function CArtist::Load(TiXmlElement const*, bool, bool): error: undefined reference to 'operator<<(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, TiXmlNode const&)'
...
Reply
#21
Noting the error
Code:
libkodi.a(Artist.cpp.o):Artist.cpp:function CArtist::Load(TiXmlElement const*, bool, bool): error: undefined reference to 'operator<<(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, TiXmlNode const&)'
appears c++11-standard related

reading

tinyxml: library transition may be needed when GCC 5 is the default
https://bugs.debian.org/cgi-bin/bugrepor...bug=791302

upgrading tinyxml to raspbian/stretch fixes those
Code:
dpkg -l | grep ^ii | grep tinyxml
    ii  libtinyxml-dev:armhf               2.6.2-2                         armhf        TinyXml library - header and static library
    ii  libtinyxml-doc                     2.6.2-2                         all          TinyXml library - documentation files
    ii  libtinyxml2.6.2:armhf              2.6.2-2                         armhf        C++ XML parsing library

apt-get install -t stretch libtinyxml-dev libtinyxml-doc

dpkg -l | grep ^ii | grep tinyxml
    ii  libtinyxml-dev:armhf               2.6.2-3                         armhf        TinyXml library - header and static library
    ii  libtinyxml-doc                     2.6.2-3                         all          TinyXml library - documentation files
    ii  libtinyxml2.6.2v5:armhf            2.6.2-3                         armhf        C++ XML parsing library

now, down to
Code:
[100%] Linking CXX executable kodi.bin
/usr/bin/cmake -E cmake_link_script CMakeFiles/kodi.dir/link.txt --verbose=1
/usr/local/src/kodi/build/build/ffmpeg-link-wrapper /usr/bin/g++  -O3 -pipe -fmessage-length=0 -fstack-protector -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -mtune=cortex-a7 -mcpu=cortex-a7 -ftree-vectorize -Wno-psabi -Wa,-mno-warn-deprecated -Wno-deprecated-declarations -Wl,--dynamic-linker=/lib/ld-linux-armhf.so.3 -std=c++11 -O3 -DNDEBUG  -L/usr/lib/arm-linux-gnueabihf -L/usr/local/lib -L/usr/lib -fuse-ld=gold CMakeFiles/kodi.dir/usr/local/src/kodi/xbmc/platform/posix/main.cpp.o -o kodi.bin -rdynamic -Wl,--whole-archive build/unrarxlib/libunrarxlib.a build/upnp/libupnp.a build/swig/libpython_binding.a -Wl,--no-whole-archive libkodi.a -lpthread -lsqlite3 -lfreetype -lpcrecpp -lpcre build/libdvd/lib/libdvdnav.a build/libdvd/lib/libdvdread.a build/libdvd/lib/libdvdcss.a -ltinyxml -lpython2.7 -lyajl -llzo2 -lfribidi -ltag build/lib/libcrossguid.a -luuid -lz -lmicrohttpd -lgcrypt -lgpg-error -lrt -lmysqlclient -lssh -lxslt -lxml2 -lasound -ludev -ldbus-1 -lssl -lcrypto -lGL -lGLU -lX11 -lXext -ldrm -lXrandr -lEGL -ldl build/unrarxlib/libunrarxlib.a build/upnp/libupnp.a build/swig/libpython_binding.a
src/libswresample/rematrix.c:374: error: undefined reference to 'av_calloc'
src/libswresample/rematrix.c:401: error: undefined reference to 'av_calloc'
src/libswresample/rematrix.c:413: error: undefined reference to 'av_calloc'
src/libswresample/resample.c:411: error: undefined reference to 'av_calloc'
libkodi.a(DVDAudioCodecFFmpeg.cpp.o):DVDAudioCodecFFmpeg.cpp:function CDVDAudioCodecFFmpeg::GetData(stDVDAudioFrame&): error: undefined reference to 'av_frame_get_best_effort_timestamp'
libkodi.a(DVDAudioCodecPassthrough.cpp.o):DVDAudioCodecPassthrough.cpp:function CDVDAudioCodecPassthrough::Decode(unsigned char*, int, double, double): error: undefined reference to 'av_packet_split_side_data'
libkodi.a(DVDVideoCodecFFmpeg.cpp.o):DVDVideoCodecFFmpeg.cpp:function CDVDVideoCodecFFmpeg::GetPicture(DVDVideoPicture*): error: undefined reference to 'av_frame_get_metadata'
libkodi.a(DVDVideoCodecFFmpeg.cpp.o):DVDVideoCodecFFmpeg.cpp:function CDVDVideoCodecFFmpeg::GetPicture(DVDVideoPicture*): error: undefined reference to 'av_frame_get_qp_table'
libkodi.a(DVDVideoCodecFFmpeg.cpp.o):DVDVideoCodecFFmpeg.cpp:function CDVDVideoCodecFFmpeg::GetPicture(DVDVideoPicture*): error: undefined reference to 'av_frame_get_best_effort_timestamp'
libkodi.a(DVDVideoCodecFFmpeg.cpp.o):DVDVideoCodecFFmpeg.cpp:function CDVDVideoCodecFFmpeg::GetPictureCommon(DVDVideoPicture*): error: undefined reference to 'av_frame_get_metadata'
libkodi.a(DVDVideoCodecFFmpeg.cpp.o):DVDVideoCodecFFmpeg.cpp:function CDVDVideoCodecFFmpeg::GetPictureCommon(DVDVideoPicture*): error: undefined reference to 'av_frame_get_qp_table'
libkodi.a(DVDVideoCodecFFmpeg.cpp.o):DVDVideoCodecFFmpeg.cpp:function CDVDVideoCodecFFmpeg::GetPictureCommon(DVDVideoPicture*): error: undefined reference to 'av_frame_get_best_effort_timestamp'
libkodi.a(DVDVideoCodecFFmpeg.cpp.o):DVDVideoCodecFFmpeg.cpp:function CDVDVideoCodecFFmpeg::FilterOpen(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool): error: undefined reference to 'av_int_list_length_for_size'
libkodi.a(DVDVideoCodecFFmpeg.cpp.o):DVDVideoCodecFFmpeg.cpp:function CDVDVideoCodecFFmpeg::FilterOpen(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool): error: undefined reference to 'avfilter_graph_parse_ptr'
libkodi.a(DVDVideoCodecFFmpeg.cpp.o):DVDVideoCodecFFmpeg.cpp:function CDVDVideoCodecFFmpeg::Decode(unsigned char*, int, double, double): error: undefined reference to 'av_frame_get_best_effort_timestamp'
libkodi.a(ActiveAEFilter.cpp.o):ActiveAEFilter.cpp:function ActiveAE::CActiveAEFilter::ProcessFilter(unsigned char**, int, unsigned char**, int, int): error: undefined reference to 'av_frame_set_channel_layout'
libkodi.a(ActiveAEFilter.cpp.o):ActiveAEFilter.cpp:function ActiveAE::CActiveAEFilter::ProcessFilter(unsigned char**, int, unsigned char**, int, int): error: undefined reference to 'av_frame_set_channels'
libkodi.a(ActiveAEFilter.cpp.o):ActiveAEFilter.cpp:function ActiveAE::CActiveAEFilter::ProcessFilter(unsigned char**, int, unsigned char**, int, int): error: undefined reference to 'av_frame_set_sample_rate'
libkodi.a(ActiveAEFilter.cpp.o):ActiveAEFilter.cpp:function ActiveAE::CActiveAEFilter::ProcessFilter(unsigned char**, int, unsigned char**, int, int): error: undefined reference to 'av_frame_set_channel_layout'
libkodi.a(ActiveAEFilter.cpp.o):ActiveAEFilter.cpp:function ActiveAE::CActiveAEFilter::ProcessFilter(unsigned char**, int, unsigned char**, int, int): error: undefined reference to 'av_frame_set_sample_rate'
libkodi.a(TagLoaderTagLib.cpp.o):TagLoaderTagLib.cpp:function (anonymous namespace)::StringListToVectorString(TagLib::StringList const&): error: undefined reference to 'TagLib::String::to8Bit[abi:cxx11](bool) const'
libkodi.a(TagLoaderTagLib.cpp.o):TagLoaderTagLib.cpp:function (anonymous namespace)::GetASFStringList(TagLib::List<TagLib::ASF::Attribute> const&): error: undefined reference to 'TagLib::String::to8Bit[abi:cxx11](bool) const'
libkodi.a(TagLoaderTagLib.cpp.o):TagLoaderTagLib.cpp:function bool CTagLoaderTagLib::ParseTag<TagLib::ID3v1::Tag>(TagLib::ID3v1::Tag*, MUSIC_INFO::EmbeddedArt*, MUSIC_INFO::CMusicInfoTag&): error: undefined reference to 'TagLib::String::to8Bit[abi:cxx11](bool) const'
libkodi.a(TagLoaderTagLib.cpp.o):TagLoaderTagLib.cpp:function bool CTagLoaderTagLib::ParseTag<TagLib::ID3v1::Tag>(TagLib::ID3v1::Tag*, MUSIC_INFO::EmbeddedArt*, MUSIC_INFO::CMusicInfoTag&): error: undefined reference to 'TagLib::String::to8Bit[abi:cxx11](bool) const'
libkodi.a(FFmpegImage.cpp.o):FFmpegImage.cpp:function CFFmpegImage::CreateThumbnailFromSurface(unsigned char*, unsigned int, unsigned int, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*&, unsigned int&): error: undefined reference to 'av_image_get_buffer_size'
libkodi.a(FFmpegImage.cpp.o):FFmpegImage.cpp:function CFFmpegImage::CreateThumbnailFromSurface(unsigned char*, unsigned int, unsigned int, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*&, unsigned int&): error: undefined reference to 'av_image_fill_arrays'
libkodi.a(FFmpegImage.cpp.o):FFmpegImage.cpp:function CFFmpegImage::ExtractFrame(): error: undefined reference to 'av_frame_set_pkt_duration'
libkodi.a(FFmpegImage.cpp.o):FFmpegImage.cpp:function CFFmpegImage::ExtractFrame(): error: undefined reference to 'av_frame_get_metadata'
libkodi.a(FFmpegImage.cpp.o):FFmpegImage.cpp:function CFFmpegImage::DecodeFrame(AVFrame*, unsigned int, unsigned int, unsigned int, unsigned char*): error: undefined reference to 'av_image_fill_arrays'
libkodi.a(FFmpegImage.cpp.o):FFmpegImage.cpp:function CFFmpegImage::DecodeFrame(AVFrame*, unsigned int, unsigned int, unsigned int, unsigned char*): error: undefined reference to 'av_frame_get_color_range'
libkodi.a(FFmpegImage.cpp.o):FFmpegImage.cpp:function CFFmpegImage::ReadFrame(): error: undefined reference to 'av_frame_get_pkt_duration'
libkodi.a(DVDDemuxFFmpeg.cpp.o):DVDDemuxFFmpeg.cpp:function CDVDDemuxFFmpeg::Flush(): error: undefined reference to 'avformat_flush'
libkodi.a(DVDDemuxFFmpeg.cpp.o):DVDDemuxFFmpeg.cpp:function CDVDDemuxFFmpeg::SeekChapter(int, double*): error: undefined reference to 'avformat_flush'
libkodi.a(DVDDemuxFFmpeg.cpp.o):DVDDemuxFFmpeg.cpp:function CDVDDemuxFFmpeg::SeekTime(int, bool, double*): error: undefined reference to 'avformat_flush'
libkodi.a(DVDDemuxFFmpeg.cpp.o):DVDDemuxFFmpeg.cpp:function CDVDDemuxFFmpeg::Read(): error: undefined reference to 'avformat_flush'
libkodi.a(DVDDemuxFFmpeg.cpp.o):DVDDemuxFFmpeg.cpp:function CDVDDemuxFFmpeg::Open(CDVDInputStream*, bool, bool): error: undefined reference to 'av_dict_set_int'
libkodi.a(DVDDemuxFFmpeg.cpp.o):DVDDemuxFFmpeg.cpp:function CDVDDemuxFFmpeg::Open(CDVDInputStream*, bool, bool): error: undefined reference to 'av_dict_set_int'
collect2: error: ld returned 1 exit status
CMakeFiles/kodi.dir/build.make:138: recipe for target 'kodi.bin' failed
make[2]: *** [kodi.bin] Error 1
make[2]: Leaving directory '/usr/local/src/kodi/build'
CMakeFiles/Makefile2:690: recipe for target 'CMakeFiles/kodi.dir/all' failed
make[1]: *** [CMakeFiles/kodi.dir/all] Error 2
make[1]: Leaving directory '/usr/local/src/kodi/build'
Makefile:130: recipe for target 'all' failed
make: *** [all] Error 2
Reply
#22
Code:
src/libswresample/rematrix.c:374: error: undefined reference to 'av_calloc'

checking
Code:
apt-get install libswresample-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
     libswresample-dev : Depends: libavutil-dev (= 7:3.1.2-1) but 6:11.7-1~deb8u1+rpi1 is to be installed
                         Depends: libswresample2 (= 7:3.1.2-1) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
not good.

I'm beginning to suspect that dev is being done against lib version requirements > versions in raspbian/jessie release.

update more to 'stretch' (after a bunch of iterations)
Code:
apt-get update
apt-get upgrade --fix-missing
apt-get install -t stretch \
libswresample-dev \ ( <--- THIS causes of LOT of lib updates)
libtinyxml-dev \
libtinyxml-doc\
zlib1g-dev \
libpng-dev \
--fix-missing
apt-get autoremove

apt-get remove \
libtag1-vanilla \
libtag1c2a

apt-get install -t stretch \
libtag1-dev \
libtagc0 \
libtagc0-dev \
libtagcoll2-dev \
libtag1v5 \
libtag1v5-vanilla \
--fix-missing

now, re-config & re-build
Code:
    ...
    make[2]: Leaving directory '/usr/local/src/kodi/build'
    [100%] Built target kodi
    make[1]: Leaving directory '/usr/local/src/kodi/build'
    /usr/bin/cmake -E cmake_progress_start /usr/local/src/kodi/build/CMakeFiles 0
make install
and, still in the chroot
Code:
/usr/local/kodi/lib/kodi/kodi.bin -v
qemu: Unsupported syscall: 384
17.0-BETA2 Git:20160831-67781da-dirty Media Center Kodi
Copyright (C) 2005-2013 Team Kodi - http://kodi.tv
Now to bundle it up and get it onto the RPI2 HW
Reply
#23
we are using our own internal version of ffmpeg. So you can stop installing random ffmpeg/libav packages.
The problem is somewhere in CFLAGS/LDFLAGS, but it's hard to track down without trying myself. I don't have an rpi2/3 though...

One thing that comes to mind: Make sure RPI firmware and VC/MMAL stuff is found. Check Cmake output for the MMAL test.
Reply
#24
> we are using our own internal version of ffmpeg. So you can stop installing random ffmpeg/libav packages.

Right. That's what I understood.

The current build links to, and is definitely unhappy if I've not installed , the libs

Code:
ldd kodi.bin | egrep "libavcodec|libavfilter|libavresample|libpostproc|libswresample|libavdevice|libavformat|libavutil|libswscale"
        libavformat.so.57 => /usr/lib/arm-linux-gnueabihf/libavformat.so.57 (0xf5342000)
        libavcodec.so.57 => /usr/lib/arm-linux-gnueabihf/libavcodec.so.57 (0xf3f1e000)
        libswresample.so.2 => /usr/lib/arm-linux-gnueabihf/libswresample.so.2 (0xf3e7a000)
        libavutil.so.55 => /usr/lib/arm-linux-gnueabihf/libavutil.so.55 (0xf3de1000)
        libpostproc.so.54 => /usr/lib/arm-linux-gnueabihf/libpostproc.so.54 (0xf3dc5000)

> The problem is somewhere in CFLAGS/LDFLAGS, but it's hard to track down without trying myself. I don't have an rpi2/3 though...

Sure. That's why I'm working on this :-)

Reading

https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
Code:
    -static
        On systems that support dynamic linking, this prevents linking with the shared libraries. On other systems, this option has no effect.
    -shared
        Produce a shared object which can then be linked with other objects to form an executable. Not all systems support this option. For predictable results, you must also specify the same set of options used for compilation (-fpic, -fPIC, or model suboptions) when you specify this linker option.1
I have NOT added "-static" to CMAKE linker flags, since SOME libs need to be dynamically linked

Where would I instruct kodi's FFMPEG build to not use the static libs? Using the "-static" flag?

> One thing that comes to mind: Make sure RPI firmware and VC/MMAL stuff is found. Check Cmake output for the MMAL test.

Hm. Which 'Cmake output'? The config output? There's nothing. Or the build output?
Reply
#25
the config output. You might want to pastebin the complete output of the build, including which options you are using, as well as CMakeCache.txt
You shouldn't have to mess with static or shared flags, this should all be figured out by cmake automatically.
Reply
#26
@wsnipex

This is what, after some additional cleanup, is currently building

https://gist.github.com/listsssl/0f9f635...98876d56f0
Reply
#27
couple for issues:
1) -DPLATFORM doesn't exist, use -DCORE_SYSTEM_NAME=rbpi instead
2) Arm platforms need -DENABLE_OPENGLES=ON -DENABLE_OPENGL=OFF
3) add -DCMAKE_PREFIX_PATH=/opt/vc, which should render your ADDL_INCLUDES obsolete and fix finding MMAL, so don't override MMAL_FOUND and OMX_FOUND
4) you can get rid of COMMON_BUILD_OPTS, this should all be automatic. Keep -DVERBOSE=ON if you want
Reply
#28
> 2) Arm platforms need -DENABLE_OPENGLES=ON -DENABLE_OPENGL=OFF

If this a Kodi restriction?

RPI2 supports OpenGL ...

https://www.raspberrypi.org/blog/another...n-release/
Quote:In this release we are shipping an experimental OpenGL driver for the desktop which uses the GPU to provide hardware acceleration. This is turned off by default – if you want to enable it, you can find it in the command-line version of raspi-config, under Advanced Options->GL Driver. Due to memory requirements, this will not work on Pi 1 or Pi Zero boards – it is solely for Pi 2. (raspi-config will only allow it to be enabled on a Pi 2; be warned that if you enable it on a Pi 2 and then move that SD card into a Pi 1 or Pi Zero, the Pi will not boot.)If you don’t use this option, the desktop does have OpenGL support, but it uses a very slow software renderer, which makes all but the most basic OpenGL applications pretty much unusable. The hardware-accelerated version is much faster, and makes some quite decent OpenGL games playable on the Pi.
...
If you are running the current Jessie image, it can be updated to the new version by running
Code:
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install raspi-gpio
Quote:To add the experimental GL driver, you will also need to run
Code:
sudo apt-get install xcompmgr libgl1-mesa-dri
AFter which, on my RPI2
Code:
glxinfo | grep "OpenGL version"
  OpenGL version string: 2.1 Mesa 10.3.2
Reply
#29
and what makes you think that using an experimental driver that was made to make standard linux DMs at least somehow useable on rpi2, would be better then using the gfx interface that was designed for ARM socs?
I'm pretty sure no dev ever tested this, let alone that it is supported.

Kodi on ARM needs OPENGLES.
Reply
#30
> and what makes you think

I guess the same bad sense that led to thinking that working hard on getting all this ^^ untested kodi functionality was of interest/useful.
Reply

Logout Mark Read Team Forum Stats Members Help
Adding Rpi2 support to CMAKE build system0