Help me build cross compile tvheadend latest for lede 17.01.4 on router buffalo wzr600dhp2!

I search all topic guide cross compile tvheadend latest git for lede 17.01.4. But can not success. I have get toolchain and sdk on openwrt but when get source tvheadend by git clone. And run code make package/tvheaden/compile , then error no run to make target. Please help me cross compile step by step for tvheadend latest.
Thank 4 all!!

Please help me. I have build success toolchain by run "git clone" on github. But when i get source tvheadend and compile package by "make /package/tvheadend/compile. Get error "no rule to make target". Please help me fix. Sorry my english is not smooth.

Please help me for build.

see

Hi. You can guide help me detail step by step. Sorry my english not smooth.

First of all you have to complete the lede source code, it is best to normally generate a firmware,Replace the downloaded package with the original /feeds/packages/multimedia folder,
and then run
'make menuconfig'
Select tvheanend in the menu
Compile this software to run
'make package/feeds/packages/tvheadend/compile V=s'

I need make source lede first?
Then i have need git clone source tvheadend? To feed/package/multimedia/tvheadend?
Make menuconfig
And then compile source tvheadend generate package tvheadend.ipk

No, you don't need to download tvheanend's source code. Download tvheanend's makefile, see above address. Replace the makefile folder in the lede source code. Is it clear?

I do not have time to do these days. Where do I put the tvheadend makefile? put on multimedia / makefile? sorry for my bad linux. You are very detailed instructions, thank you very much. If you can give yourself a tutorial clip or a detailed tutorial from start to finish. I need the file tvheadend.ipk for buffalo wzr600dhp2

@kunxiang
Is this working for you ? I had some seg fault using latest TVH versions.

I have compile fw openwrt success
I have replace makefile above folder /feeds/package/multimedia/tvheadend
And run make menuconfig selected tvheadend
Cross compile by make /feeds/package/multimedia/tvheadend compile v=s but error
Error checking for feature/support
Checking for cc libdvbcsa
How to fix and continue

clone the libdvbcsa folder,put in package folder,then run make menuconfig,select it,run make again.

