Project

General

Profile

Bug #6005

build error alpine linux

Added by Torbjørn Brekke almost 4 years ago. Updated over 3 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2021-02-18
Due date:
% Done:

0%

Estimated time:
Found in version:
Since commit c5d4d7d
Affected Versions:

Description

Since commit c5d4d7d the below error appear when building tvheadend in alpine linux 3.12.
Link to full build log here [[https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-tvheadend/detail/master/339/pipeline]]
Link to Dockerfile with everything getting installed and configure options for tvheadend [[https://github.com/linuxserver/docker-tvheadend/blob/master/Dockerfile]]

Please tell if there is something else needed.

@CC src/input/mpegts/scanfile.o
src/input/mpegts/scanfile.c: In function 'scanfile_create_network':
src/input/mpegts/scanfile.c:367:46: error: '%s' directive output may be truncated writing up to 269 bytes into a region of size between 256 and 262 [-Werror=format-truncation=]
367 | snprintf(buf3, sizeof(buf3), "%c%3i.%i%c:%s", opos < 0 ? '<' : '>', | ^~
368 | abs(opos) / 10, abs(opos) % 10,
369 | opos < 0 ? 'W' :'E', buf); | ~~~
src/input/mpegts/scanfile.c:367:5: note: 'snprintf' output between 9 and 284 bytes into a destination of size 270
367 | snprintf(buf3, sizeof(buf3), "%c%3i.%i%c:%s", opos < 0 ? '<' : '>', | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
368 | abs(opos) / 10, abs(opos) % 10, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
369 | opos < 0 ? 'W' :'E', buf); | ~~~~~~~~~~~~~~~~~~~~~~~
src/input/mpegts/scanfile.c:372:36: error: '%s' directive output may be truncated writing up to 269 bytes into a region of size between 256 and 262 [-Werror=format-truncation=]
372 | snprintf(buf2, sizeof(buf2), "%s_%s", type, buf); | ^~ ~~~
src/input/mpegts/scanfile.c:372:3: note: 'snprintf' output 2 or more bytes (assuming 277) into a destination of size 263
372 | snprintf(buf2, sizeof(buf2), "%s_%s", type, buf); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC src/epggrab/otamux.o
cc1: all warnings being treated as errors
make: * [Makefile:717: /tmp/tvheadend/build.linux/src/input/mpegts/scanfile.o] Error 1
make: *
Waiting for unfinished jobs....
@

History

#1

Updated by Flole Systems almost 4 years ago

  • Status changed from New to Accepted

That part needs rewriting for dynamic memory allocation and it's already on my todo-list. Once that is done this will no longer be an issue and no memory is wasted.

#2

Updated by Flole Systems almost 4 years ago

  • Status changed from Accepted to Need feedback

Should be fixed now

#3

Updated by Torbjørn Brekke over 3 years ago

Thanks, I'll trigger a build.

Is there going to be a lot of active dev being done that will break the builds from now? If it is, then we'll just trigger a build once a week instead of each commit.

#4

Updated by Flole Systems over 3 years ago

Usually there shouldn't be anything that breaks builds as I usually test each commit before pushing it. This issue was because of a newer compiler version used.

There might be more activity than usual during the next few weeks as I am trying to get the next release done but don't expect as many commits as you've seen during the last few days. It will definitely help if you publish builds as soon as possible as that way issues are noticed earlier by users.

#5

Updated by Torbjørn Brekke over 3 years ago

We already built two builds after you pushed the fix, as our containers also detects new OS packages released. So I can confirm it works.

I'll active the build again.

Thanks for your help :)

#6

Updated by Flole Systems over 3 years ago

  • Status changed from Need feedback to Fixed

Great, and sounds like a lot of work for your build server ;)

Also available in: Atom PDF