Bug #1031

Make exits with error

Added by Rene Herbrich 12 months ago. Updated 10 months ago.

Status:FixedStart date:06/09/2012
Priority:HighDue date:
Assignee:Rene Herbrich% Done:

0%

Category:non-x86
Target version:-
Found in version:8f9ac9040e Affected Versions:

Description

cc1: warnings being treated as errors
/opt/src/tvheadend/src/dvb/dvb_support.c: In function 'encode_utf8':
/opt/src/tvheadend/src/dvb/dvb_support.c:53: warning: comparison is always true due to limited range of data type
/opt/src/tvheadend/src/dvb/dvb_support.c:58: warning: comparison is always true due to limited range of data type
make: *** [build.linux/src/dvb/dvb_support.o] Error 1

I'm using a Synology NAS with a Marvell Kirkwood mv6281 CPU (it's cpu related, isn't it?)

synology.patch Magnifier (777 Bytes) Rene Herbrich, 06/10/2012 01:15 pm

History

#1 Updated by Rene Herbrich 12 months ago

static inline int encode_utf8(uint16_t c, char *outb, int outleft)
{
  if (c <= 0x7F && outleft >= 1) {
    *outb = c;
    return 1;
  } else if (c <= 0x7FF && outleft >=2) {
    *outb++ = ((c >>  6) & 0x1F) | 0xC0;
    *outb++ = ( c        & 0x3F) | 0x80;
    return 2;
  } else if (c <= 0xFFFF && outleft >= 3) {     <== Line 53
    *outb++ = ((c >> 12) & 0x0F) | 0xE0;
    *outb++ = ((c >>  6) & 0x3F) | 0x80;
    *outb++ = ( c        & 0x3F) | 0x80;
    return 3;
  } else if (c <= 0x10FFFF && outleft >= 4) {   <== Line 58
    *outb++ = ((c >> 18) & 0x07) | 0xF0;
    *outb++ = ((c >> 12) & 0x3F) | 0x80;
    *outb++ = ((c >>  6) & 0x3F) | 0x80;
    *outb++ = ( c        & 0x3F) | 0x80;
    return 4;
  } else {
    return -1;
  }
}

#2 Updated by Rene Herbrich 12 months ago

ok, I disabled the "werror" compiler flag, but there's another error:

CC build.linux/src/dvb/dvb_preconf.o
/opt/src/tvheadend/src/dvb/dvb_preconf.c: In function 'dvb_mux_preconf_add':
/opt/src/tvheadend/src/dvb/dvb_preconf.c:67: error: 'struct dvb_mux_conf' has no member named 'dmc_fe_delsys'
/opt/src/tvheadend/src/dvb/dvb_preconf.c:67: error: 'SYS_DVBS' undeclared (first use in this function)
/opt/src/tvheadend/src/dvb/dvb_preconf.c:67: error: (Each undeclared identifier is reported only once
/opt/src/tvheadend/src/dvb/dvb_preconf.c:67: error: for each function it appears in.)
make: *** [build.linux/src/dvb/dvb_preconf.o] Error 1

that commit is breaking the code: https://github.com/andoma/tvheadend/commit/4ca5dda14a0e4fc7a78886e7a73058be96e3dad2

if I revert that commit, the code is compiling fine (except the warnings above)

#3 Updated by Hein Rigolo 12 months ago

  • Category changed from DVB to non-x86

the first warning is related (if I am correct) to a change that is done to remove the dependency on iconv/gconv. But it might be that it does not work correctly on your architecture/cpu.

The second part is related to a change in the kernel dvb modules. If you get this error then I suspect you have an old kernel (which version?)

Hein

#4 Updated by Rene Herbrich 12 months ago

It's 2.6.32.6
Not the newest, I know. But I'm using the latest firmware by Synology.
Is there anything you can do about that?
Maybe a switch for older kernel versions?

Are there any consequences, if I ignore the warnings?

#5 Updated by Hein Rigolo 12 months ago

there has been a commit (7d31b784) this morning that could solve your first compile warning. Can you check to see it that first warning is now gone?

If we need to add switches to the code for all variations and kernels then it becomes unreadable. So I would suggest that you maintain a set of patches that needs to be applied to the main branch in order to compile tvheadend on your specific hardware. And I would suggest to maintain them on github so that other people can also see/use them.

Hein

#6 Updated by Rene Herbrich 12 months ago

yes, that commit helped - thanks!

Sure... But ehm, sorry for the stupid question: where do I have to put patch here: https://github.com/andoma/tvheadend?

#7 Updated by Rene Herbrich 12 months ago

Here's the patch for Synology NAS with Marvell Kirkwood mv6281/mv6282 CPU

#8 Updated by Hein Rigolo 12 months ago

  • Status changed from New to Fixed

just create your own github account, clone the main tvheadend source and the add your patch

#9 Updated by Andreas Öman 12 months ago

  • Status changed from Fixed to Need feedback

Rene: Can you attach /usr/include/linux/dvb/version.h from your system so I can look at that?

#10 Updated by Andreas Öman 12 months ago

  • Assignee changed from Hein Rigolo to Rene Herbrich

#11 Updated by Rene Herbrich 12 months ago

Not that much:

#ifndef _DVBVERSION_H_
#define _DVBVERSION_H_

#define DVB_API_VERSION 3
#define DVB_API_VERSION_MINOR 2

#endif /*_DVBVERSION_H_*/

#12 Updated by Adam Sutton 10 months ago

  • Status changed from Need feedback to Fixed

I think this should be fixed now, with mod to latest source.

Rene, if its still a problem give me a shout.

Also available in: Atom PDF