Bug #1386
Warnings and errors when compiling tvheadend
0%
Description
Hi,
I'm getting a warning and several errors when compiling tvheadend:
/opt/src/tvheadend_beta/src/capmt.c:73: warning: unknown option after '#pragma GCC diagnostic' kind CC build.linux/src/ffdecsa/ffdecsa_interface.o CC build.linux/src/ffdecsa/ffdecsa_int.o CC build.linux/tvheadend ./build.linux/src/packet.o: In function `atomic_add': /opt/src/tvheadend_beta/src/atomic.h:24: undefined reference to `__sync_fetch_and_add_4' /opt/src/tvheadend_beta/src/atomic.h:24: undefined reference to `__sync_fetch_and_add_4' /opt/src/tvheadend_beta/src/atomic.h:24: undefined reference to `__sync_fetch_and_add_4' /opt/src/tvheadend_beta/src/atomic.h:24: undefined reference to `__sync_fetch_and_add_4' /opt/src/tvheadend_beta/src/atomic.h:24: undefined reference to `__sync_fetch_and_add_4' ./build.linux/src/streaming.o:/opt/src/tvheadend_beta/src/atomic.h:24: more undefined references to `__sync_fetch_and_add_4' follow ./build.linux/src/subscriptions.o: In function `atomic_exchange': /opt/src/tvheadend_beta/src/atomic.h:30: undefined reference to `__sync_lock_test_and_set_4' ./build.linux/src/service.o: In function `atomic_add': /opt/src/tvheadend_beta/src/atomic.h:24: undefined reference to `__sync_fetch_and_add_4' /opt/src/tvheadend_beta/src/atomic.h:24: undefined reference to `__sync_fetch_and_add_4' ./build.linux/src/cwc.o: In function `atomic_add': /opt/src/tvheadend_beta/src/atomic.h:24: undefined reference to `__sync_fetch_and_add_4' collect2: ld returned 1 exit status make: *** [build.linux/tvheadend] Error 1
I'm compiling on a Synology NAS with a Marvell Kirkwood mv6282 (ARM)
History
Updated by Adam Sutton almost 12 years ago
- Status changed from New to Rejected
Rene,
Sorry for the delay, I've not been around for a few days.
I'm afraid this is not a bug but is by design. From TVH 3.4 onwards GCC 4.3+ will be required. The reason we're doing this is that from that version onwards GCC includes built-in support for various atomic operations.
This means that Andreas doesn't need to maintain various atomic_ ops himself. As he's intending to use some new routines for which we've previously had no implementations this seemed the right time to make the switch.
For now you will need to stick with 3.2 or (if possible) update your toolchain.
Adam
Updated by Rene Herbrich almost 12 years ago
Oh okay Do you think it's sufficient to compile a newer version of gcc or do I have to compile some other tools, too?
Updated by Adam Sutton almost 12 years ago
I honestly don't know I'd try asking the synology guys, I know Diaoul sometimes frequents #hts so if you can't get hold of them any other way try there, I might poke him myself and see if I can get some info from him.
Adam
Updated by Rene Herbrich almost 12 years ago
Found this post: http://www.synology-forum.de/showthread.html?21316-Installation-mkvtoolnix-auf-DS-211&p=196912&viewfull=1#post196912
He's describing how to compile all dependencies for gcc and gcc itself - even with c++ support, if needed. I'm trying the same rigth at the moment,
but without c++ support. Will report back.
Updated by Rene Herbrich almost 12 years ago
Compiled gcc 4.7.2 succesfully on my NAS
Here are my steps (inspired by the post mentioned above - thanks to scythe42!):
# maybe a good idea to put this into .profile export LD_LIBRARY_PATH="/opt/lib/:/lib/:$LD_LIBRARY_PATH" # if it's not already symlinked ln -s /opt/bin/bash /bin/bash # get latest versions of GMP, MPFR, MPC, libelf, gcc and unpack them ftp://ftp.gmplib.org/pub http://www.mpfr.org/mpfr-current http://www.multiprecision.org/index.php?prog=mpc&page=download http://www.mr511.de/software ftp://gcc.gnu.org/pub/gcc/releases # compile gmp ./configure --prefix=/opt make make install # compile mpfr ./configure --prefix=/opt make make install # compile mpc ./configure --prefix=/opt make make install # compile libelf ./configure --disable-nls --prefix=/opt make make install # fix some problems which would occur during gcc build process ln -s /opt/arm-none-linux-gnueabi/lib/crt1.o /usr/lib/crt1.o ln -s /opt/arm-none-linux-gnueabi/lib/crti.o /usr/lib/crti.o ln -s /opt/arm-none-linux-gnueabi/lib/crtn.o /usr/lib/crtn.o ln -s /opt/include /usr/include # compile gcc, gcc is then able to compile c source code only # took nearly 20h to compile, be patient ;) ./configure --disable-nls --disable-multilib --disable-libgomp --oldincludedir=/opt --prefix=/opt --enable-languages=c make # remove old gcc ipkg -force-depends remove gcc # install new one make install
Now I'm able to build the latest versions of tvheadend!