Jump to content


Photo

Crosscompile CrossEPG 0.6.2


  • Please log in to reply
9 replies to this topic

#1 pablocool

  • Senior Member
  • 72 posts

+1
Neutral

Posted 7 January 2018 - 18:09

Hello

 

I always use CrossEPG 0.6.2 because it creates EPG with longer names (first part of description is included in program title). It is useful for recordings to have eg episode num in filename. So I need to crosscompile it with latest changes to support xz format. (Latest CrossEPG 0.8.5 including xz changes that I grabbed from blackhole works fine with xz archives but creates short program names.

I have working openpli-oe-core environment and sometimes compile tools using devshell script. So now I prepared script to build crossepg basing on existing scripts for sh and mips platforms:

#!/bin/sh

[ -d ./tmp ] && rm -rf ./tmp

#DEVKIT_ROOT=/mnt/devel/workspace/openee_build/dm800se/build/tmp
DEVKIT_ROOT=/home/pablocool/git/openpli-oe-core/build/tmp
#CROSS=${DEVKIT_ROOT}/cross/mipsel/bin/mipsel-oe-linux-

#export CFLAGS+="-I${DEVKIT_ROOT}/staging/mipsel-oe-linux/usr/include \
# -I${DEVKIT_ROOT}/staging/mipsel-oe-linux/usr/include/libxml2 \
# -I${DEVKIT_ROOT}/staging/mipsel-oe-linux/usr/include/python2.6"
export CFLAGS+="-I${DEVKIT_ROOT}/sysroots-components/mips32el/libxml2/usr/include/libxml2/libxml \
 -I${DEVKIT_ROOT}/sysroots-components/mips32el/libxml2/usr/include/libxml2 \
 -I${DEVKIT_ROOT}/sysroots-components/mips32el/python/usr/include/python2.7 \
 -I${DEVKIT_ROOT}/sysroots-components/mips32el/zlib/usr/include"

#export CC=${DEVKIT_ROOT}/work/mips32el-oe-linux/devshell/1.0-r3/recipe-sysroot-native/usr/bin/mipsel-oe-linux/mipsel-oe-linux-gcc
#export STRIP=${DEVKIT_ROOT}/work/mips32el-oe-linux/devshell/1.0-r3/recipe-sysroot-native/usr/bin/mipsel-oe-linux/mipsel-oe-linux-strip
#export SWIG=${DEVKIT_ROOT}/staging/x86_64-linux/usr/bin/swig
export SWIG=${DEVKIT_ROOT}/sysroots-components/x86_64/swig-native/usr/bin/swig
export D=./tmp

#LD_DEBUG=all make && make install
make && make install

if [ $? != 0 ]; then
        echo compile error
        exit 1
fi

mkdir -p tmp/CONTROL
cp contrib/control tmp/CONTROL/
VERSION=`cat src/version.h | grep RELEASE | sed "s/.*RELEASE \"//" | sed "s/\"//" | sed "s/\ /-/" | sed "s/\ /-/" | sed "s/(//" | sed "s/)//"`
echo "Package: enigma2-plugin-systemplugins-crossepg" >> tmp/CONTROL/control
echo "Version: $VERSION-r0" >> tmp/CONTROL/control
echo "Architecture: mipsel" >> tmp/CONTROL/control

sh ipkg-build -o root -g root tmp/

[ ! -d out ] && mkdir out
mv *.ipk out
echo "Package moved in `pwd`/out folder"

I run this from devshell and it fails on linking (cannot find -lxml2, cannot find -lz):

mipsel-oe-linux-gcc  -mel -mabi=32 -mhard-float -march=mips32 --sysroot=/home/pablocool/git/openpli-oe-core/build/tmp/work/mips32el-oe-linux/devshell/1.0-r3/recipe-sysroot  -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/pablocool/git/openpli-oe-core/build/tmp/work/mips32el-oe-linux/devshell/1.0-r3=/usr/src/debug/devshell/1.0-r3 -fdebug-prefix-map=/home/pablocool/git/openpli-oe-core/build/tmp/work/mips32el-oe-linux/devshell/1.0-r3/recipe-sysroot-native= -fdebug-prefix-map=/home/pablocool/git/openpli-oe-core/build/tmp/work/mips32el-oe-linux/devshell/1.0-r3/recipe-sysroot= -I/home/pablocool/git/openpli-oe-core/build/tmp/sysroots-components/mips32el/libxml2/usr/include/libxml2/libxml  -I/home/pablocool/git/openpli-oe-core/build/tmp/sysroots-components/mips32el/libxml2/usr/include/libxml2  -I/home/pablocool/git/openpli-oe-core/build/tmp/sysroots-components/mips32el/python/usr/include/python2.7  -I/home/pablocool/git/openpli-oe-core/build/tmp/sysroots-components/mips32el/zlib/usr/include -c -o src/enigma2/crossepg_dbconverter.o src/enigma2/crossepg_dbconverter.c
mipsel-oe-linux-gcc  -mel -mabi=32 -mhard-float -march=mips32 --sysroot=/home/pablocool/git/openpli-oe-core/build/tmp/work/mips32el-oe-linux/devshell/1.0-r3/recipe-sysroot -Wl,-O1  -Wl,--as-needed -o bin/crossepg_dbconverter src/common/memory.o src/common/core/log.o src/common/core/interactive.o src/common/dvb/dvb.o src/common/aliases/aliases.o src/common/net/http.o src/common/gzip/gzip.o src/common/opentv/opentv.o src/common/opentv/huffman.o src/common/providers/providers.o src/common/epgdb/epgdb.o src/common/epgdb/epgdb_channels.o src/common/epgdb/epgdb_index.o src/common/epgdb/epgdb_titles.o src/common/epgdb/epgdb_aliases.o src/common/epgdb/epgdb_search.o src/common/xmltv/xmltv_encodings.o src/common/xmltv/xmltv_channels.o src/common/xmltv/xmltv_downloader.o src/common/xmltv/xmltv_parser.o src/common/dbmerge/dbmerge.o src/enigma2/enigma2_hash.o src/enigma2/enigma2_lamedb.o src/common/importer/csv.o src/common/importer/importer.o src/enigma2/crossepg_dbconverter.o -lxml2 -lz -lm -lpthread
/home/pablocool/git/openpli-oe-core/build/tmp/work/mips32el-oe-linux/devshell/1.0-r3/recipe-sysroot-native/usr/bin/mipsel-oe-linux/../../libexec/mipsel-oe-linux/gcc/mipsel-oe-linux/6.3.0/ld: cannot find -lxml2
/home/pablocool/git/openpli-oe-core/build/tmp/work/mips32el-oe-linux/devshell/1.0-r3/recipe-sysroot-native/usr/bin/mipsel-oe-linux/../../libexec/mipsel-oe-linux/gcc/mipsel-oe-linux/6.3.0/ld: cannot find -lz
collect2: error: ld returned 1 exit status
Makefile:106: recipe for target 'bin/crossepg_dbconverter' failed
make: *** [bin/crossepg_dbconverter] Error 1
compile error
[OE::mipsel-oe-linux-openpli-vusolo2]:~/git/e2openplugin-CrossEPG$

If I add variable LD_DEBUG=all for make 

 

Then I can see:

gcc/mipsel-oe-linux/6.3.0/collect2 [0] to /lib/x86_64-linux-gnu/libc.so.6 [0]: normal symbol `__vsprintf_chk' [GLIBC_2.3.4]
collect2: error: ld returned 1 exit status
      8447:     symbol=exit;  lookup in file=/home/pablocool/git/openpli-oe-core/build/tmp/work/mips32el-oe-linux/devshell/1.0-r3/recipe-sysroot-native/usr/bin/mipsel-oe-linux/../../libexec/mipsel-oe-linux/gcc/mipsel-oe-linux/6.3.0/collect2 [0]
      8447:     symbol=exit;  lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0]
      8447:     binding file /home/pablocool/git/openpli-oe-core/build/tmp/work/mips32el-oe-linux/devshell/1.0-r3/recipe-sysroot-native/usr/bin/mipsel-oe-linux/../../libexec/mipsel-oe-linux/gcc/mipsel-oe-linux/6.3.0/collect2 [0] to /lib/x86_64-linux-gnu/libc.so.6 [0]: normal symbol `exit' [GLIBC_2.2.5]
      8447:     symbol=__lxstat;  lookup in file=/home/pablocool/git/openpli-oe-core/build/tmp/work/mips32el-oe-linux/devshell/1.0-r3/recipe-sysroot-native/usr/bin/mipsel-oe-linux/../../libexec/mipsel-oe-linux/gcc/mipsel-oe-linux/6.3.0/collect2 [0]
      8447:     symbol=__lxstat;  lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0]
      8447:     binding file /home/pablocool/git/openpli-oe-core/build/tmp/work/mips32el-oe-linux/devshell/1.0-r3/recipe-sysroot-native/usr/bin/mipsel-oe-linux/../../libexec/mipsel-oe-linux/gcc/mipsel-oe-linux/6.3.0/collect2 [0] to /lib/x86_64-linux-gnu/libc.so.6 [0]: normal symbol `__lxstat' [GLIBC_2.2.5]
      8447:
      8447:     calling fini: /home/pablocool/git/openpli-oe-core/build/tmp/work/mips32el-oe-linux/devshell/1.0-r3/recipe-sysroot-native/usr/bin/mipsel-oe-linux/../../libexec/mipsel-oe-linux/gcc/mipsel-oe-linux/6.3.0/collect2 [0]
      8447:
      8446:     symbol=unlink;  lookup in file=mipsel-oe-linux-gcc [0]
      8446:     symbol=unlink;  lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0]
      8446:     binding file mipsel-oe-linux-gcc [0] to /lib/x86_64-linux-gnu/libc.so.6 [0]: normal symbol `unlink' [GLIBC_2.2.5]
      8446:
      8446:     calling fini: mipsel-oe-linux-gcc [0]
      8446:
      8354:     symbol=dcgettext;  lookup in file=make [0]
      8354:     symbol=dcgettext;  lookup in file=/lib/x86_64-linux-gnu/libdl.so.2 [0]
      8354:     symbol=dcgettext;  lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0]
      8354:     binding file make [0] to /lib/x86_64-linux-gnu/libc.so.6 [0]: normal symbol `dcgettext' [GLIBC_2.2.5]
      8354:     symbol=realloc;  lookup in file=make [0]
      8354:     symbol=realloc;  lookup in file=/lib/x86_64-linux-gnu/libdl.so.2 [0]
      8354:     symbol=realloc;  lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0]
      8354:     binding file /lib/x86_64-linux-gnu/libc.so.6 [0] to /lib/x86_64-linux-gnu/libc.so.6 [0]: normal symbol `realloc' [GLIBC_2.2.5]
Makefile:106: recipe for target 'bin/crossepg_dbconverter' failed
make: *** [bin/crossepg_dbconverter] Error 1
      8354:     symbol=chdir;  lookup in file=make [0]
      8354:     symbol=chdir;  lookup in file=/lib/x86_64-linux-gnu/libdl.so.2 [0]
      8354:     symbol=chdir;  lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0]
      8354:     binding file make [0] to /lib/x86_64-linux-gnu/libc.so.6 [0]: normal symbol `chdir' [GLIBC_2.2.5]
      8354:     symbol=exit;  lookup in file=make [0]
      8354:     symbol=exit;  lookup in file=/lib/x86_64-linux-gnu/libdl.so.2 [0]
      8354:     symbol=exit;  lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0]
      8354:     binding file make [0] to /lib/x86_64-linux-gnu/libc.so.6 [0]: normal symbol `exit' [GLIBC_2.2.5]
      8354:
      8354:     calling fini: make [0]
      8354:
      8354:
      8354:     calling fini: /lib/x86_64-linux-gnu/libdl.so.2 [0]
      8354:
compile error
[OE::mipsel-oe-linux-openpli-vusolo2]:~/git/e2openplugin-CrossEPG$

Is it correct ld looks for libc from native system "/lib/x86_64-linux-gnu/libc.so.6" ?

 

