Bug 227745 - www/iridium, www/qt5-webengine: fails to build with ffmpeg 4.0
Summary: www/iridium, www/qt5-webengine: fails to build with ffmpeg 4.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: kde
URL:
Keywords: patch, patch-ready
Depends on:
Blocks: 227726
  Show dependency treegraph
 
Reported: 2018-04-24 14:13 UTC by Jan Beich
Modified: 2018-04-30 15:35 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (kde)
jbeich: maintainer-feedback? (chromium)


Attachments
Add arch linuxes patch to qt5-webengine. (5.08 KB, patch)
2018-04-26 04:52 UTC, Tobias C. Berner
no flags Details | Diff
iridium-ffmpeg4 (3.08 KB, patch)
2018-04-28 14:31 UTC, Carlos J. Puga Medina
cpm: maintainer-approval+
Details | Diff
iridium-ffmpeg4 (6.55 KB, patch)
2018-04-28 15:52 UTC, Carlos J. Puga Medina
cpm: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2018-04-24 14:13:34 UTC
After bug 227427 lands this port will end up BROKEN. Can you help?

$ fetch -qo- 'https://reviews.freebsd.org/D15175?download=true' | patch -Efsp0 -d /usr/ports
$ make all deinstall install clean -C/usr/ports/multimedia/ffmpeg
$ make -C/usr/ports/www/qt5-webengine
[...]
../../../../qtwebengine-opensource-src-5.9.4/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc:56:35: error: use of undeclared identifier 'CODEC_CAP_DR1'
  DCHECK(s->codec->capabilities & CODEC_CAP_DR1);
                                  ^
../../../../qtwebengine-opensource-src-5.9.4/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc:418:28: error: use of undeclared identifier 'CODEC_FLAG_EMU_EDGE'
  codec_context_->flags |= CODEC_FLAG_EMU_EDGE;
                           ^
../../../../qtwebengine-opensource-src-5.9.4/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc:423:31: error: use of undeclared identifier 'CODEC_FLAG2_CHUNKS'
    codec_context_->flags2 |= CODEC_FLAG2_CHUNKS;
                              ^
../../../../qtwebengine-opensource-src-5.9.4/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc:36:46: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE'
static_assert(DecoderBuffer::kPaddingSize >= FF_INPUT_BUFFER_PADDING_SIZE,
                                             ^
../../../../qtwebengine-opensource-src-5.9.4/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc:432:48: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE'
        av_malloc(config.extra_data().size() + FF_INPUT_BUFFER_PADDING_SIZE));
                                               ^
../../../../qtwebengine-opensource-src-5.9.4/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc:436:12: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE'
           FF_INPUT_BUFFER_PADDING_SIZE);
           ^
../../../../qtwebengine-opensource-src-5.9.4/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc:564:48: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE'
        av_malloc(config.extra_data().size() + FF_INPUT_BUFFER_PADDING_SIZE));
                                               ^
../../../../qtwebengine-opensource-src-5.9.4/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc:568:12: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE'
           FF_INPUT_BUFFER_PADDING_SIZE);
           ^

