Summary: | Quartz backend build failure (git master) | ||
---|---|---|---|
Product: | cairo | Reporter: | ~suv <suv-sf> |
Component: | quartz backend | Assignee: | Vladimir Vukicevic <vladimir> |
Status: | RESOLVED FIXED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | Mac OS X (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
~suv
2014-10-01 21:03:21 UTC
Here is a wannabe fix: http://cgit.freedesktop.org/~ranma42/cairo/commit/?id=89d24ab1a52c052e7246d2ed5657a82364d50cd9 I will run through the testsuite just in case (it's been quite some time since I did Cairo development). Remaining error with patch applied: CC cairo-quartz-image-surface.lo cairo-quartz-image-surface.c:382:11: error: implicit declaration of function '_cairo_surface_is_quartz' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (! _cairo_surface_is_quartz (surface)) { ^ 1 error generated. make[3]: *** [cairo-quartz-image-surface.lo] Error 1 Compiler (from Xcode 4.3.2): $ clang --version Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) Andrea, you're on the right path, that's half the fix. For the remaining error(s) suv reported, do this: 1. _cairo_surface_is_quartz() needs to not be static, since it's used in another file. 2. Move the declaration of _cairo_surface_is_quartz() into the cairo-quartz-private.h header. Define it as cairo_private like other routines listed here. (In reply to ~suv from comment #2) > Remaining error with patch applied: > > CC cairo-quartz-image-surface.lo > cairo-quartz-image-surface.c:382:11: error: implicit declaration of function > '_cairo_surface_is_quartz' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > if (! _cairo_surface_is_quartz (surface)) { > ^ > 1 error generated. > make[3]: *** [cairo-quartz-image-surface.lo] Error 1 > > > > Compiler (from Xcode 4.3.2): > > $ clang --version > Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) Oops, I did not realize that the issue also affected quartz-image (I was building with default flags, which do not enable it). (In reply to Bryce Harrington from comment #3) > Andrea, you're on the right path, that's half the fix. > > For the remaining error(s) suv reported, do this: > > 1. _cairo_surface_is_quartz() needs to not be static, since it's used in > another file. > > 2. Move the declaration of _cairo_surface_is_quartz() into the > cairo-quartz-private.h header. Define it as cairo_private like other > routines listed here. Did this in http://cgit.freedesktop.org/~ranma42/cairo/commit/?id=84c68269f7e24ebaf9bf02702feeb775a5bac53e I also let it run through the testsuite and (besides from some reference images that might need to be updated) it looks mostly good (except for a couple of blend modes... will investigate those). (In reply to Andrea Canciani from comment #4) > Did this in http://cgit.freedesktop.org/~ranma42/cairo/commit/?id=84c68269f7e24ebaf9bf02702feeb775a5bac53e Thx, that fixed the build. Remaining compiler warning (don't know how relevant it is): CC cairo-quartz-image-surface.lo cairo-quartz-image-surface.c:382:37: warning: incompatible pointer types passing 'cairo_quartz_image_surface_t *' (aka 'struct cairo_quartz_image_surface *') to parameter of type 'const cairo_surface_t *' (aka 'const struct _cairo_surface *') [-Wincompatible-pointer-types] if (! _cairo_surface_is_quartz (surface)) { ^~~~~~~ ./cairo-quartz-private.h:87:50: note: passing argument to parameter 'surface' here _cairo_surface_is_quartz (const cairo_surface_t *surface); ^ 1 warning generated. I don't have a way to test quartz, but the warning looked pretty obvious so I went ahead and made a change that should fix it, and pushed all three patches. I'll boldly assume that this bug is solved so am closing it. If when you rebuild, you find it doesn't, then please re-open. (In reply to Bryce Harrington from comment #6) > I don't have a way to test quartz, but the warning looked pretty obvious so > I went ahead and made a change that should fix it, and pushed all three > patches. Thx - clean build now succeeds, and the warning is gone. A quick test using the new cairo lib with inkscape trunk is ok, too. |
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.