Project

General

Profile

Bug #2708

v3.9.2524 doesn't compile under Debian Jessie

Added by Alfred Zastrow almost 5 years ago. Updated almost 5 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-03-09
Due date:
% Done:

100%

Estimated time:
Found in version:
v3.9.2524
Affected Versions:

Description

CC src/avahi.o
CC src/libav.o
CC src/muxer/muxer_libav.o
CC src/plumbing/transcoding.o
src/plumbing/transcoding.c: In function ‘transcoder_stream_video’:
src/plumbing/transcoding.c:1035:13: error: ‘AVCodecContext’ has no member named ‘framerate’
if (ictx->framerate.num != 0 && ictx->framerate.den != 0) {
^
src/plumbing/transcoding.c:1035:41: error: ‘AVCodecContext’ has no member named ‘framerate’
if (ictx->framerate.num != 0 && ictx->framerate.den != 0) {
^
src/plumbing/transcoding.c:1036:51: error: ‘AVCodecContext’ has no member named ‘framerate’
octx->time_base = av_inv_q(av_mul_q(ictx->framerate, av_make_q(ictx->ticks_per_frame, 1)));
^
src/plumbing/transcoding.c:1036:7: error: implicit declaration of function ‘av_make_q’ [-Werror=implicit-function-declaration]
octx->time_base = av_inv_q(av_mul_q(ictx->framerate, av_make_q(ictx->ticks_per_frame, 1)));
^
src/plumbing/transcoding.c:1036:38: error: incompatible type for argument 2 of ‘av_mul_q’
octx->time_base = av_inv_q(av_mul_q(ictx->framerate, av_make_q(ictx->ticks_per_frame, 1)));
^
In file included from /usr/include/libavutil/avutil.h:276:0,
from /usr/include/libavutil/samplefmt.h:24,
from /usr/include/libavcodec/avcodec.h:31,
from /usr/include/libavformat/avformat.h:255,
from src/plumbing/transcoding.c:20:
/usr/include/libavutil/rational.h:91:12: note: expected ‘AVRational’ but argument is of type ‘int’
AVRational av_mul_q(AVRational b, AVRational c) av_const;
^
cc1: all warnings being treated as errors
Makefile:414: recipe for target '/root/tvheadend/build.linux/src/plumbing/transcoding.o' failed
make2: * [/root/tvheadend/build.linux/src/plumbing/transcoding.o] Error 1
make2: Leaving directory '/root/tvheadend'
debian/rules:11: recipe for target 'override_dh_auto_build' failed
make1:
[override_dh_auto_build] Error 2
make1: Leaving directory '/root/tvheadend'
debian/rules:5: recipe for target 'build' failed
make: *
* [build] Error 2
dpkg-buildpackage: Fehler: Fehler-Exitstatus von debian/rules build war 2


Files

Associated revisions

Revision 96898a66 (diff)
Added by S. Benz almost 5 years ago

transcoding: fix compile error when using libav, fixes #2708

AVCodecContext.framerate and av_make_q() are only available since ffmpeg 2.5 and not available in libav

History

#2

Updated by Piotr Kuchciak almost 5 years ago

I also have a problem with compile:

CC src/libav.o
CC src/muxer/muxer_libav.o
CC src/plumbing/transcoding.o
src/plumbing/transcoding.c: In function ‘transcoder_stream_video’:
src/plumbing/transcoding.c:1035:13: error: ‘AVCodecContext’ has no member named ‘framerate’
src/plumbing/transcoding.c:1035:41: error: ‘AVCodecContext’ has no member named ‘framerate’
src/plumbing/transcoding.c:1036:47: error: ‘AVCodecContext’ has no member named ‘framerate’
src/plumbing/transcoding.c:1036:7: error: implicit declaration of function ‘av_make_q’ [-Werror=implicit-function-declaration]
src/plumbing/transcoding.c:1036:7: error: incompatible type for argument 2 of ‘av_mul_q’
In file included from /usr/include/libavutil/frame.h:34:0,
from /usr/include/libavcodec/avcodec.h:37,
from /usr/include/libavformat/avformat.h:255,
from src/plumbing/transcoding.c:20:
/usr/include/libavutil/rational.h:91:12: note: expected ‘AVRational’ but argument is of type ‘int’
cc1: all warnings being treated as errors
make: *** [/home/hts/tvheadend/build.linux/src/plumbing/transcoding.o] Błąd 1

#3

Updated by S. Benz almost 5 years ago

Yeah, that was my fault. Will provide a fix later today.

#4

Updated by S. Benz almost 5 years ago

The problem is that AVCodecContext.framerate and av_make_q() are only available since ffmpeg 2.5 (which is used with --enable-libffmpeg_static).

Can you test with this patch? libav is too old on my distribution, so I'd have to build libav myself before I could test this...

#5

Updated by Prof Yaffle almost 5 years ago

FWIW, I just applied this patch to 3.9.2524~gbd06d3c and successfully compiled against ffmpeg-2.4.2. Build only, I haven't tested runtime.

Similarly, simply removing the existing version of ffmpeg I had downloaded and using --enable-libffmpeg_static triggered a new download/build of ffmpeg 2.5.2. I can build successfully against that with or without this patch.

#6

Updated by Prof Yaffle almost 5 years ago

Probably worth noting that this was on Ubuntu 14.04, kernel 3.13.0-45-generic, using this build instruction:

AUTOBUILD_CONFIGURE_EXTRA="--enable-trace --enable-libffmpeg_static" ./Autobuild.sh -t precise-amd64
#7

Updated by Rafal Kupiec almost 5 years ago

Source configured.
Compiling source in /var/tmp/portage/media-tv/tvheadend-9999/work/tvheadend-9999 ...

make j20 -s CC=x86_64-pc-linux-gnu-gcc
Receiving data/dvb-scan/dvb-t from http://linuxtv.org/git/dtv-scan-tables.git
src/plumbing/transcoding.c: In function 'transcoder_stream_video':
src/plumbing/transcoding.c:1035:13: error: 'AVCodecContext' has no member named 'framerate'
if (ictx
>framerate.num != 0 && ictx->framerate.den != 0) {
^
src/plumbing/transcoding.c:1035:41: error: 'AVCodecContext' has no member named 'framerate'
if (ictx->framerate.num != 0 && ictx->framerate.den != 0) {
^
src/plumbing/transcoding.c:1036:51: error: 'AVCodecContext' has no member named 'framerate'
octx->time_base = av_inv_q(av_mul_q(ictx->framerate, av_make_q(ictx->ticks_per_frame, 1)));
^
src/plumbing/transcoding.c:1036:7: warning: implicit declaration of function 'av_make_q' [-Wimplicit-function-declaration]
octx->time_base = av_inv_q(av_mul_q(ictx->framerate, av_make_q(ictx->ticks_per_frame, 1)));
^
src/plumbing/transcoding.c:1036:38: error: incompatible type for argument 2 of 'av_mul_q'
octx->time_base = av_inv_q(av_mul_q(ictx->framerate, av_make_q(ictx->ticks_per_frame, 1)));
^
In file included from /usr/include/libavutil/avutil.h:276:0,
from /usr/include/libavutil/samplefmt.h:24,
from /usr/include/libavcodec/avcodec.h:31,
from /usr/include/libavformat/avformat.h:255,
from src/plumbing/transcoding.c:20:
/usr/include/libavutil/rational.h:91:12: note: expected 'AVRational' but argument is of type 'int'
AVRational av_mul_q(AVRational b, AVRational c) av_const;
^
Makefile:414: recipe for target '/var/tmp/portage/media-tv/tvheadend-9999/work/tvheadend-9999/build.linux/src/plumbing/transcoding.o' failed
make: * [/var/tmp/portage/media-tv/tvheadend-9999/work/tvheadend-9999/build.linux/src/plumbing/transcoding.o] Error 1
make: *
Waiting for unfinished jobs.... * ERROR: media-tv/tvheadend-9999::eris-overlay failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=media-tv/tvheadend-9999::eris-overlay'`, * the complete build log and the output of `emerge -pqv '=media-tv/tvheadend-9999::eris-overlay'`. * The complete build log is located at '/var/log/portage/media-tv:tvheadend-9999:20150310-170202.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/media-tv/tvheadend-9999/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/media-tv/tvheadend-9999/temp/environment'. * Working directory: '/var/tmp/portage/media-tv/tvheadend-9999/work/tvheadend-9999' * S: '/var/tmp/portage/media-tv/tvheadend-9999/work/tvheadend-9999'

Failed to emerge media-tv/tvheadend-9999, Log file:

'/var/log/portage/media-tv:tvheadend-9999:20150310-170202.log'

  • Messages for package media-tv/tvheadend-9999:
  • ERROR: media-tv/tvheadend-9999::eris-overlay failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=media-tv/tvheadend-9999::eris-overlay'`, * the complete build log and the output of `emerge -pqv '=media-tv/tvheadend-9999::eris-overlay'`. * The complete build log is located at '/var/log/portage/media-tv:tvheadend-9999:20150310-170202.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/media-tv/tvheadend-9999/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/media-tv/tvheadend-9999/temp/environment'. * Working directory: '/var/tmp/portage/media-tv/tvheadend-9999/work/tvheadend-9999' * S: '/var/tmp/portage/media-tv/tvheadend-9999/work/tvheadend-9999'
#8

Updated by Alfred Zastrow almost 5 years ago

Hi,

with this patch it is comiling fine just by using Autobuild.sh without any arguments. Thanks.
This is the environiment of my pretty clean Debian Jessie:

Checking support/features
checking for cc execinfo.h ... ok
checking for cc -mmmx ... ok
checking for cc -msse2 ... ok
checking for cc getloadavg ... ok
checking for cc atomic64 ... ok
checking for cc lockowner ... ok
checking for cc qsort_r ... ok
checking for cc recvmmsg ... ok
checking for cc libiconv ... fail
checking for py module gzip ... ok
checking for bzip2 ... ok
checking for pkg openssl ... ok (detected 1.0.1k)
checking for cc linux/dvb/version.h ... ok
checking for cc libhdhomerun/hdhomerun.h ... fail
checking for pkg zlib ... ok (detected 1.2.8)
checking for pkg liburiparser ... ok (detected 0.8.0.1)
checking for pkg avahi-client ... ok (detected 0.6.31)
checking for ffmpeg libraries ... fail
checking for pkg libavcodec >=55.34.1 ... ok (detected 56.1.0)
checking for pkg libavutil >=53.3.0 ... ok (detected 54.3.0)
checking for pkg libavformat >=55.12.0 ... ok (detected 56.1.0)
checking for pkg libswscale >=2.1.2 ... ok (detected 3.0.0)
checking for pkg libavresample >=1.1.0 ... ok (detected 2.1.0)
checking for cc sys/inotify.h ... ok
fetching dvb-scan files ... ok
checking for pkg dbus-1 ... ok (detected 1.8.16)

#9

Updated by S. Benz almost 5 years ago

Thank you for testing, Prof Yaffle and Alfred.

I created a pull request with the patch here: https://github.com/tvheadend/tvheadend/pull/605

#10

Updated by S. Benz almost 5 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Also available in: Atom PDF