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

Build failure #371

Open
SolarAquarion opened this issue Dec 25, 2017 · 5 comments
Open

Build failure #371

SolarAquarion opened this issue Dec 25, 2017 · 5 comments
Labels

Comments

@SolarAquarion
Copy link

SolarAquarion commented Dec 25, 2017

/home/solaraquarion/build/freshplayerplugin-git/src/freshplayerplugin-git/src/ppb_video_decoder.c:119:12: warning: ‘vaapi_context’ is deprecated [-Wdeprecated-declarations]
     struct vaapi_context    va_context;
            ^~~~~~~~~~~~~
In file included from /home/solaraquarion/build/freshplayerplugin-git/src/freshplayerplugin-git/src/ppb_video_decoder.c:45:0:
/usr/include/libavcodec/vaapi.h:56:29: note: declared here
 struct attribute_deprecated vaapi_context {
                             ^~~~~~~~~~~~~
/home/solaraquarion/build/freshplayerplugin-git/src/freshplayerplugin-git/src/ppb_video_decoder.c: In function ‘initialize_decoder’:
/home/solaraquarion/build/freshplayerplugin-git/src/freshplayerplugin-git/src/ppb_video_decoder.c:623:37: error: ‘CODEC_CAP_TRUNCATED’ undeclared (first use in this function); did you mean ‘AV_CODEC_CAP_TRUNCATED’?
     if (vd->avcodec->capabilities & CODEC_CAP_TRUNCATED) {
                                     ^~~~~~~~~~~~~~~~~~~
                                     AV_CODEC_CAP_TRUNCATED
/home/solaraquarion/build/freshplayerplugin-git/src/freshplayerplugin-git/src/ppb_video_decoder.c:623:37: note: each undeclared identifier is reported only once for each function it appears in
/home/solaraquarion/build/freshplayerplugin-git/src/freshplayerplugin-git/src/ppb_video_decoder.c:625:29: error: ‘CODEC_FLAG_TRUNCATED’ undeclared (first use in this function); did you mean ‘CODEC_CAP_TRUNCATED’?
         vd->avctx->flags |= CODEC_FLAG_TRUNCATED;
                             ^~~~~~~~~~~~~~~~~~~~
                             CODEC_CAP_TRUNCATED
/home/solaraquarion/build/freshplayerplugin-git/src/freshplayerplugin-git/src/ppb_video_decoder.c:634:5: warning: ‘refcounted_frames’ is deprecated [-Wdeprecated-declarations]
     vd->avctx->refcounted_frames = 1;
     ^~
In file included from /home/solaraquarion/build/freshplayerplugin-git/src/freshplayerplugin-git/src/ppb_video_decoder.c:44:0:
/usr/include/libavcodec/avcodec.h:2328:9: note: declared here
     int refcounted_frames;
         ^~~~~~~~~~~~~~~~~
/home/solaraquarion/build/freshplayerplugin-git/src/freshplayerplugin-git/src/ppb_video_decoder.c: In function ‘issue_frame’:
/home/solaraquarion/build/freshplayerplugin-git/src/freshplayerplugin-git/src/ppb_video_decoder.c:787:5: warning: ‘pkt_pts’ is deprecated [-Wdeprecated-declarations]
     int32_t  bitstream_buffer_id = (int32_t)frame->pkt_pts;
     ^~~~~~~
In file included from /usr/include/libavcodec/avcodec.h:38:0,
                 from /home/solaraquarion/build/freshplayerplugin-git/src/freshplayerplugin-git/src/ppb_video_decoder.c:44:
/usr/include/libavutil/frame.h:302:13: note: declared here
     int64_t pkt_pts;
             ^~~~~~~
/home/solaraquarion/build/freshplayerplugin-git/src/freshplayerplugin-git/src/ppb_video_decoder.c: In function ‘decode_frame’:
/home/solaraquarion/build/freshplayerplugin-git/src/freshplayerplugin-git/src/ppb_video_decoder.c:871:5: warning: ‘avcodec_decode_video2’ is deprecated [-Wdeprecated-declarations]
     int len = avcodec_decode_video2(vd->avctx, vd->avframe, &got_frame, &packet);
     ^~~
In file included from /home/solaraquarion/build/freshplayerplugin-git/src/freshplayerplugin-git/src/ppb_video_decoder.c:44:0:
/usr/include/libavcodec/avcodec.h:4664:5: note: declared here
 int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
     ^~~~~~~~~~~~~~~~~~~~~
make[2]: *** [src/CMakeFiles/freshwrapper-obj.dir/build.make:1911: src/CMakeFiles/freshwrapper-obj.dir/ppb_video_decoder.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:322: src/CMakeFiles/freshwrapper-obj.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
@i-rinat
Copy link
Owner

i-rinat commented Dec 26, 2017

Try the latest version from master branch. I think, 934aa9c should fix the build.

@BlackMage2
Copy link

BlackMage2 commented Dec 27, 2017

I have these too, but if only if I'm building from a different directory than src

@i-rinat
Copy link
Owner

i-rinat commented Dec 27, 2017

but if only if I'm building from a different directory than src

That's odd. Although I don't test building from the source directory and always build in a separate directory (usually named build), it shouldn't matter.

As far as I can tell, the issue is related to the FFmpeg headers. There is a transition started years ago, names of various constants got AV_ prefix, i.e. CODEC_CAP_TRUNCATED becoming AV_CODEC_CAP_TRUNCATED and so on. Both sets were there, so applications using FFmpeg were buildable. And now they started to remove old names. I think that will affect other applications too.

I use the latest release of FFmpeg, 3.4.1, and CODEC_CAP_TRUNCATED and the like are still there in the headers. But I think, next release won't have them. Probably, @SolarAquarion is using some development version from their source control repository.

@BlackMage2
Copy link

BlackMage2 commented Dec 27, 2017

with me, I get exactly these errors only when I build from a different directory than freshplayerplugin/src

when I build in ${i-rinat/freshplayerplugin_REPO_ROOT}/src everything compiles without problems

Summary:
when i build in ${i-rinat/freshplayerplugin_REPO_ROOT}/src it compiles good
when i build ${i-rinat/freshplayerplugin_REPO_ROOT}/ I get the mistakes above

@i-rinat i-rinat added the fixed label Feb 11, 2018
@i-rinat
Copy link
Owner

i-rinat commented Feb 11, 2018

when i build in ${i-rinat/freshplayerplugin_REPO_ROOT}/src it compiles good
when i build ${i-rinat/freshplayerplugin_REPO_ROOT}/ I get the mistakes above

That shouldn't matter, unless there are some remainders from previous configurations. CMake projects are not really reconfigurable. So if you some older copy of sources, run cmake there, then update sources and continue to build, there could be build issues. The easiest way is to remove everything CMake generated and start again. That's why README recommends to make directory build and configure/build there. That way all generated files may be removed easily. If one builds directly in source root, generated files are created right there, and may be hard to locate then when one wants to cleanup.

I believe that if you start with a fresh copy of sources, build should succeed in both cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants