Author Topic: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**  (Read 5026 times)

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6051
Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
« on: October 16, 2016, 09:24:54 AM »
fixed: 153a4b2        [libVa] Fix probing, vp9 was aliased to hevc
Code: [Select]
/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]
     if(_context->coded_frame)
                  ^
/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]
         pict_type=_context->coded_frame->pict_type;
                             ^
/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]
         keyframe=_context->coded_frame->key_frame;
                            ^
/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
cmake: 2.8.12.2
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
_____________________________________________
« Last Edit: October 16, 2016, 04:36:04 PM by Jan Gruuthuse »

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3396
Re: 14.04.5 Failed at make, result in /tmp/logbuildCore**
« Reply #1 on: October 16, 2016, 09:43:14 AM »
The actual error is at line 1506:

Code: [Select]
/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
         SUPSUP(VAProfileVP9Profile3,configVP9)
                ^

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3396
Re: 14.04.5 Failed at make, result in /tmp/logbuildCore**
« Reply #2 on: October 16, 2016, 12:37:31 PM »
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.

Code: [Select]
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.

Code: [Select]
-- 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
-- LibVA cflags=<-DLIBVA_HEVC_DEC;-DLIBVA_VP9_DEC>
-- Found LIBVA

If yours finds VP9, the detection is wrong.
« Last Edit: October 16, 2016, 12:50:15 PM by eumagga0x2a »

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10974
Re: 14.04.5 Failed at make, result in /tmp/logbuildCore**
« Reply #3 on: October 16, 2016, 03:24:24 PM »
Should work now
be sure to delete the core build tree, some internal vars used are cached

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3396
Re: 14.04.5 Failed at make, result in /tmp/logbuildCore**
« Reply #4 on: October 16, 2016, 04:25:27 PM »
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

  • Hero Member
  • *****
  • Posts: 6051
Re: 14.04.5 Failed at make, result in /tmp/logbuildCore**
« Reply #5 on: October 16, 2016, 04:34:36 PM »
Code: [Select]
** ALL DONE **
** The installable packages are in the debs folder **

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3396
Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
« Reply #6 on: October 16, 2016, 04:47:08 PM »
Great, the build succeeded, but what did cmake report about libva support?

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6051
Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
« Reply #7 on: October 16, 2016, 04:57:53 PM »
there plenty of references for cmake about libva, don't know what your looking for.
Here the logbuildCore for this build:

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3396
Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
« Reply #8 on: October 16, 2016, 05:12:49 PM »
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

Code: [Select]
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

  • Hero Member
  • *****
  • Posts: 6051
Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
« Reply #9 on: October 16, 2016, 05:25:30 PM »
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:
Code: [Select]
vainfo
Code: [Select]
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/nvidia_drv_video.so
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?

GLX:
Quote
GL_NVX_nvenc_interop
« Last Edit: October 16, 2016, 05:28:15 PM by Jan Gruuthuse »

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3396
Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
« Reply #10 on: October 16, 2016, 05:38:07 PM »
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

Code: [Select]
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

  • Hero Member
  • *****
  • Posts: 6051
Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
« Reply #11 on: October 17, 2016, 03:36:46 AM »
Quote
gcc: error: libva_hevcdec.cpp: No such file or directory
gcc: fatal error: no input files
compilation terminated.

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3396
Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
« Reply #12 on: October 17, 2016, 07:16:03 AM »
You've forgotten to change directory prior to executing the command.

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6051
Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
« Reply #13 on: October 17, 2016, 09:14:18 AM »
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:

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3396
Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
« Reply #14 on: October 17, 2016, 09:32:43 AM »
Thanks, this explains why HEVC gets detected as supported. Now it would be nice to find out, where it comes from.

Code: [Select]
grep -nR VAProfileHEVCMain /usr/include/va/
dpkg -S /usr/include/va/va.h