HOw to add a vdr - plugin to LE build?

  • The patch for tinyxml2 does not work here...

    I build for github master (LE9) - works here without problems (I build for Generic).

    BTW: how to get your latest (unmerged) commits?

    there are several ways, maybe easiest

    Code
    git remote add cvh-git https://github.com/CvH/LibreELEC.tv.git

    adds my repo to your git

    Code
    git remote -v

    should list all available repos

    Code
    git fetch

    should get the latest information from all gits

    and git checkout 9.0-vdr-epg should switch to my branch

    you can ofc also hand pic any change you like

    curl -L https://github.com/CvH/LibreELEC.tv/commit/fecfa09d9fe7f98c376834a098d236f268952775.patch | git am - 

    ^^^ that adds an commit + commit it under the original commit message/author

    curl -L https://github.com/CvH/LibreELEC.tv/commit/fecfa09d9fe7f98c376834a098d236f268952775.patch | git apply -

    ^^^ that just merges the changes

    all you need is replace the sha256 hash to the commit you like and add .patch

  • hmm...

    Code
    lutz@libreelec:/develop/LibreELEC.tv$ git remote -v
    cvh-git	https://github.com/CvH/LibreELEC.tv.git (fetch)
    cvh-git	https://github.com/CvH/LibreELEC.tv.git (push)
    origin	https://github.com/LibreELEC/LibreELEC.tv.git (fetch)
    origin	https://github.com/LibreELEC/LibreELEC.tv.git (push)
    lutz@libreelec:/develop/LibreELEC.tv$ git fetch
    lutz@libreelec:/develop/LibreELEC.tv$ git checkout 9.0-vdr-epg
    error: pathspec '9.0-vdr-epg' did not match any file(s) known to git.
  • Code
    I am going to checkout 9.0-vdr-epg

    Edited 2 times, last by magicamun (March 5, 2018 at 12:15 PM).

  • ok - checked out - compiles fine except for the zlib - stuff:

    Code
    sr/include/mysql -o epg2vdr.o epg2vdr.cIn file included from lib/config.h:11:0,from plgconfig.h:12,from epg2vdr.c:11:lib/common.h:15:18: fatal error: zlib.h: No such file or directorycompilation terminated.make: *** [Makefile:122: epg2vdr.o] Error 1lutz@libreelec:/develop/LibreELEC.tv


    which i fixed in the Makefile - now it ends up like this (what is quite exactly hwat was going wrong in the first approach also):

    Code
    /develop/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ -march=x86-64 -m64 -fomit-frame-pointer -Wall -pipe -Os -flto -ffat-lto-objects -mmmx -msse -msse2 -mfpmath=sse -ggdb -O0 -fPIC -Wreturn-type -Wall -Wno-parentheses -Wformat -pedantic -Wno-long-long -Wunused-variable -Wunused-label -Wno-unused-result -Wunused-value -Wunused-function -Wno-variadic-macros -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c++11 -D__STDC_FORMAT_MACROS -Wunused-but-set-variable -march=x86-64 -m64 -fomit-frame-pointer -Wall -pipe -Os -flto -ffat-lto-objects -mmmx -msse -msse2 -mfpmath=sse -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -march=x86-64 -m64 -Wl,--as-needed -fuse-ld=gold -fuse-linker-plugin -flto -shared epg2vdr.o service.o update.o plgconfig.o parameters.o timer.o recording.o recinfofile.o status.o ttools.o svdrpclient.o menu.o menusched.o menutimers.o menudone.o menusearchtimer.o -L./lib -lhorchi -lrt -larchive -lcrypto -L/develop/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/lib -luuid -L/develop/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/lib -lz -L/develop/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/lib -ltinyxml2 -L/develop/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/lib -lmysqlclient -lpthread -lz -lm -lrt -ldl -L/develop/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/lib -lpython2.7 -L/develop/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/lib -ljansson -o libvdr-epg2vdr.so
    lto1: fatal error: bytecode stream in file 'epg2vdr.o' generated with LTO version 4.1 instead of the expected 6.0
    compilation terminated.
    lto-wrapper: fatal error: /develop/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++-7.3.0 returned 1 exit status
    compilation terminated.
    /develop/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel/toolchain/lib/gcc/x86_64-libreelec-linux-gnu/7.3.0/../../../../x86_64-libreelec-linux-gnu/bin/ld.gold: fatal error: lto-wrapper failed
    collect2: error: ld returned 1 exit status
    make: *** [Makefile:165: libvdr-epg2vdr.so] Error 1
    • Official Post

    Hmm zlib worked for me, but this is a minor problem.

    I get exactly the same output - no idea actually.

    I tried strip_gold and strip_lto but doesn't change anything. Maybe a general bug or something (ofc we could miss something)? Maybe worth to ask at vdr-portal.de at the plugin thread if they know whats up.

  • Code
    BUILD    vdr-plugin-epg2vdr (target)
        TOOLCHAIN    make (auto-detect)
    g++ .........

    Seems it is used compiler from host.

    Adding CC="$CXX" to make helps.

  • Line

    Code
    cp --remove-destination $ROOT/$PKG_BUILD/${LIB_NAME}.so $ROOT/$PKG_BUILD/${LIB_NAME}.so.${VDR_APIVERSION}

    is also wrong: there shouldn't not be $ROOT/ used.

  • will make image take the plugin? Or is there sth else to do?

    I am currently making an image for wetek play 2 - hope it works as desired. If it does - i will need to build it on 8.2.3 to work properly with my other instances of kodi/LE...

  • strangely the plugin is really big - no idea if this is normal

    whole Tvheadend is around ~6-7Mb (with much more functions then VDR can provide even with plugins), just the epg2vdr plugin is around 8mb ...

    My zip is 6.1 MB, unzipped 18MB.

    libvdr-epg2vdr.so.2.3.8 is 5 MB.