After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 763324 - nvenc fails to compile with Nvidia video SDK 6.0
nvenc fails to compile with Nvidia video SDK 6.0
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal minor
: 1.8.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-08 13:57 UTC by Georg Lippitsch
Modified: 2016-03-31 06:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Georg Lippitsch 2016-03-08 13:57:19 UTC
nvenc fails to compile with Nvidia video SDK 6.0 with the following error:

In file included from ../../gst-libs/gst/gl/gstgl_fwd.h:26:0,
                 from ../../gst-libs/gst/gl/gl.h:29,
                 from gstnvbaseenc.c:34:
../../gst-libs/gst/gl/glprototypes/base.h:265:23: error: unknown type name 'GLsizeiptr'
                       GLsizeiptr   size,
                       ^
../../gst-libs/gst/gl/gstglapi.h:112:24: note: in definition of macro 'GST_GL_EXT_FUNCTION'
   ret (GSTGLAPI *name) args;
                        ^
../../gst-libs/gst/gl/glprototypes/base.h:270:23: error: unknown type name 'GLintptr'
                       GLintptr   offset,
                       ^
../../gst-libs/gst/gl/gstglapi.h:112:24: note: in definition of macro 'GST_GL_EXT_FUNCTION'
   ret (GSTGLAPI *name) args;
                        ^
../../gst-libs/gst/gl/glprototypes/base.h:271:23: error: unknown type name 'GLsizeiptr'
                       GLsizeiptr   size,
                       ^
../../gst-libs/gst/gl/gstglapi.h:112:24: note: in definition of macro 'GST_GL_EXT_FUNCTION'
   ret (GSTGLAPI *name) args;
                        ^
../../gst-libs/gst/gl/glprototypes/base.h:327:38: error: unknown type name 'GLintptr'
                      (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access))
                                      ^
../../gst-libs/gst/gl/gstglapi.h:112:24: note: in definition of macro 'GST_GL_EXT_FUNCTION'
   ret (GSTGLAPI *name) args;
                        ^
../../gst-libs/gst/gl/glprototypes/base.h:327:55: error: unknown type name 'GLsizeiptr'
                      (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access))
                                                       ^
../../gst-libs/gst/gl/gstglapi.h:112:24: note: in definition of macro 'GST_GL_EXT_FUNCTION'
   ret (GSTGLAPI *name) args;
                        ^
../../gst-libs/gst/gl/glprototypes/eglimage.h:49:23: error: unknown type name 'GLeglImageOES'
                       GLeglImageOES    image))
                       ^
../../gst-libs/gst/gl/gstglapi.h:112:24: note: in definition of macro 'GST_GL_EXT_FUNCTION'
   ret (GSTGLAPI *name) args;
                        ^
../../gst-libs/gst/gl/glprototypes/eglimage.h:52:23: error: unknown type name 'GLeglImageOES'
                       GLeglImageOES    image))
                       ^
../../gst-libs/gst/gl/gstglapi.h:112:24: note: in definition of macro 'GST_GL_EXT_FUNCTION'
   ret (GSTGLAPI *name) args;
                        ^
../../gst-libs/gst/gl/glprototypes/shaders.h:214:23: error: unknown type name 'GLchar'
                       GLchar* name))
                       ^
../../gst-libs/gst/gl/gstglapi.h:112:24: note: in definition of macro 'GST_GL_EXT_FUNCTION'
   ret (GSTGLAPI *name) args;
                        ^
../../gst-libs/gst/gl/glprototypes/shaders.h:219:23: error: unknown type name 'GLchar'
                       GLchar* source))
                       ^
../../gst-libs/gst/gl/gstglapi.h:112:24: note: in definition of macro 'GST_GL_EXT_FUNCTION'
   ret (GSTGLAPI *name) args;
                        ^
../../gst-libs/gst/gl/glprototypes/shaders.h:268:29: error: unknown type name 'GLchar'
                       const GLchar* name))
                             ^
../../gst-libs/gst/gl/gstglapi.h:112:24: note: in definition of macro 'GST_GL_EXT_FUNCTION'
   ret (GSTGLAPI *name) args;
                        ^
../../gst-libs/gst/gl/glprototypes/shaders.h:276:23: error: unknown type name 'GLchar'
                       GLchar* name))
                       ^
