Project

General

Profile

Bug #1086

Compiler issues for Synology NAS

Added by Adam Sutton over 9 years ago. Updated over 9 years ago.

Status:
Fixed
Priority:
High
Assignee:
Category:
General
Target version:
-
Start date:
2012-08-06
Due date:
% Done:

100%

Estimated time:
Found in version:
9cf3b81fb988d2aa0b39a3c236dcc8b68a2a2f27
Affected Versions:

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.

Associated revisions

Revision 5175b2e2 (diff)
Added by Adam Sutton over 9 years ago

Fix some possible compile problems. Found with more strict gcc variants. Fixes #1086.

History

#1

Updated by Adam Sutton over 9 years ago

  • Status changed from Accepted to Need feedback
#2

Updated by Rene Herbrich over 9 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

#3

Updated by Adam Sutton over 9 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

#4

Updated by Rene Herbrich over 9 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.

#5

Updated by Adam Sutton over 9 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

#6

Updated by Rene Herbrich over 9 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 :)

#7

Updated by Adam Sutton over 9 years ago

Rene,

Do you have the script used to generate the synology package?

Adam

#8

Updated by Rene Herbrich over 9 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?

#9

Updated by Adam Sutton over 9 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

#10

Updated by Adam Sutton over 9 years ago

Actually might be other way round. Either way make sure you pick up latest master .

Adam

#11

Updated by Rene Herbrich over 9 years ago

Deleted everything, downloaded latest master and ran configure. Did not help.

#12

Updated by Adam Sutton over 9 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

#13

Updated by Rene Herbrich over 9 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é

#14

Updated by Rene Herbrich over 9 years ago

Branch redmine-1086 fixes all warnings (/)
The code compiles fine now :)

#15

Updated by Adam Sutton over 9 years ago

  • Status changed from Need feedback to Fixed
  • % Done changed from 0 to 100

Also available in: Atom PDF