Project

General

Profile

Bug #5745

Error while compiling latest version under Debian testing

Added by Stefan Dietzel about 5 years ago. Updated over 4 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-10-16
Due date:
% Done:

0%

Estimated time:
Found in version:
v4.3.1830
Affected Versions:

Description

I am trying to compile actual version from git but I get the following error during compilation:

In file included from /root/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/include/libavutil/common.h:488,
                 from /root/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/include/libavutil/avutil.h:296,
                 from /root/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/include/libavutil/samplefmt.h:24,
                 from /root/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/include/libavcodec/avcodec.h:31,
                 from /root/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/include/libavformat/avformat.h:319,
                 from src/libav.h:26,
                 from src/tvhlog.c:35:
/root/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/include/libavutil/mem.h:342:1: error: ‘alloc_size’ attribute ignored on a function returning ‘int’ [-Werror=attributes]
  342 | av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
      | ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:717: /root/src/tvheadend/build.linux/src/tvhlog.o] Fehler 1
make: *** Es wird auf noch nicht beendete Prozesse gewartet....
In file included from /root/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/include/libavutil/common.h:488,
                 from /root/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/include/libavutil/avutil.h:296,
                 from /root/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/include/libavutil/samplefmt.h:24,
                 from /root/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/include/libavcodec/avcodec.h:31,
                 from /root/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/include/libavformat/avformat.h:319,
                 from src/libav.h:26,
                 from src/main.c:70:
/root/src/tvheadend/build.linux/ffmpeg/build/ffmpeg/include/libavutil/mem.h:342:1: error: ‘alloc_size’ attribute ignored on a function returning ‘int’ [-Werror=attributes]
  342 | av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
      | ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:716: /root/src/tvheadend/build.linux/src/main.o] Fehler 1

I am using Debian Testing (Debian GNU/Linux bullseye/sid) and use gcc version 9.2.1 20190909 (Debian 9.2.1-8).

Compilation is done with the following commands:

./configure --enable-vaapi
make -j 4

Latest version which can be compiled is: tvheadend_4.3-1804~gebb096804.

History

#1

Updated by Stefan Dietzel about 5 years ago

Update:

When I use the following commands (nonstatic compilation) compilation works:

./configure --disable-hdhomerun_client --disable-hdhomerun_static --disable-ffmpeg_static --disable-libffmpeg_static --enable-libx264 --enable-libx265 --enable-vaapi --enable-libfdkaac --disable-libx264_static --disable-libx265_static --disable-libfdkaac_static --disable-libvorbis_static --disable-libtheora_static --disable-libvpx_static --disable-libopus_static

make -j 4
#2

Updated by saen acro about 5 years ago

make distclean

then
https://tvheadend.org/boards/4/topics/24116#Automated-build-script

post build log witch script generate

#3

Updated by Stefan Dietzel about 5 years ago

make distclean is not really relevant because I deletet the whole project and downloaded it newly from github.

But someone else postet this problem also in TVH ticket system and found a solution (https://tvheadend.org/issues/5726).

This is a problem of ffmpeg and there is a patch available at

https://patchwork.ffmpeg.org/patch/11148/
Direct Patch download: https://patchwork.ffmpeg.org/patch/11148/raw/

I think this patch is needed to be included in the tvheadend project and the compilation scripts.

#4

Updated by Stefan Dietzel about 5 years ago

I have applied this patch manually and now compilation also works static.
I applied the patch to build.linux/ffmpeg/build/ffmpeg/include/libavutil/mem.h and changed line 342

from

av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);

to

int av_reallocp_array(void *ptr, size_t nmemb, size_t size);

That does the job very well.

#5

Updated by Flole Systems over 4 years ago

  • Status changed from New to Fixed

Also available in: Atom PDF