../../gst-libs/gst/gl/gstglapi.h:112:24: note: in definition of macro 'GST_GL_EXT_FUNCTION'
   ret (GSTGLAPI *name) args;
                        ^
../../gst-libs/gst/gl/glprototypes/sync.h:27:22: error: expected specifier-qualifier-list before 'GLsync'
 GST_GL_EXT_FUNCTION (GLsync, FenceSync,
                      ^
../../gst-libs/gst/gl/gstglapi.h:112:3: note: in definition of macro 'GST_GL_EXT_FUNCTION'
   ret (GSTGLAPI *name) args;
   ^
gstnvbaseenc.c: In function '_get_supported_input_formats':
gstnvbaseenc.c:176:12: error: 'NV_ENC_BUFFER_FORMAT_NV12_TILED16x16' undeclared (first use in this function)
       case NV_ENC_BUFFER_FORMAT_NV12_TILED16x16:
            ^
gstnvbaseenc.c:176:12: note: each undeclared identifier is reported only once for each function it appears in
gstnvbaseenc.c:177:12: error: 'NV_ENC_BUFFER_FORMAT_NV12_TILED64x16' undeclared (first use in this function)
       case NV_ENC_BUFFER_FORMAT_NV12_TILED64x16:
            ^
gstnvbaseenc.c:181:12: error: 'NV_ENC_BUFFER_FORMAT_YV12_TILED16x16' undeclared (first use in this function)
       case NV_ENC_BUFFER_FORMAT_YV12_TILED16x16:
            ^
gstnvbaseenc.c:182:12: error: 'NV_ENC_BUFFER_FORMAT_YV12_TILED64x16' undeclared (first use in this function)
       case NV_ENC_BUFFER_FORMAT_YV12_TILED64x16:
            ^
gstnvbaseenc.c:186:12: error: 'NV_ENC_BUFFER_FORMAT_IYUV_TILED16x16' undeclared (first use in this function)
       case NV_ENC_BUFFER_FORMAT_IYUV_TILED16x16:
            ^
gstnvbaseenc.c:187:12: error: 'NV_ENC_BUFFER_FORMAT_IYUV_TILED64x16' undeclared (first use in this function)
       case NV_ENC_BUFFER_FORMAT_IYUV_TILED64x16:
            ^
gstnvbaseenc.c:191:12: error: 'NV_ENC_BUFFER_FORMAT_YUV444_TILED16x16' undeclared (first use in this function)
       case NV_ENC_BUFFER_FORMAT_YUV444_TILED16x16:
            ^
gstnvbaseenc.c:192:12: error: 'NV_ENC_BUFFER_FORMAT_YUV444_TILED64x16' undeclared (first use in this function)
       case NV_ENC_BUFFER_FORMAT_YUV444_TILED64x16:{
            ^
  CCLD     libgstfbdevsink.la
Makefile:909: recipe for target 'libgstnvenc_la-gstnvbaseenc.lo' failed
make[3]: *** [libgstnvenc_la-gstnvbaseenc.lo] Error 1


Compilation with SDK version 5.0 works though.
Comment 1 Sebastian Dröge (slomo) 2016-03-08 13:59:26 UTC
The first part looks like a broken libgstgl or general GL setup
Comment 2 Georg Lippitsch 2016-03-09 09:55:17 UTC
(In reply to Sebastian Dröge (slomo) from comment #1)
> The first part looks like a broken libgstgl or general GL setup

Anyways, these errors disappear when simply replacing the Nvidia SDK with version 5.0
Probably, they included some libgstgl headers in their old SDK, which now need to be included in gstnvenc directly?
Comment 3 Matthew Waters (ystreet00) 2016-03-31 06:31:57 UTC
commit d6f7ea88bbadbd16761251617fe87c9649f71d8c
Author: Matthew Waters <matthew@centricular.com>
Date:   Thu Mar 31 01:21:42 2016 +1100

    nvenc: add support for building against version 6 of the SDK
    
    While mostly API compatible, the ABI has changed so binaries will not work
    across header versions (and ultimately nvidia driver releases).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=763324

and 1.8 5b5d995d2108d3c37d09e8ab9c668b9550e808ec
Comment 4 Matthew Waters (ystreet00) 2016-03-31 06:34:20 UTC
Note: that compiling v5 will run on v6 drivers and vice versa unlike the commit message says.