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.