This is 106th line of Makefile:

$(CONVERTER_BIN): $(OBJS) $(CONVERTER_OBJS)
        $(CC) $(LDFLAGS) -o $@ $(OBJS) $(CONVERTER_OBJS) -lxml2 -lz -lm -lpthread   <--- 106 line
        $(STRIP) $@

How can I fix it?

 

Thx in advance


Edited by pablocool, 7 January 2018 - 18:11.


Re: Crosscompile CrossEPG 0.6.2 #2 pablocool

  • Senior Member
  • 72 posts

+1
Neutral

Posted 7 January 2018 - 18:19

binding file /home/pablocool/git/openpli-oe-core/build/tmp/work/mips32el-oe-linux/devshell/1.0-r3/recipe-sysroot-native/usr/bin/mipsel-oe-linux/../../libexec/mipsel-oe-linux/gcc/mipsel-oe-linux/6.3.0/ld [0] to /lib/x86_64-linux-gnu/libc.so.6 [0]: normal symbol `fwrite' [GLIBC_2.2.5]
: cannot find -lxml2


Re: Crosscompile CrossEPG 0.6.2 #3 Abu Baniaz

  • PLi® Contributor
  • 2,414 posts

+61
Good

Posted 7 January 2018 - 18:20

Which EPG data will you be obtaining? Rytec's or OpenTV EPG?



Re: Crosscompile CrossEPG 0.6.2 #4 pablocool

  • Senior Member
  • 72 posts

+1
Neutral

Posted 7 January 2018 - 18:37

Rytec but how does this correspond to my issue?



Re: Crosscompile CrossEPG 0.6.2 #5 Abu Baniaz

  • PLi® Contributor
  • 2,414 posts

+61
Good

Posted 7 January 2018 - 18:52

You will be obtaining the same data. CrossEPG does not trim any of it off. If it does, Revert the commit that caused it and build latest version without it.


Edited by Abu Baniaz, 7 January 2018 - 18:53.


Re: Crosscompile CrossEPG 0.6.2 #6 pablocool

  • Senior Member
  • 72 posts

+1
Neutral

Posted 7 January 2018 - 19:27

I will handle CrossEPG data by myself. Problem is linker is not seeing zlib and libxml2 libs.



Re: Crosscompile CrossEPG 0.6.2 #7 Abu Baniaz

  • PLi® Contributor
  • 2,414 posts

+61
Good

Posted 7 January 2018 - 19:59

Sorry, I cant help.

 

If your suggestion that CrossEPG is discarding data that it is given from a website is true, It would be great to have this corrected. I have looked at the commit logs for the OE-A version and can't see where this got removed. Maybe someone else knows. If you find it, please submit a pull request.



Re: Crosscompile CrossEPG 0.6.2 #8 pablocool

  • Senior Member
  • 72 posts

+1
Neutral

Posted 7 January 2018 - 21:36

OK I solved issue by LD_FLAGS

 

This is working script to build CrossEPG for OpenPLi 6.0 via devshell

#!/bin/sh

[ -d ./tmp ] && rm -rf ./tmp

DEVKIT_ROOT=/home/pablocool/git/openpli-oe-core/build/tmp

export CFLAGS+="-I${DEVKIT_ROOT}/sysroots-components/mips32el/libxml2/usr/include/libxml2/libxml \
 -I${DEVKIT_ROOT}/sysroots-components/mips32el/libxml2/usr/include/libxml2 \
 -I${DEVKIT_ROOT}/sysroots-components/mips32el/python/usr/include \
 -I${DEVKIT_ROOT}/sysroots-components/mips32el/python/usr/include/python2.7 \
 -I${DEVKIT_ROOT}/sysroots-components/mips32el/zlib/usr/include"

export LDFLAGS+=" -L${DEVKIT_ROOT}/sysroots-components/mips32el/zlib/usr/lib \
                  -L${DEVKIT_ROOT}/sysroots-components/mips32el/libxml2/usr/lib"

export SWIG=${DEVKIT_ROOT}/sysroots-components/x86_64/swig-native/usr/bin/swig
export D=./tmp

#LD_DEBUG=all make && make install
make && make install

if [ $? != 0 ]; then
        echo compile error
        exit 1
fi

mkdir -p tmp/CONTROL
cp contrib/control tmp/CONTROL/
VERSION=`cat src/version.h | grep RELEASE | sed "s/.*RELEASE \"//" | sed "s/\"//" | sed "s/\ /-/" | sed "s/\ /-/" | sed "s/(//" | sed "s/)//"`
echo "Package: enigma2-plugin-systemplugins-crossepg" >> tmp/CONTROL/control
echo "Version: $VERSION-r0" >> tmp/CONTROL/control
echo "Architecture: mipsel" >> tmp/CONTROL/control

sh ipkg-build -o root -g root tmp/

[ ! -d out ] && mkdir out
mv *.ipk out
echo "Package moved in `pwd`/out folder"

Ewentually this is old cool 0.6.2 version with xz rytec support:

https://www.dropbox....mipsel.ipk?dl=1



Re: Crosscompile CrossEPG 0.6.2 #9 FlexMcMurphy

  • Member
  • 7 posts

0
Neutral

Posted 9 June 2020 - 18:00

pablocool,

 

Is there any chance you could get crossepg 0.6.2 working on arm processors like for ZGemma H7S?

 

Cheers,

 

Flex



Re: Crosscompile CrossEPG 0.6.2 #10 Abu Baniaz

  • PLi® Contributor
  • 2,414 posts

+61
Good

Posted 9 June 2020 - 21:19

There is an Arm version of CrsosEPG on the plugin server. Is there something wrong with it??


Edited by Abu Baniaz, 9 June 2020 - 21:37.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users