Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 834423

Summary: sci-visualization/paraview-5.9.1 with ffmpeg-5.0: VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx:111:41: error: invalid conversion from ‘const AVOutputFormat*’ to ‘AVOutputFormat*’ [-fpermissive]
Product: Gentoo Linux Reporter: Kobboi <gentoo>
Component: Current packagesAssignee: Matthias Maier <tamiko>
Status: CONFIRMED ---    
Severity: normal CC: andrewammerlaan
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 831437    
Attachments: build.log.gz
emerge-info.txt

Description Kobboi 2022-02-28 21:49:48 UTC
[3947/12477] /usr/bin/x86_64-pc-linux-gnu-g++ -DIOFFMPEG_EXPORTS -D__STDC_CONSTANT_MACROS -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/IO/FFMPEG -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/FFMPEG -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/IO/Movie -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/Movie -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Common/ExecutionModel -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Common/ExecutionModel -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Common/Core -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Common/Core -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Common/DataModel -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Common/DataModel -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Common/Math -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Common/Math -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Common/Transforms -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Common/Transforms -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/IO/Video -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/Video -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Common/Misc -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Common/Misc -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Common/System -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Common/System -isystem /var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Utilities/KWIML -isystem /var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Utilities/KWIML -isystem /var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Utilities/KWSys -isystem /var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Utilities/KWSys  -O2 -march=znver3 -pipe -g -ggdb3  -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -std=c++11 -MD -MT VTK/IO/FFMPEG/CMakeFiles/IOFFMPEG.dir/vtkFFMPEGWriter.cxx.o -MF VTK/IO/FFMPEG/CMakeFiles/IOFFMPEG.dir/vtkFFMPEGWriter.cxx.o.d -o VTK/IO/FFMPEG/CMakeFiles/IOFFMPEG.dir/vtkFFMPEGWriter.cxx.o -c /var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx
FAILED: VTK/IO/FFMPEG/CMakeFiles/IOFFMPEG.dir/vtkFFMPEGWriter.cxx.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -DIOFFMPEG_EXPORTS -D__STDC_CONSTANT_MACROS -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/IO/FFMPEG -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/FFMPEG -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/IO/Movie -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/Movie -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Common/ExecutionModel -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Common/ExecutionModel -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Common/Core -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Common/Core -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Common/DataModel -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Common/DataModel -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Common/Math -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Common/Math -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Common/Transforms -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Common/Transforms -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/IO/Video -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/Video -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Common/Misc -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Common/Misc -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Common/System -I/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Common/System -isystem /var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Utilities/KWIML -isystem /var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Utilities/KWIML -isystem /var/tmp/portage/sci-visualization/paraview-5.9.1/work/paraview-5.9.1_build/VTK/Utilities/KWSys -isystem /var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/Utilities/KWSys  -O2 -march=znver3 -pipe -g -ggdb3  -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -std=c++11 -MD -MT VTK/IO/FFMPEG/CMakeFiles/IOFFMPEG.dir/vtkFFMPEGWriter.cxx.o -MF VTK/IO/FFMPEG/CMakeFiles/IOFFMPEG.dir/vtkFFMPEGWriter.cxx.o.d -o VTK/IO/FFMPEG/CMakeFiles/IOFFMPEG.dir/vtkFFMPEGWriter.cxx.o -c /var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx
/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx: In member function ‘int vtkFFMPEGWriterInternal::Start()’:
/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx:111:41: error: invalid conversion from ‘const AVOutputFormat*’ to ‘AVOutputFormat*’ [-fpermissive]
  111 |   this->avOutputFormat = av_guess_format("avi", nullptr, nullptr);
      |                          ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                         |
      |                                         const AVOutputFormat*
/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx:137:37: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
  137 |   if (!(codec = avcodec_find_encoder(this->avOutputFormat->video_codec)))
      |                 ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                     |
      |                                     const AVCodec*
/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx:152:32: error: ‘avcodec_alloc_context3’ was not declared in this scope; did you mean ‘avio_alloc_context’?
  152 |   if (!(this->avCodecContext = avcodec_alloc_context3(codec)))
      |                                ^~~~~~~~~~~~~~~~~~~~~~
      |                                avio_alloc_context
/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx:195:3: error: ‘avcodec_parameters_to_context’ was not declared in this scope; did you mean ‘avcodec_parameters_copy’?
  195 |   avcodec_parameters_to_context(this->avCodecContext, this->avStream->codecpar);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |   avcodec_parameters_copy
/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx:196:23: error: invalid use of incomplete type ‘struct AVCodecContext’
  196 |   this->avCodecContext->time_base.den = this->FrameRate;
      |                       ^~
In file included from /usr/include/libavformat/avformat.h:313,
                 from /var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx:24:
/usr/include/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
  195 | struct AVCodecContext;
      |        ^~~~~~~~~~~~~~
/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx:197:23: error: invalid use of incomplete type ‘struct AVCodecContext’
  197 |   this->avCodecContext->time_base.num = 1;
      |                       ^~
In file included from /usr/include/libavformat/avformat.h:313,
                 from /var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx:24:
/usr/include/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
  195 | struct AVCodecContext;
      |        ^~~~~~~~~~~~~~
/var/tmp/portage/sci-visualization/paraview-5.9.1/work/ParaView-v5.9.1/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx:200:23: error: invalid use of incomplete type ‘struct AVCodecContext’
  200 |   this->avCodecContext->gop_size = this->FrameRate;
      |                       ^~


Reproducible: Always
Comment 1 Kobboi 2022-02-28 21:50:15 UTC
Created attachment 766101 [details]
build.log.gz
Comment 2 Kobboi 2022-02-28 21:50:17 UTC
Created attachment 766102 [details]
emerge-info.txt
Comment 3 Kobboi 2022-02-28 22:07:43 UTC
Compiles fine with:
* USE=ffmpeg and ffmpeg-4.4.1
* USE=-ffmpeg and ffmpeg-5.0
Comment 4 Andrew Ammerlaan gentoo-dev 2022-10-18 13:54:58 UTC
Does this still happen with the latest version?