Author Topic: Arch : compiler error  (Read 1473 times)

I12learn

  • Jr. Member
  • **
  • Posts: 82
Arch : compiler error
« on: July 15, 2013, 03:43:46 AM »
Hello there,
I tried to compile on Arch, after downloading from GIT.
I got some error, see on Arch forum, then I can't tell exactly which release it is.  :'(  :'(

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9673
Re: Arch : compiler error
« Reply #1 on: July 15, 2013, 04:42:18 AM »
looks like you have too old/too new libva
/usr/include/va/va.h says rev v0.30

I12learn

  • Jr. Member
  • **
  • Posts: 82
Re: Arch : compiler error
« Reply #2 on: July 15, 2013, 07:30:27 AM »
Good to know it. BTW which is the correct version?
I got libva 1.2.1-1 and:
Code: [Select]
$ vainfo
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
vaInitialize failed with error code -1 (unknown libva error),exit
Code: [Select]
lspci |grep VGA
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
I think I should look for a correct video driver, maybe libva-intel-driver
« Last Edit: July 15, 2013, 07:47:24 AM by I12learn »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 3410
Re: Arch : compiler error
« Reply #3 on: July 15, 2013, 09:56:22 AM »
Intel® Core™ i5-2500K with ubuntu 12.04 64-bit:
Code: [Select]
vainfo
Quote
libva: VA-API version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA-API version: 0.32 (libva 1.0.15)
vainfo: Driver version: Intel i965 driver - 1.0.15
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :   VAEntrypointVLD
      VAProfileMPEG2Main              :   VAEntrypointVLD
      VAProfileH264Baseline           :   VAEntrypointVLD
      VAProfileH264Baseline           :   VAEntrypointEncSlice
      VAProfileH264Main               :   VAEntrypointVLD
      VAProfileH264Main               :   VAEntrypointEncSlice
      VAProfileH264High               :   VAEntrypointVLD
      VAProfileH264High               :   VAEntrypointEncSlice
      VAProfileVC1Simple              :   VAEntrypointVLD
      VAProfileVC1Main                :   VAEntrypointVLD
      VAProfileVC1Advanced            :   VAEntrypointVLD
Code: [Select]
lspci |grep VGA
Quote
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)

and have this one installed: libva-intel-vaapi-driver
« Last Edit: July 15, 2013, 09:59:43 AM by Jan Gruuthuse »

I12learn

  • Jr. Member
  • **
  • Posts: 82
Re: Arch : compiler error
« Reply #4 on: July 21, 2013, 06:18:28 PM »
It is hard to try now, I'm not at home  :'( and the intel is on the desktop.
However there is a version difference, I'll try with my laptop to see if will compile. (connection permitting)
Jan, is your avidemux 2.6 compiled to the latest release and working?

Yamashita Ren

  • Newbie
  • *
  • Posts: 13
Re: Arch : compiler error
« Reply #5 on: August 26, 2013, 10:25:05 PM »
Hello,
I have tried to compile the last rev of Avidemux on Archlinux.
I had a longer error than I12learn's one :
Code: [Select]
[ 80%] Building CXX object ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/CMakeFiles/ADM_coreLibVA6.dir/ADM_coreLibVA.cpp.o
In file included from /tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp:17:0:
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/../include/ADM_coreLibVA.h:49:5: attention : ‘typedef’ was ignored in this declaration [enabled by default]
     };
     ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp: In static member function ‘static VASurfaceID admLibVA::allocateSurface(int, int)’:
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp:548:89: erreur: invalid conversion from ‘int’ to ‘VASurfaceID* {aka unsigned int*}’ [-fpermissive]
         CHECK_ERROR(vaCreateSurfaces(ADM_coreLibVA::display,w,h,VA_RT_FORMAT_YUV420,1,&s));
                                                                                         ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp:71:32: note: in definition of macro ‘CHECK_ERROR’
 #define CHECK_ERROR(x) {xError=x;displayXError(#x,ADM_coreLibVA::display,xError);}
                                ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp:548:89: erreur: invalid conversion from ‘VASurfaceID* {aka unsigned int*}’ to ‘unsigned int’ [-fpermissive]
         CHECK_ERROR(vaCreateSurfaces(ADM_coreLibVA::display,w,h,VA_RT_FORMAT_YUV420,1,&s));
                                                                                         ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp:71:32: note: in definition of macro ‘CHECK_ERROR’
 #define CHECK_ERROR(x) {xError=x;displayXError(#x,ADM_coreLibVA::display,xError);}
                                ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp:548:89: erreur: too few arguments to function ‘VAStatus vaCreateSurfaces(VADisplay, unsigned int, unsigned int, unsigned int, VASurfaceID*, unsigned int, VASurfaceAttrib*, unsigned int)’
         CHECK_ERROR(vaCreateSurfaces(ADM_coreLibVA::display,w,h,VA_RT_FORMAT_YUV420,1,&s));
                                                                                         ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp:71:32: note: in definition of macro ‘CHECK_ERROR’
 #define CHECK_ERROR(x) {xError=x;displayXError(#x,ADM_coreLibVA::display,xError);}
                                ^
