Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**

Started by Jan Gruuthuse, October 16, 2016, 09:24:54 am

Previous topic - Next topic

Jan Gruuthuse

October 16, 2016, 09:24:54 am Last Edit: October 16, 2016, 04:36:04 pm by Jan Gruuthuse
fixed: 153a4b2        [libVa] Fix probing, vp9 was aliased to hevc
/home/jan/avidemux2/avidemux_core/ADM_coreVideoEncoder/src/ADM_coreVideoEncoderFFmpeg.cpp:436:18: warning: ââ,¬ËœAVCodecContext::coded_frameââ,¬â,,¢ is deprecated (declared at /home/jan/avidemux2/buildCore/ffmpeg/source/libavcodec/avcodec.h:2951) [-Wdeprecated-declarations]
/home/jan/avidemux2/avidemux_core/ADM_coreVideoEncoder/src/ADM_coreVideoEncoderFFmpeg.cpp:436:18: warning: ââ,¬ËœAVCodecContext::coded_frameââ,¬â,,¢ is deprecated (declared at /home/jan/avidemux2/buildCore/ffmpeg/source/libavcodec/avcodec.h:2951) [-Wdeprecated-declarations]
/home/jan/avidemux2/avidemux_core/ADM_coreVideoEncoder/src/ADM_coreVideoEncoderFFmpeg.cpp:438:29: warning: ââ,¬ËœAVCodecContext::coded_frameââ,¬â,,¢ is deprecated (declared at /home/jan/avidemux2/buildCore/ffmpeg/source/libavcodec/avcodec.h:2951) [-Wdeprecated-declarations]
/home/jan/avidemux2/avidemux_core/ADM_coreVideoEncoder/src/ADM_coreVideoEncoderFFmpeg.cpp:438:29: warning: ââ,¬ËœAVCodecContext::coded_frameââ,¬â,,¢ is deprecated (declared at /home/jan/avidemux2/buildCore/ffmpeg/source/libavcodec/avcodec.h:2951) [-Wdeprecated-declarations]
/home/jan/avidemux2/avidemux_core/ADM_coreVideoEncoder/src/ADM_coreVideoEncoderFFmpeg.cpp:439:28: warning: ââ,¬ËœAVCodecContext::coded_frameââ,¬â,,¢ is deprecated (declared at /home/jan/avidemux2/buildCore/ffmpeg/source/libavcodec/avcodec.h:2951) [-Wdeprecated-declarations]
/home/jan/avidemux2/avidemux_core/ADM_coreVideoEncoder/src/ADM_coreVideoEncoderFFmpeg.cpp:439:28: warning: ââ,¬ËœAVCodecContext::coded_frameââ,¬â,,¢ is deprecated (declared at /home/jan/avidemux2/buildCore/ffmpeg/source/libavcodec/avcodec.h:2951) [-Wdeprecated-declarations]
make[2]: *** [ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/CMakeFiles/ADM_coreLibVA6.dir/ADM_coreLibVA.cpp.o] Error 1
make[2]: Leaving directory `/home/jan/avidemux2/buildCore'
make[1]: *** [ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/CMakeFiles/ADM_coreLibVA6.dir/all] Error 2

Avidemux v2.6.14 (18f0680)        [UI] Try to handle maximizing window and back a bit better (euma)
Compiler: GCC 4.8.4
Build Target: Linux (x86-64)
User Interface: Qt (4.8.6)
Kernel: Linux 3.19.0-71-generic (x86_64) (linux-image-3.19.0-71-generic                         3.19.0-71.79~14.04.1)
Distribution: Linux Ubuntu 14.04.5 LTS (Trusty)
qt4-default: installed
qt5-default: not installed

Intel Core i7-3770K @ 3.50GHz (4 Cores/8 Threads) with 32 GB ram

Desktop: Unity 7.2.6
Display Server: X Server 1.15.1
Display Driver: NVIDIA 361.93.02
OpenGL: 4.3.0
Compiler: GCC 4.8.4 + CUDA 7.5

OpenGL Vendor: NVIDIA Corporation
OpenGL Renderer: GeForce GTX 960/PCIe/SSE2 2048MB (1227/3600MHz)
OpenGL: 4.5.0 NVIDIA 361.93.02

- vdpauinfo:API version: 1   NVIDIA VDPAU Driver Shared Library  361.93.02
- x264 0.148.2721 72d53ab
(libswscale 3.1.101)
(libavformat 56.36.100)
x264 configuration: --bit-depth=8 --chroma-format=all
libx264 configuration: --bit-depth=8 --chroma-format=all

- x265 [info]: HEVC encoder version 1.9+226-6561d8676581
x265 [info]: build info [Linux][[GCC 4.8.4][64 bit] 8bit


The actual error is at line 1506:

/home/jan/avidemux2/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp: In static member function ââ,¬Ëœstatic bool admLibVA::supported(VAProfile)ââ,¬â,,¢:
/home/jan/avidemux2/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp:489:16: error: ââ,¬ËœVAProfileVP9Profile3ââ,¬â,,¢ was not declared in this scope


October 16, 2016, 12:37:31 pm #2 Last Edit: October 16, 2016, 12:50:15 pm by eumagga0x2a
It is again an issue with an older libva version in Ubuntu 14.04.5. VAProfileVP9Profile3 is missing there in the list of available profiles in va.h from libva-dev. The commit [libva] Use our new cflags might have exposed the issue.

I wonder if the typo at line 7 of cmake/cmake_compile_check/libva_vp9dec.cpp from the commit [libva] Better detection of system libva (h265, vp9,...) might be related.

You could try the attached patch, even if it doesn't fix the build issue, it won't do any harm.

diff --git a/cmake/cmake_compile_check/libva_vp9dec.cpp b/cmake/cmake_compile_check/libva_vp9dec.cpp
index df5b55e..d22e365 100644
--- a/cmake/cmake_compile_check/libva_vp9dec.cpp
+++ b/cmake/cmake_compile_check/libva_vp9dec.cpp
@@ -4,6 +4,6 @@

int main(int argc, char **argv)
-        int attr=VAPRofileVP9Profile3;     
+        int attr=VAProfileVP9Profile3;     
         return 0;

edited: Please check the output which bootStrap.bash prints to the terminal related to VP9 in the LIBVA context, e.g.

-- Checking for LIBVA
-- *******************
-- Found va/va.h
-- Checking it is the right version...
--     yes
-- Checking for HEVC decoder, result is TRUE
-- HEVC decoder is supported
-- Checking for VP9 decoder, result is TRUE
-- VP9 decoder is supported
-- Checking for DUMMY decoder, result is FALSE
-- DUMMY decoder is not supported
-- Found LIBVA

If yours finds VP9, the detection is wrong.


Should work now
be sure to delete the core build tree, some internal vars used are cached


libva on Ubuntu 14.04.5 doesn't support HEVC either, so even if the VP9 check really only checked for HEVC (which I gloriously missed looking at the patch :-[), the result should have been negative, shouldn't it? Anyway, Jan will find it out soon.

Jan Gruuthuse

** ALL DONE **
** The installable packages are in the debs folder **


Great, the build succeeded, but what did cmake report about libva support?

Jan Gruuthuse

there plenty of references for cmake about libva, don't know what your looking for.
Here the logbuildCore for this build:


I meant the output you see in the terminal while building, not logbuildCore. But in this case even logbuildCore is helpful because it indicates in

Building CXX object ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/CMakeFiles/ADM_coreLibVA6.dir/ADM_coreLibVA.cpp.o
cd /home/jan/avidemux2/buildCore/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src && /usr/bin/c++   -DADM_coreLibVA6_EXPORTS -DLIBVA_HEVC_DEC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fmessage-length=0 -O3 -DNDEBUG -fPIC -I/home/jan/avidemux2/buildCore/config -I/home/jan/avidemux2/avidemux_core/ADM_core/include -I/home/jan/avidemux2/avidemux_core/ADM_coreAudioFilter/include -I/home/jan/avidemux2/avidemux_core/ADM_coreAudioParser/include -I/home/jan/avidemux2/avidemux_core/ADM_coreAudio/include -I/home/jan/avidemux2/avidemux_core/ADM_coreAudioDevice/include -I/home/jan/avidemux2/avidemux_core/ADM_coreAudioEncoder/include -I/home/jan/avidemux2/avidemux_core/ADM_coreDemuxer/include -I/home/jan/avidemux2/avidemux_core/ADM_coreDemuxer/include/unix -I/home/jan/avidemux2/avidemux_core/ADM_coreDemuxerMpeg/include -I/home/jan/avidemux2/avidemux_core/ADM_coreImage/include -I/home/jan/avidemux2/avidemux_core/ADM_coreMuxer/include -I/home/jan/avidemux2/avidemux_core/ADM_coreScript/include -I/home/jan/avidemux2/avidemux_core/ADM_coreUI/include -I/home/jan/avidemux2/avidemux_core/ADM_coreUtils/include -I/home/jan/avidemux2/avidemux_core/ADM_coreVideoEncoder/include -I/home/jan/avidemux2/avidemux_core/ADM_coreVideoFilter/include -I/home/jan/avidemux2/avidemux_core/ADM_coreVideoCodec/include -I/home/jan/avidemux2/avidemux_core/ADM_coreImageLoader/include -I/home/jan/avidemux2/avidemux_core/ADM_coreJobs/include -I/home/jan/avidemux2/avidemux_core/ADM_coreSocket/include -I/home/jan/avidemux2/avidemux_core/ADM_coreAudioCodec/include -I/home/jan/avidemux2/buildCore/ffmpeg/source -I/home/jan/avidemux2/buildCore/ffmpeg/build -I/home/jan/avidemux2/avidemux_core/ADM_coreLibVA/include    -Werror=attributes -o CMakeFiles/ADM_coreLibVA6.dir/ADM_coreLibVA.cpp.o -c /home/jan/avidemux2/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp

at line 1493 that cmake detects HEVC as supported (-DLIBVA_HEVC_DEC) despite it being unavailable on 14.04.5. Just for some reason the build still succeeds, but the detection seems to be incorrect.

Jan Gruuthuse

October 16, 2016, 05:25:30 pm #9 Last Edit: October 16, 2016, 05:28:15 pm by Jan Gruuthuse
perhaps while HEVC is hardware supported here (GTX 960) over vdpau API (VDPAU backend for VA-API - 0.7.3)?
Vainfo is not reporting HEVC:
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.37 (libva 1.5.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.3
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG4Simple            : VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

vdpau only gives decoder info? perhaps nvenc?



No, features supported via VDPAU are not related. CMake tries to compile libva_hevcdec.cpp from the cmake/cmake_compile_check folder. If it succeeds, the feature is supported. If it fails to compile, it is not. Copy this file e.g. to /tmp/, go the /tmp and run

gcc libva_hevcdec.cpp -o hevc-test

If you get a binary hevc-test and no error instead, the detection of HEVC support is not at fault.

Jan Gruuthuse

Quotegcc: error: libva_hevcdec.cpp: No such file or directory
gcc: fatal error: no input files
compilation terminated.


You've forgotten to change directory prior to executing the command.

Jan Gruuthuse

Not forgotten to go into /tmp. Did not see: I needed to copy ~/avidemux2/cmake/cmake_compile_check/libva_hevcdec.cpp first into it.
Seems to be successful, did create this binary:


Thanks, this explains why HEVC gets detected as supported. Now it would be nice to find out, where it comes from.

grep -nR VAProfileHEVCMain /usr/include/va/
dpkg -S /usr/include/va/va.h