root@nptech-VirtualBox:~/openwrt/openwrt# make package/feeds/packages/tvheadend/compile V=s
make[1]: Entering directory '/root/openwrt/openwrt'
make[2]: Entering directory '/root/openwrt/openwrt/package/libs/toolchain'
echo "libc" >> /root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/pkginfo/toolchain.default.install
echo "libgcc" >> /root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/pkginfo/toolchain.default.install
echo "libpthread" >> /root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/pkginfo/toolchain.default.install
echo "librt" >> /root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/pkginfo/toolchain.default.install
make[2]: Leaving directory '/root/openwrt/openwrt/package/libs/toolchain'
make[2]: Entering directory '/root/openwrt/openwrt/package/libs/openssl'
echo "libopenssl" >> /root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/pkginfo/openssl.default.install
make[2]: Leaving directory '/root/openwrt/openwrt/package/libs/openssl'
make[2]: Entering directory '/root/openwrt/openwrt/package/libs/zlib'
echo "zlib" >> /root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/pkginfo/zlib.default.install
make[2]: Leaving directory '/root/openwrt/openwrt/package/libs/zlib'
make[2]: Entering directory '/root/openwrt/openwrt/package/libs/gettext'
make[2]: Leaving directory '/root/openwrt/openwrt/package/libs/gettext'
make[2]: Entering directory '/root/openwrt/openwrt/package/libs/libiconv'
make[2]: Leaving directory '/root/openwrt/openwrt/package/libs/libiconv'
make[2]: Entering directory '/root/openwrt/openwrt/feeds/packages/multimedia/tvheadend'
rm -f /root/openwrt/openwrt/build_dir/target-arm_cortex-a9_musl_eabi/tvheadend-4.3/.configured_*
rm -f /root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/stamp/.tvheadend_installed
(cd /root/openwrt/openwrt/build_dir/target-arm_cortex-a9_musl_eabi/tvheadend-4.3; rm -f aclocal.m4; if [ -f ./configure.ac ] || [ -f ./configure.in ]; then [ -d ./autom4te.cache ] && rm -rf autom4te.cache; [ -e ./config.rpath ] || ln -s /root/openwrt/openwrt/scripts/config.rpath ./config.rpath; touch NEWS AUTHORS COPYING ABOUT-NLS ChangeLog; AUTOM4TE=/root/openwrt/openwrt/staging_dir/host/bin/autom4te AUTOCONF=/root/openwrt/openwrt/staging_dir/host/bin/autoconf AUTOMAKE=/root/openwrt/openwrt/staging_dir/host/bin/automake ACLOCAL=/root/openwrt/openwrt/staging_dir/host/bin/aclocal AUTOHEADER=/root/openwrt/openwrt/staging_dir/host/bin/autoheader LIBTOOLIZE=/root/openwrt/openwrt/staging_dir/host/bin/libtoolize LIBTOOL=/root/openwrt/openwrt/staging_dir/host/bin/libtool M4=/root/openwrt/openwrt/staging_dir/host/bin/m4 AUTOPOINT=true /root/openwrt/openwrt/staging_dir/host/bin/autoreconf -v -f -i -s -B /root/openwrt/openwrt/staging_dir/host/share/aclocal -I /root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/host/share/aclocal -I /root/openwrt/openwrt/staging_dir/hostpkg/share/aclocal -I /root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/usr/share/aclocal -I m4 -I . . || true; fi; );
(cd /root/openwrt/openwrt/build_dir/target-arm_cortex-a9_musl_eabi/tvheadend-4.3/./; if [ -x ./configure ]; then find /root/openwrt/openwrt/build_dir/target-arm_cortex-a9_musl_eabi/tvheadend-4.3/ -name config.guess | xargs -r chmod u+w; find /root/openwrt/openwrt/build_dir/target-arm_cortex-a9_musl_eabi/tvheadend-4.3/ -name config.guess | xargs -r -n1 cp --remove-destination /root/openwrt/openwrt/scripts/config.guess; find /root/openwrt/openwrt/build_dir/target-arm_cortex-a9_musl_eabi/tvheadend-4.3/ -name config.sub | xargs -r chmod u+w; find /root/openwrt/openwrt/build_dir/target-arm_cortex-a9_musl_eabi/tvheadend-4.3/ -name config.sub | xargs -r -n1 cp --remove-destination /root/openwrt/openwrt/scripts/config.sub; AR="arm-openwrt-linux-muslgnueabi-gcc-ar" AS="arm-openwrt-linux-muslgnueabi-gcc -c -Os -pipe -mcpu=cortex-a9 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -iremap/root/openwrt/openwrt/build_dir/target-arm_cortex-a9_musl_eabi/tvheadend-4.3:tvheadend-4.3 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/usr/lib/libiconv-stub/include -I/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/usr/lib/libintl-stub/include" LD=arm-openwrt-linux-muslgnueabi-ld NM="arm-openwrt-linux-muslgnueabi-gcc-nm" CC="arm-openwrt-linux-muslgnueabi-gcc" GCC="arm-openwrt-linux-muslgnueabi-gcc" CXX="arm-openwrt-linux-muslgnueabi-g++" RANLIB="arm-openwrt-linux-muslgnueabi-gcc-ranlib" STRIP=arm-openwrt-linux-muslgnueabi-strip OBJCOPY=arm-openwrt-linux-muslgnueabi-objcopy OBJDUMP=arm-openwrt-linux-muslgnueabi-objdump SIZE=arm-openwrt-linux-muslgnueabi-size CFLAGS="-Os -pipe -mcpu=cortex-a9 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -iremap/root/openwrt/openwrt/build_dir/target-arm_cortex-a9_musl_eabi/tvheadend-4.3:tvheadend-4.3 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/usr/lib/libiconv-stub/include -I/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/usr/lib/libintl-stub/include " CXXFLAGS="-Os -pipe -mcpu=cortex-a9 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -iremap/root/openwrt/openwrt/build_dir/target-arm_cortex-a9_musl_eabi/tvheadend-4.3:tvheadend-4.3 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/usr/lib/libiconv-stub/include -I/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/usr/lib/libintl-stub/include " CPPFLAGS="-I/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/usr/include -I/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/include -I/root/openwrt/openwrt/staging_dir/toolchain-arm_cortex-a9_gcc-7.3.0_musl_eabi/usr/include -I/root/openwrt/openwrt/staging_dir/toolchain-arm_cortex-a9_gcc-7.3.0_musl_eabi/include/fortify -I/root/openwrt/openwrt/staging_dir/toolchain-arm_cortex-a9_gcc-7.3.0_musl_eabi/include -I/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/usr/lib/libiconv-stub/include -I/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/usr/lib/libintl-stub/include " LDFLAGS="-L/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/usr/lib -L/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/lib -L/root/openwrt/openwrt/staging_dir/toolchain-arm_cortex-a9_gcc-7.3.0_musl_eabi/usr/lib -L/root/openwrt/openwrt/staging_dir/toolchain-arm_cortex-a9_gcc-7.3.0_musl_eabi/lib -znow -zrelro -L/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/usr/lib/libiconv-stub/lib -Wl,-rpath-link=/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/usr/lib/libiconv-stub/lib -L/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/usr/lib/libintl-stub/lib -Wl,-rpath-link=/root/openwrt/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/usr/lib/libintl-stub/lib "   ./configure --target=arm-openwrt-linux --host=arm-openwrt-linux --build=x86_64-pc-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls  --disable-cwc --disable-linuxdvb --disable-dvbscan --disable-avahi --arch=arm --disable-dbus_1 --disable-libav --enable-bundle --disable-dvbscan --disable-avahi --disable-hdhomerun_static --disable-pie --disable-imagecache --disable-ffmpeg_static --disable-libx264 --disable-libx264_static --disable-libx265 --disable-libx265_static --disable-libvpx --disable-libvpx_static --disable-libtheora --disable-libtheora_static --disable-libvorbis --disable-libvorbis_static --disable-libfdkaac --disable-libfdkaac_static --disable-nvenc --disable-libmfx_static --disable-timeshift ; fi; )
Checking support/features
  checking for cc execinfo.h ...                    fail
  checking for cc -mmmx ...                         fail
  checking for cc -msse2 ...                        fail
  checking for cc -Wunused-result ...               ok
  checking for cc getloadavg ...                    ok
  checking for cc atomic32 ...                      ok
  checking for cc atomic64 ...                      ok
  checking for cc atomic_time_t ...                 ok
  checking for cc atomic_ptr ...                    ok
  checking for cc bitops64 ...                      ok
  checking for cc lockowner ...                     fail
  checking for cc qsort_r ...                       fail
  checking for cc stime ...                         ok
  checking for cc gmtoff ...                        ok
  checking for cc recvmmsg ...                      ok
  checking for cc sendmmsg ...                      ok
  checking for cc libiconv ...                      ok
    ^ using external iconv library
  checking for cc ifnames ...                       ok
  checking for cc cclang_threadsan ...              fail
  checking for py module gzip ...                   ok
  checking for /root/openwrt/openwrt/staging_dir/host/bin/pkg-config ...ok
  checking for xgettext ...                         ok
  checking for msgmerge ...                         ok
  checking for gzip ...                             ok
  checking for bzip2 ...                            ok
  checking for pkg openssl  ...                     ok (detected 1.0.2o)
  checking for cc linux/dvb/version.h ...           ok
  checking for pkg zlib  ...                        ok (detected 1.2.11)
  checking for pkg libpcre2-8  ...                  fail (detected <none>)
  checking for pkg libpcre  ...                     fail (detected <none>)
  checking for pkg liburiparser  ...                fail (detected <none>)
  checking for cc sys/inotify.h ...                 ok
  checking for cc inotify_init1 ...                 ok
  checking for cc dvbcsa/dvbcsa.h ...               fail
