Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile Kodi 19 from git with latest ffmpeg from git. #19678

Closed
breisig opened this issue May 3, 2021 · 4 comments
Closed

Cannot compile Kodi 19 from git with latest ffmpeg from git. #19678

breisig opened this issue May 3, 2021 · 4 comments
Labels
Ignored rules issue that does not follow the rules (no template, missing debug log, ...) Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it

Comments

@breisig
Copy link

breisig commented May 3, 2021

I am installing the latest ffmpeg from git and compiling the latest Kodi 19 [Matrix] branch today from git and getting the following error message when compiling Kodi.

[  0%] Built target kodi-xrandr
[  0%] Built target crossguid
[  1%] Built target dvdcss
[  2%] Built target dvdread
[  3%] Built target dvdnav
[  7%] Built target upnp
[  7%] Built target network_upnp
[  7%] Built target sse4
[  9%] Built target wrapper
[  9%] Built target wrapper.def
[  9%] Built target wrap_libdvdnav
[  9%] Built target kodi-libraries
[  9%] Copying files into build tree
[  9%] Built target export-files
[ 10%] Built target compileinfo
[ 10%] Built target rp-process-x11
[ 10%] Built target processX11
[ 11%] Built target windowing_X11
[ 11%] Built target cores
Consolidate compiler generated dependencies of target audioengine
[ 11%] Building CXX object build/cores/audioengine/CMakeFiles/audioengine.dir/Encoders/AEEncoderFFmpeg.cpp.o
/tmp/xbmc-20210502/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp: In member function 'virtual bool CAEEncoderFFmpeg::Initialize(AEAudioFormat&, bool)':
/tmp/xbmc-20210502/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp:94:33: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive]
   94 |     codec = avcodec_find_encoder(m_CodecID);
      |             ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
      |                                 |
      |                                 const AVCodec*
/tmp/xbmc-20210502/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp: In member function 'virtual int CAEEncoderFFmpeg::Encode(uint8_t*, int, uint8_t*, int)':
/tmp/xbmc-20210502/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp:266:24: warning: 'void av_init_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
  266 |   av_init_packet(&m_Pkt);
      |                        ^
In file included from /usr/include/libavcodec/bsf.h:30,
                 from /usr/include/libavcodec/avcodec.h:44,
                 from /tmp/xbmc-20210502/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h:14,
                 from /tmp/xbmc-20210502/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h:11,
                 from /tmp/xbmc-20210502/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp:12:
/usr/include/libavcodec/packet.h:474:6: note: declared here
  474 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
/tmp/xbmc-20210502/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp:271:13: error: 'avcodec_encode_audio2' was not declared in this scope; did you mean 'avcodec_encode_subtitle'?
  271 |   int ret = avcodec_encode_audio2(m_CodecCtx, &m_Pkt, frame, &got_output);
      |             ^~~~~~~~~~~~~~~~~~~~~
      |             avcodec_encode_subtitle
make[2]: *** [build/cores/audioengine/CMakeFiles/audioengine.dir/build.make:104: build/cores/audioengine/CMakeFiles/audioengine.dir/Encoders/AEEncoderFFmpeg.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5079: build/cores/audioengine/CMakeFiles/audioengine.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
@xbmc-gh-bot xbmc-gh-bot bot added Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it Ignored rules issue that does not follow the rules (no template, missing debug log, ...) labels May 3, 2021
@xbmc-gh-bot
Copy link

xbmc-gh-bot bot commented May 3, 2021

Thank you for using Kodi and our issue tracker. This is your friendly Kodi GitHub bot 😉

It seems that you have not followed the template we provide and require for all bug reports (or have opened a roadmap item by accident). Please understand that following the template is mandatory and required for the team to be able handle the volume of open issues efficiently.

Please edit your issue message to follow our template and make sure to fill in all fields appropriately. The issue will be closed after one week has passed without satisfactory follow-up from your side.

This is an automatically generated message. If you believe it was sent in error, please say so and a team member will remove the "Ignored rules" label.

@lrusak
Copy link
Contributor

lrusak commented May 3, 2021

What ffmpeg version are you using?

EDIT: for clarity, the matrix branch requires ffmpeg 4.3 and doesn't have the changes required to use ffmpeg 4.4 or newer.

@breisig
Copy link
Author

breisig commented May 3, 2021

@lrusak That might make sense, Using ffmpeg [Hash: 5541cff on master branch- 2021-05-03]

@asavah
Copy link
Contributor

asavah commented May 3, 2021

Afaik after 4.4 was tagged some major api changes landed in ffmpeg, a whole bunch of deprecated functions were completely removed. This started with FFmpeg/FFmpeg@4b2be3f This affects a lot of software packages which use ffmpeg. The solution is to avoid ffmpeg master for now.

@lrusak lrusak closed this as completed May 3, 2021
kueken referenced this issue in OpenPLi/openpli-oe-core Jan 22, 2022
Backport from:
https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=7b129c986ed5a086fe5192264decf1686b8db108

Apply patch to exteplayer3 to fix build

Structure pointer iformat is a constant pointer now, so we can't change it.
Needs review?
See commit:
FFmpeg/FFmpeg@56450a0

Also include header files, due to commits:

FFmpeg/FFmpeg@239b7d2
FFmpeg/FFmpeg@57b5ec6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ignored rules issue that does not follow the rules (no template, missing debug log, ...) Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it
Projects
None yet
Development

No branches or pull requests

3 participants