Project

General

Profile

tvheadend on Pogoplug (ARM arch)

Added by Gil Sas about 13 years ago

Hi,

I just came across that beautiful piece of software, gave it a try under Ubuntu/x86 and overall looks very good! Because, as most I guess, I intend to leave the server running 24/7, I'd like to put it on a little Pogoplug-like device (Seagate Dockstar) that runs Debian Lenny, ARM. It's a tiny, low power yet capable device (1.2GHz) that I use for various purposes at home. I assume it will be capable of handling the resulting workload, well, worth trying anyways :-)

So I did try to compile tvheadend, and after fixing a few quirks got stuck at seemingly the very last stage of linking process; because of a missing reference to a x86 function __sync_fetch_and_add_4 : seems to be an atomic fetch and add operation that is not supported by arm isa.

debian:~/tvheadend# ./configure --disable-avahi --release
Using C compiler: cc
Using libssl: 0.9.8g
Release build: 2.12.99
Final binary is: build.Linux/tvheadend
debian:~/tvheadend# make
CC build.Linux/src/main.o
CC build.Linux/src/utils.o
CC build.Linux/src/wrappers.o
CC build.Linux/src/version.o
CC build.Linux/src/access.o
CC build.Linux/src/dtable.o
CC build.Linux/src/tcp.o
CC build.Linux/src/http.o
...
CC build.Linux/src/dvb/dvb_satconf.o
CC build.Linux/src/webui/extjs_dvb.o
CC build.Linux/src/v4l.o
CC build.Linux/src/webui/extjs_v4l.o
CC build.Linux/tvheadend
build.Linux/src/packet.o: In function `atomic_add':
/root/tvheadend/src/atomic.h:25: undefined reference to `__sync_fetch_and_add_4'
/root/tvheadend/src/atomic.h:25: undefined reference to `__sync_fetch_and_add_4'
/root/tvheadend/src/atomic.h:25: undefined reference to `__sync_fetch_and_add_4'
/root/tvheadend/src/atomic.h:25: undefined reference to `__sync_fetch_and_add_4'
/root/tvheadend/src/atomic.h:25: undefined reference to `__sync_fetch_and_add_4'
build.Linux/src/packet.o:/root/tvheadend/src/atomic.h:25: more undefined references to `__sync_fetch_and_add_4' follow
collect2: ld returned 1 exit status
make: *** [build.Linux/tvheadend] Error 1

I tracked the changes in the atomic.h file and saw you guys had resorted to an implementation that rely on gcc for the atomic sync and add - but gcc (4.3.2, not crosscompiled but performed on the target) fails to generate code for this. I tried various fix that I could find here and there such as appending explicit reference to the arch in the makefile, also linking with "-lgcc_s -lgcc" options but no way, still stuck at that very stage. Any idea how this could be fixed? That would imho be interesting as many routers & NAS devices run under ARM so many could benefit from this!

Cheers,

gilsas


Replies (2)

RE: tvheadend on Pogoplug (ARM arch) - Added by Gil Sas about 13 years ago

Well in the meantime I figured out so I thought I'd share :-)
Support for generic atomic operations is broken in gcc 4.3 so I went for gcc 4.5 - the latest gcc version for debian Lenny being 4.3 I had to change the sources.list file for apt-get to fetch the debian "wheezy" version. I then went further and came into another undefined reference this time in openssl; just appended -lcrypto in the makefile linker flags and it worked! Great!

I just have to wait until I receive my dvb-s2 usb stick now and on to the tweaking!

Strangely make install did not setup the init.d stuff, guess it is supposed to?

Cheers,

gilsas

RE: tvheadend on Pogoplug (ARM arch) - Added by guy dububu about 13 years ago

Hey,

I hope you get it working. I used it for a while on my Pogoplug running Debian Squeeze with my Hauppauge 950Q (ATSC). It worked great when it worked but once in a while it lost the service and it was hell to get it back. It was not stable enough for me.

I tried tvheadend on my pc and there was no problem, altought it was just a quick test.

    (1-2/2)