ERROR: Failed to find dvbcsa library
Makefile:125: recipe for target '/root/openwrt/openwrt/build_dir/target-arm_cortex-a9_musl_eabi/tvheadend-4.3/.configured_a17fb5ef857664f03cd0ce37cc5ea591' failed
make[2]: *** [/root/openwrt/openwrt/build_dir/target-arm_cortex-a9_musl_eabi/tvheadend-4.3/.configured_a17fb5ef857664f03cd0ce37cc5ea591] Error 1
make[2]: Leaving directory '/root/openwrt/openwrt/feeds/packages/multimedia/tvheadend'
package/Makefile:107: recipe for target 'package/feeds/packages/tvheadend/compile' failed
make[1]: *** [package/feeds/packages/tvheadend/compile] Error 2
make[1]: Leaving directory '/root/openwrt/openwrt'
/root/openwrt/openwrt/include/toplevel.mk:216: recipe for target 'package/feeds/packages/tvheadend/compile' failed
make: *** [package/feeds/packages/tvheadend/compile] Error 2
root@nptech-VirtualBox:~/openwrt/openwrt#

i crosscompile error above pls help me fix

help me for compile pls


Copy this folder to source/package and compile it again

I did not try the latest version. The version I uploaded is available.

You can give me your personal faceboo for convenient contact to help me. I followed you copy libdvbcsa folder to sourcr / package but recompile still error. If possible you can teamview help me compile. Thank you!

@kunxiang
2018-05-09 22:56:18.883 [ INFO] main: Log started
2018-05-09 22:56:18.885 [ INFO] http: Starting HTTP server 0.0.0.0:9981
2018-05-09 22:56:18.885 [ INFO] htsp: Starting HTSP server 0.0.0.0:9982
2018-05-09 22:56:18.888 [ INFO] config: loaded
2018-05-09 22:56:18.890 [ INFO] config: scanfile (re)initialization with path
2018-05-09 22:56:18.890 [ ERROR] main: iconv() routine is not working properly (luoukK), aborting!

with your last version ?

Me too same proble