Project

General

Profile

Emulator Issues #12706

Compilation error due to const AVOutputFormat* (FFmpeg)

Added by salvalie 10 days ago. Updated 4 days ago.

Status:
New
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Current
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
Yes
Regression start:
Fixed in:

Description

HI!
I got this output trying to compile master:
salva@salva-desktop:~/Desktop/dolphin/build$ make -j4
[ 0%] Built target cpp-optparse
[ 0%] Built target imgui
[ 1%] Built target enet
[ 4%] Built target glslang
[ 4%] Built target xxhash
[ 4%] Built target minizip
[ 7%] Built target zstd
[ 13%] Built target lzma
[ 13%] Built target FreeSurround
[ 15%] Built target SoundTouch
[ 15%] Built target fmt
[ 21%] Built target mbedcrypto
[ 21%] Built target speex
[ 21%] Built target unittests_stubhost
[ 21%] Built target discord-rpc
[ 22%] Built target mbedx509
[ 23%] Built target cubeb
[ 23%] Built target mgba-version-info
[ 24%] Built target mbedtls
[ 29%] Built target common
[ 41%] Built target mgba
[ 41%] Built target traversal_server
[ 42%] Built target audiocommon
[ 45%] Built target discio
[ 48%] Built target inputcommon
[ 50%] Built target uicommon
[ 51%] Built target videovulkan
[ 53%] Built target videosoftware
[ 53%] Built target videonull
[ 54%] Built target videoogl
[ 54%] Building CXX object Source/Core/VideoCommon/CMakeFiles/videocommon.dir/FrameDump.cpp.o
/home/salva/Desktop/dolphin/Source/Core/VideoCommon/FrameDump.cpp: In member function ‘bool FrameDump::CreateVideoFile()’:
/home/salva/Desktop/dolphin/Source/Core/VideoCommon/FrameDump.cpp:156:56: error: invalid conversion from ‘const AVOutputFormat*’ to ‘AVOutputFormat*’ [-fpermissive]
156 | AVOutputFormat* const output_format = av_guess_format(format.c_str(), dump_path.c_str(), nullptr);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| const AVOutputFormat*
/home/salva/Desktop/dolphin/Source/Core/VideoCommon/FrameDump.cpp: In member function ‘void FrameDump::ProcessPackets()’:
/home/salva/Desktop/dolphin/Source/Core/VideoCommon/FrameDump.cpp:339:24: warning: ‘void av_init_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
339 | av_init_packet(&pkt);
| ^
In file included from /usr/local/include/libavcodec/avcodec.h:45,
from /home/salva/Desktop/dolphin/Source/Core/VideoCommon/FrameDump.cpp:17:
/usr/local/include/libavcodec/packet.h:503:6: note: declared here
503 | void av_init_packet(AVPacket pkt);
| ~~~~~~~~~~~~~
make[2]: *
* [Source/Core/VideoCommon/CMakeFiles/videocommon.dir/build.make:901: Source/Core/VideoCommon/CMakeFiles/videocommon.dir/FrameDump.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1958: Source/Core/VideoCommon/CMakeFiles/videocommon.dir/all] Error 2
make: *** [Makefile:171: all] Error 2

History

#1 Updated by JosJuice 9 days ago

  • Relates to maintainability set to No
  • Easy set to No
  • Relates to performance set to No
  • Relates to usability set to No
  • Regression set to No
  • Issue type set to Bug
  • Project changed from Infrastructure to Emulator
  • Tracker changed from Issue to Emulator Issues
  • Operating system N/A added

#2 Updated by rien334 4 days ago

salvalie wrote:

HI!
I got this output trying to compile master:
salva@salva-desktop:~/Desktop/dolphin/build$ make -j4
[ 0%] Built target cpp-optparse
[ 0%] Built target imgui
[ 1%] Built target enet
[ 4%] Built target glslang
[ 4%] Built target xxhash
[ 4%] Built target minizip
[ 7%] Built target zstd
[ 13%] Built target lzma
[ 13%] Built target FreeSurround
[ 15%] Built target SoundTouch
[ 15%] Built target fmt
[ 21%] Built target mbedcrypto
[ 21%] Built target speex
[ 21%] Built target unittests_stubhost
[ 21%] Built target discord-rpc
[ 22%] Built target mbedx509
[ 23%] Built target cubeb
[ 23%] Built target mgba-version-info
[ 24%] Built target mbedtls
[ 29%] Built target common
[ 41%] Built target mgba
[ 41%] Built target traversal_server
[ 42%] Built target audiocommon
[ 45%] Built target discio
[ 48%] Built target inputcommon
[ 50%] Built target uicommon
[ 51%] Built target videovulkan
[ 53%] Built target videosoftware
[ 53%] Built target videonull
[ 54%] Built target videoogl
[ 54%] Building CXX object Source/Core/VideoCommon/CMakeFiles/videocommon.dir/FrameDump.cpp.o
/home/salva/Desktop/dolphin/Source/Core/VideoCommon/FrameDump.cpp: In member function ‘bool FrameDump::CreateVideoFile()’:
/home/salva/Desktop/dolphin/Source/Core/VideoCommon/FrameDump.cpp:156:56: error: invalid conversion from ‘const AVOutputFormat*’ to ‘AVOutputFormat*’ [-fpermissive]
156 | AVOutputFormat* const output_format = av_guess_format(format.c_str(), dump_path.c_str(), nullptr);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| const AVOutputFormat*
/home/salva/Desktop/dolphin/Source/Core/VideoCommon/FrameDump.cpp: In member function ‘void FrameDump::ProcessPackets()’:
/home/salva/Desktop/dolphin/Source/Core/VideoCommon/FrameDump.cpp:339:24: warning: ‘void av_init_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
339 | av_init_packet(&pkt);
| ^
In file included from /usr/local/include/libavcodec/avcodec.h:45,
from /home/salva/Desktop/dolphin/Source/Core/VideoCommon/FrameDump.cpp:17:
/usr/local/include/libavcodec/packet.h:503:6: note: declared here
503 | void av_init_packet(AVPacket pkt);
| ~~~~~~~~~~~~~
make[2]: *
* [Source/Core/VideoCommon/CMakeFiles/videocommon.dir/build.make:901: Source/Core/VideoCommon/CMakeFiles/videocommon.dir/FrameDump.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1958: Source/Core/VideoCommon/CMakeFiles/videocommon.dir/all] Error 2
make: *** [Makefile:171: all] Error 2

Further information

Note that this error relates to using ffmpeg-git (e.g. ffmpeg compiled from master). See, for instance, this pr here: https://github.com/dmlc/decord/pull/160/files

#3 Updated by JosJuice 4 days ago

  • Relates to maintainability changed from No to Yes
  • Milestone set to Current

#4 Updated by rien334 4 days ago

Perhaps an idea to change the title, since the problem isn't architecture specific at all, but related to one's ffmpeg installation?

#5 Updated by JosJuice 4 days ago

  • Subject changed from fail to compile on aarch64 linux RPI4 to Compilation error due to const AVOutputFormat* (FFmpeg)

Also available in: Atom PDF