Bug 106047 - Compilng DRM fails: implicit declaration of S_ISCHR() and fstat()
Summary: Compilng DRM fails: implicit declaration of S_ISCHR() and fstat()
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-14 19:07 UTC by Dilian
Modified: 2018-08-25 13:32 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Dilian 2018-04-14 19:07:18 UTC
With 1.15.12 doing
  ./configure --enable-xml --enable-glesv2 --enable-glesv3 --enable-xlib-xcb --enable-tee --enable-drm
prints

cairo (version 1.15.12 [snapshot]) will be compiled with:

The following surface backends:
  Image:         yes (always builtin)
  Recording:     yes (always builtin)
  Observer:      yes (always builtin)
  Mime:          yes (always builtin)
  Tee:           yes
  XML:           yes
  Xlib:          yes
  Xlib Xrender:  yes
  Qt:            no (disabled, use --enable-qt to enable)
  Quartz:        no (requires CoreGraphics framework)
  Quartz-image:  no (disabled, use --enable-quartz-image to enable)
  XCB:           yes
  Win32:         no (requires a Win32 platform)
  OS2:           no (disabled, use --enable-os2 to enable)
  CairoScript:   yes
  PostScript:    yes
  PDF:           yes
  SVG:           yes
  OpenGL:        no (disabled, use --enable-gl to enable)
  OpenGL ES 2.0: yes
  OpenGL ES 3.0: yes
  BeOS:          no (disabled, use --enable-beos to enable)
  DirectFB:      no (disabled, use --enable-directfb to enable)
  OpenVG:        no (disabled, use --enable-vg to enable)
  DRM:           yes
  Cogl:          no (disabled, use --enable-cogl to enable)

The following font backends:
  User:          yes (always builtin)
  FreeType:      yes
  Fontconfig:    yes
  Win32:         no (requires a Win32 platform)
  Quartz:        no (requires CoreGraphics framework)

The following functions:
  PNG functions:   yes
  GLX functions:   no (not required by any backend)
  WGL functions:   no (not required by any backend)
  EGL functions:   yes
  X11-xcb functions: yes
  XCB-shm functions: yes

The following features and utilities:
  cairo-trace:                yes
  cairo-script-interpreter:   yes

And the following internal features:
  pthread:       yes
  gtk-doc:       no
  gcov support:  no
  symbol-lookup: no (requires bfd)
  test surfaces: no (disabled, use --enable-test-surfaces to enable)
  ps testing:    no (requires libspectre)
  pdf testing:   yes
  svg testing:   no (requires librsvg-2.0 >= 2.35.0)


--- The Xlib/XCB functions feature is still under active development and is
--- included in this release only as a preview. It does NOT fully work yet
--- and incompatible changes may yet be made to Xlib/XCB functions specific
--- API.

--- The DRM surface backend feature is still under active development and is
--- included in this release only as a preview. It does NOT fully work yet
--- and incompatible changes may yet be made to DRM surface backend specific
--- API.

--- The OpenGLESv2 surface backend feature is still under active development
--- and is included in this release only as a preview. It does NOT fully work
--- yet and incompatible changes may yet be made to OpenGLESv2 surface
--- backend specific API.

--- The OpenGLESv3 surface backend feature is still under active development
--- and is included in this release only as a preview. It does NOT fully work
--- yet and incompatible changes may yet be made to OpenGLESv3 surface
--- backend specific API.

--- The tee surface backend feature is still under active development and is
--- included in this release only as a preview. It does NOT fully work yet
--- and incompatible changes may yet be made to tee surface backend specific
--- API.

--- The xml surface backend feature is still under active development and is
--- included in this release only as a preview. It does NOT fully work yet
--- and incompatible changes may yet be made to xml surface backend specific
--- API.

and doing `make` emits:


Makefile:1502: warning: overriding recipe for target 'recheck'
Makefile:1140: warning: ignoring old recipe for target 'recheck'
make  all-recursive
make[1]: Entering directory '/src/gnome/cairo-1.15.12'
Makefile:1502: warning: overriding recipe for target 'recheck'
Makefile:1140: warning: ignoring old recipe for target 'recheck'
Making all in src
make[2]: Entering directory '/src/gnome/cairo-1.15.12/src'
make  all-am
make[3]: Entering directory '/src/gnome/cairo-1.15.12/src'
  CC       cairo-drm.lo
In file included from ./cairo-reference-count-private.h:40:0,
                 from ./cairo-types-private.h:45,
                 from ./cairo-error-private.h:43,
                 from ./cairoint.h:74,
                 from drm/cairo-drm.c:33:
drm/cairo-drm.c: In function ‘_device_finish’:
drm/cairo-drm.c:86:36: warning: passing argument 1 of ‘_cairo_atomic_ptr_cmpxchg_impl’ from incompatible pointer type [-Wincompatible-pointer-types]
     if (_cairo_atomic_ptr_cmpxchg (&_cairo_drm_default_device,
                                    ^
./cairo-atomic-private.h:145:34: note: in definition of macro ‘_cairo_atomic_ptr_cmpxchg’
   _cairo_atomic_ptr_cmpxchg_impl(x, oldv, newv)
                                  ^
./cairo-atomic-private.h:138:1: note: expected ‘void **’ but argument is of type ‘cairo_drm_device_t ** {aka struct _cairo_drm_device **}’
 _cairo_atomic_ptr_cmpxchg_impl(void **x, void *oldv, void *newv)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drm/cairo-drm.c: At top level:
drm/cairo-drm.c:106:5: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
     _device_flush,
     ^~~~~~~~~~~~~
drm/cairo-drm.c:106:5: note: (near initialization for ‘_cairo_drm_device_backend.flush’)
drm/cairo-drm.c: In function ‘cairo_drm_device_get_for_fd’:
drm/cairo-drm.c:267:9: error: implicit declaration of function ‘fstat’ [-Werror=implicit-function-declaration]
     if (fstat (fd, &st) < 0 || ! S_ISCHR (st.st_mode)) {
         ^~~~~
drm/cairo-drm.c:267:34: error: implicit declaration of function ‘S_ISCHR’; did you mean ‘S_IFCHR’? [-Werror=implicit-function-declaration]
     if (fstat (fd, &st) < 0 || ! S_ISCHR (st.st_mode)) {
                                  ^~~~~~~
                                  S_IFCHR
drm/cairo-drm.c: At top level:
drm/cairo-drm.c:390:1: fatal error: opening dependency file .deps/cairo-drm.Tpo: Permission denied
 }
 ^
cc1: some warnings being treated as errors
compilation terminated.
make[3]: *** [Makefile:2424: cairo-drm.lo] Error 1
make[3]: Leaving directory '/src/gnome/cairo-1.15.12/src'
make[2]: *** [Makefile:1962: all] Error 2
make[2]: Leaving directory '/src/gnome/cairo-1.15.12/src'
make[1]: *** [Makefile:910: all-recursive] Error 1
make[1]: Leaving directory '/src/gnome/cairo-1.15.12'
make: *** [Makefile:761: all] Error 2
Comment 1 GitLab Migration User 2018-08-25 13:32:24 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/56.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.