Bug #1086
Compiler issues for Synology NAS
100%
Description
schumi2004 has reported on github several issues related to compiling for:
"Cross-compiling it on Ubuntu 10.10 and 12.04 for a Synology DS211 Marvell Kirkwood mv6282 1.6Ghz ARM Processor (Marvell ARMADA 300)"
These seem to be because the cross-compiler may be being more pedantic about certain checks. Possibly right so I've take a few shortcuts that "should" be fine, but probably would be better to do properly (just means more data copying).
Going to get him to get a list of ALL compiler warnings and I'll review.
History
Updated by Rene Herbrich over 12 years ago
Can confirm these warnings (Synology DS112, nearly the same cpu) with the latest source files:
cc1: warnings being treated as errors
/opt/src/tvheadend_latest/src/muxes.c: In function '_muxes_load_atsc':
/opt/src/tvheadend_latest/src/muxes.c:113: warning: comparison is always false due to limited range of data type
/opt/src/tvheadend_latest/src/muxes.c: In function '_muxes_load_dvbt':
/opt/src/tvheadend_latest/src/muxes.c:134: warning: comparison is always false due to limited range of data type
/opt/src/tvheadend_latest/src/muxes.c:135: warning: comparison is always false due to limited range of data type
/opt/src/tvheadend_latest/src/muxes.c:136: warning: comparison is always false due to limited range of data type
/opt/src/tvheadend_latest/src/muxes.c:137: warning: comparison is always false due to limited range of data type
/opt/src/tvheadend_latest/src/muxes.c:138: warning: comparison is always false due to limited range of data type
/opt/src/tvheadend_latest/src/muxes.c:139: warning: comparison is always false due to limited range of data type
/opt/src/tvheadend_latest/src/muxes.c:140: warning: comparison is always false due to limited range of data type
/opt/src/tvheadend_latest/src/muxes.c: In function '_muxes_load_dvbs':
/opt/src/tvheadend_latest/src/muxes.c:160: warning: comparison is always false due to limited range of data type
/opt/src/tvheadend_latest/src/muxes.c:162: warning: comparison is always false due to limited range of data type
/opt/src/tvheadend_latest/src/muxes.c:163: warning: comparison is always false due to limited range of data type
/opt/src/tvheadend_latest/src/muxes.c: In function '_muxes_load_dvbc':
/opt/src/tvheadend_latest/src/muxes.c:178: warning: comparison is always false due to limited range of data type
/opt/src/tvheadend_latest/src/muxes.c:179: warning: comparison is always false due to limited range of data type
make: *** [build.linux/src/muxes.o] Error 1
if I disable the "werror" compile flag, I get some additional warnings:
/opt/src/tvheadend_latest/src/webui/extjs.c: In function 'extjs_channels_update':
/opt/src/tvheadend_latest/src/webui/extjs.c:346: warning: passing argument 1 of '__strtok_r_1c' discards qualifiers from pointer target type
/opt/src/tvheadend_latest/src/webui/extjs.c: In function 'extjs_channels':
/opt/src/tvheadend_latest/src/webui/extjs.c:345: warning: 'sptr' may be used uninitialized in this function
/opt/src/tvheadend_latest/src/webui/extjs.c:345: note: 'sptr' was declared here
But no errors, so I'm able to compile the source code completely
Updated by Adam Sutton over 12 years ago
Rene,
Sorry I should have updated this issue. I have a github branch which I think covers the first half of your output. But I forgot to do the second bit and haven't had a chance to sort it out yet .
I'll let you know when its done and you can check before I merge.
Ta
Adam
Updated by Rene Herbrich over 12 years ago
Not sure, if it's related to the warnings above, but "make install" exits with this message:
make: *** No rule to make target `build.linux/tvheadend.datadir', needed by `install'. Stop.
Updated by Adam Sutton over 12 years ago
Not strictly related. But well cover it the anyway .
I have changed configure and binary build. Embedded packages need updating . We will fix compile issues first then do the packaging .
Adam
Updated by Rene Herbrich over 12 years ago
Adam Sutton wrote:
Not strictly related. But well cover it the anyway .
I have changed configure and binary build. Embedded packages need updating . We will fix compile issues first then do the packaging .
Adam
Okay, thanks for your help
Updated by Adam Sutton over 12 years ago
Rene,
Do you have the script used to generate the synology package?
Adam
Updated by Rene Herbrich over 12 years ago
Adam Sutton wrote:
Rene,
Do you have the script used to generate the synology package?
Adam
export CC=gcc bash configure \ --host=armle-unknown-linux \ --target=armle-unknown-linux \ --build=i686-pc-linux \ --disable-avahi \ --release \ --openssl=/opt/lib \ --prefix=/opt/tvheadend make make install
These are my steps to compile and install tvheadend on my NAS...
What script do you mean?
Updated by Adam Sutton over 12 years ago
Ah ok, thought you might be building some sort of package and then installing that.
In this case you've picked up new makefile without re running configure. Run configure again then it'll work.
Adam
Updated by Adam Sutton over 12 years ago
Actually might be other way round. Either way make sure you pick up latest master .
Adam
Updated by Rene Herbrich over 12 years ago
Deleted everything, downloaded latest master and ran configure. Did not help.
Updated by Adam Sutton over 12 years ago
Rene,
I'll deal with the install issue in a bit. Can you check this branch for me (on my fork):
https://github.com/adamsutton/tvheadend/tree/issue/redmine-1086
It should fix the compilation problems.
Adam
Updated by Rene Herbrich over 12 years ago
Adam Sutton wrote:
Rene,
I'll deal with the install issue in a bit. Can you check this branch for me (on my fork):
https://github.com/adamsutton/tvheadend/tree/issue/redmine-1086
It should fix the compilation problems.
Adam
Hi Adam,
I'll test your code tomorrow
René
Updated by Rene Herbrich over 12 years ago
Branch redmine-1086 fixes all warnings (/)
The code compiles fine now
Updated by Adam Sutton over 12 years ago
- Status changed from Need feedback to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:5175b2e2fb8c1da80f113f4ccbb8845e2540a102.