build log: https://ptpb.pw/02h_
Comment 1 Jan Beich freebsd_committer 2018-04-24 14:16:01 UTC
(In reply to Jan Beich from comment #0)
> After bug 227427...

Err, bug 227726 of course.
Comment 2 Jan Beich freebsd_committer 2018-04-24 15:18:00 UTC
Chromium 64 has the fix, so both Qt WebEngine 5.9.4 (based on Chromium 56.0.2924.122) and Iridium 58.0 (based on Chromium 58.0.3029.81) are affected.

$ make -C/usr/ports/www/iridium
[...]
../../media/filters/ffmpeg_audio_decoder.cc:56:35: error: use of undeclared identifier 'CODEC_CAP_DR1'
  DCHECK(s->codec->capabilities & CODEC_CAP_DR1);
../../media/filters/ffmpeg_video_decoder.cc:420:28: error: use of undeclared identifier 'CODEC_FLAG_EMU_EDGE'
  codec_context_->flags |= CODEC_FLAG_EMU_EDGE;
                           ^
../../media/filters/ffmpeg_video_decoder.cc:425:31: error: use of undeclared identifier 'CODEC_FLAG2_CHUNKS'
    codec_context_->flags2 |= CODEC_FLAG2_CHUNKS;
                              ^

build log: https://ptpb.pw/9QsF
Comment 4 Jan Beich freebsd_committer 2018-04-25 17:10:51 UTC
Ah, iridium patch is already applied and unrelated to ffmpeg 4.0.
Comment 5 Tobias C. Berner freebsd_committer 2018-04-26 04:52:47 UTC
Created attachment 192822 [details]
Add arch linuxes patch to qt5-webengine.

Hi Jan

Can you try with the attached patch?


mfg Tobias
Comment 6 Jan Beich freebsd_committer 2018-04-26 07:20:26 UTC
Comment on attachment 192822 [details]
Add arch linuxes patch to qt5-webengine.

I confirm, www/qt5-webengine builds fine against ffmpeg-4.0,1 with this patch.
Build log: https://ptpb.pw/PTK3
Comment 7 commit-hook freebsd_committer 2018-04-27 05:09:57 UTC
A commit references this bug:

Author: tcberner
Date: Fri Apr 27 05:09:11 UTC 2018
New revision: 468397
URL: https://svnweb.freebsd.org/changeset/ports/468397

Log:
  www/qt5-webengine: prepare for ffmpeg4

  Add patch obtained from Arch Linux:
  https://git.archlinux.org/svntogit/packages.git/tree/trunk/qtwebengine-ffmpeg4.patch?h=packages/qt5-webengine&id=421103a8798335f7788498e56b5eef3f33ecba26

  PR:		227745
  Reported by:	jbeich

Changes:
  head/www/qt5-webengine/Makefile
  head/www/qt5-webengine/files/patch-archgit_qtwebengine-ffmpeg4
Comment 8 Carlos J. Puga Medina freebsd_committer 2018-04-28 14:31:24 UTC
Created attachment 192874 [details]
iridium-ffmpeg4
Comment 9 Jan Beich freebsd_committer 2018-04-28 15:10:50 UTC
Comment on attachment 192874 [details]
iridium-ffmpeg4

Still fails: https://ptpb.pw/SWma

../../media/ffmpeg/ffmpeg_common.cc:36:46: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE'
static_assert(DecoderBuffer::kPaddingSize >= FF_INPUT_BUFFER_PADDING_SIZE,
                                             ^
../../media/ffmpeg/ffmpeg_common.cc:432:48: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE'
        av_malloc(config.extra_data().size() + FF_INPUT_BUFFER_PADDING_SIZE));
                                               ^
../../media/ffmpeg/ffmpeg_common.cc:436:12: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE'
           FF_INPUT_BUFFER_PADDING_SIZE);
           ^
../../media/ffmpeg/ffmpeg_common.cc:564:48: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE'
        av_malloc(config.extra_data().size() + FF_INPUT_BUFFER_PADDING_SIZE));
                                               ^
../../media/ffmpeg/ffmpeg_common.cc:568:12: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE'
           FF_INPUT_BUFFER_PADDING_SIZE);
           ^
Comment 10 Carlos J. Puga Medina freebsd_committer 2018-04-28 15:52:56 UTC
Created attachment 192878 [details]
iridium-ffmpeg4

Add missing patches.
Comment 11 Jan Beich freebsd_committer 2018-04-28 18:29:56 UTC
Comment on attachment 192878 [details]
iridium-ffmpeg4

iridium builds fine against ffmpeg 4.0 now. Tested together with bug 227683.
Build log: https://ptpb.pw/NI-p
Comment 12 commit-hook freebsd_committer 2018-04-30 15:34:27 UTC
A commit references this bug:

Author: cpm
Date: Mon Apr 30 15:34:23 UTC 2018
New revision: 468704
URL: https://svnweb.freebsd.org/changeset/ports/468704

Log:
  www/iridium: unbreak with ffmpeg 4.0

  PR:		227745
  Reported by:	jbeich

Changes:
  head/www/iridium/Makefile
  head/www/iridium/files/patch-media_base_decoder__buffer.h
  head/www/iridium/files/patch-media_ffmpeg_ffmpeg__common.cc
  head/www/iridium/files/patch-media_filters_ffmpeg__audio__decodec.cc
  head/www/iridium/files/patch-media_filters_ffmpeg__video__decodec.cc