In file included from /tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/../include/ADM_coreLibVA.h:28:0,
                 from /tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp:17:
/usr/include/va/va.h:792:1: note: declared here
 vaCreateSurfaces(
 ^
In file included from /tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp:980:0:
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp: In member function ‘bool ADM_vaEncodingContext::createExtraData()’:
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp:121:9: erreur: ‘VAEncSequenceParameterBufferH264’ was not declared in this scope
         VAEncSequenceParameterBufferH264 seq_h264 = {0};
         ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp:121:42: erreur: expected ‘;’ before ‘seq_h264’
         VAEncSequenceParameterBufferH264 seq_h264 = {0};
                                          ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp:124:13: erreur: ‘seq_h264’ was not declared in this scope
             seq_h264.level_idc = 30;
             ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp: In member function ‘bool ADM_vaEncodingContext::encode(ADM_vaSurface*, ADMBitstream*, ADM_vaEncodingBuffer*)’:
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp:168:9: erreur: ‘VAEncPictureParameterBufferH264’ was not declared in this scope
         VAEncPictureParameterBufferH264 pic_h264;
         ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp:168:41: erreur: expected ‘;’ before ‘pic_h264’
         VAEncPictureParameterBufferH264 pic_h264;
                                         ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp:173:9: erreur: ‘pic_h264’ was not declared in this scope
         pic_h264.reference_picture = internalSurface[toggle]->surface;
         ^
make[2]: *** [ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/CMakeFiles/ADM_coreLibVA6.dir/ADM_coreLibVA.cpp.o] Erreur 1
make[1]: *** [ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/CMakeFiles/ADM_coreLibVA6.dir/all] Erreur 2
make: *** [all] Erreur 2

Then I have applied the first part of the fix described on the Arch forum. It removes the I12learn's part of the error :
Code: [Select]
[ 80%] Building CXX object ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/CMakeFiles/ADM_coreLibVA6.dir/ADM_coreLibVA.cpp.o
In file included from /tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp:17:0:
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/../include/ADM_coreLibVA.h:49:5: attention : ‘typedef’ was ignored in this declaration [enabled by default]
     };
     ^
In file included from /tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp:982:0:
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp: In member function ‘bool ADM_vaEncodingContext::createExtraData()’:
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp:121:9: erreur: ‘VAEncSequenceParameterBufferH264’ was not declared in this scope
         VAEncSequenceParameterBufferH264 seq_h264 = {0};
         ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp:121:42: erreur: expected ‘;’ before ‘seq_h264’
         VAEncSequenceParameterBufferH264 seq_h264 = {0};
                                          ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp:124:13: erreur: ‘seq_h264’ was not declared in this scope
             seq_h264.level_idc = 30;
             ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp: In member function ‘bool ADM_vaEncodingContext::encode(ADM_vaSurface*, ADMBitstream*, ADM_vaEncodingBuffer*)’:
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp:168:9: erreur: ‘VAEncPictureParameterBufferH264’ was not declared in this scope
         VAEncPictureParameterBufferH264 pic_h264;
         ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp:168:41: erreur: expected ‘;’ before ‘pic_h264’
         VAEncPictureParameterBufferH264 pic_h264;
                                         ^
/tmp/yaourt-tmp-quentin/aur-avidemux-2.6-git/src/avidemux/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA_encoder.cpp:173:9: erreur: ‘pic_h264’ was not declared in this scope
         pic_h264.reference_picture = internalSurface[toggle]->surface;
         ^
make[2]: *** [ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/CMakeFiles/ADM_coreLibVA6.dir/ADM_coreLibVA.cpp.o] Erreur 1
make[1]: *** [ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/CMakeFiles/ADM_coreLibVA6.dir/all] Erreur 2
make: *** [all] Erreur 2

Here is my vainfo :
Code: [Select]
[quentin@VaioLaptop aur-avidemux-2.6-git]$ vainfo
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_0_33
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.34 (libva 1.2.1)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG4Simple            : VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

Have you and idea for solving this ?
Thank you
Yama
« Last Edit: August 26, 2013, 10:26:42 PM by Yamashita Ren »

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9673
Re: Arch : compiler error
« Reply #6 on: August 27, 2013, 05:49:25 AM »
I added a check to see if libva is the expected version
Should compile now, but you wont have hw accelerated libva support

Yamashita Ren

  • Newbie
  • *
  • Posts: 13
Re: Arch : compiler error
« Reply #7 on: August 27, 2013, 10:53:47 AM »
Thank you, it compile now !
Th lack of hw accelerated libva support will not be a big problem.

I12learn

  • Jr. Member
  • **
  • Posts: 82
Re: Arch : compiler error
« Reply #8 on: September 01, 2013, 09:10:38 AM »
The arch package maintainer mentioned a patch and now it's compiling fine.
I've tested on a generic desktop with intel-dri and Asus
Code: [Select]
uname -a
Linux Desktop 3.10.9-1-ARCH #1 SMP PREEMPT Wed Aug 21 13:49:35 CEST 2013 x86_64 GNU/Linux
and on an Asus G75VX.
Both flawlessly.