gtk doesn't compile with cups 1.3.0

Brett Goulder predatorfreak at dcaf-security.org
Tue Aug 28 23:19:19 UTC 2007


On Wed, 29 Aug 2007 01:34:54 +0200
Hannes Mayer wrote:

> Hi.
> GTK doesn't compile with the new cups 1.3.0
> 
>  
> gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../.. -I../../../gtk
> -I../../../gtk -I../../../gdk -I../../../gdk
> -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED -pthread
> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
> -I/usr/include/pango-1.0 -I/usr/include/cairo
> -I/usr/include/freetype2 -I/usr/include/libpng12
> -I/usr/include/atk-1.0 -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED
> -march=k8 -m32 -msse3 -O2 -pipe -fomit-frame-pointer -Wall -MT
> gtkcupsutils.lo -MD -MP -MF .deps/gtkcupsutils.Tpo -c gtkcupsutils.c
> -fPIC -DPIC -o .libs/gtkcupsutils.o gtkcupsutils.c: In function
> '_post_send': gtkcupsutils.c:631: error: dereferencing pointer to
> incomplete type gtkcupsutils.c: In function '_get_send':
> gtkcupsutils.c:970: error: dereferencing pointer to incomplete type
> make[4]: *** [gtkcupsutils.lo] Error 1 make[4]: Leaving directory
> `/usr/ports/opt/gtk/work/src/gtk+-2.10.14/modules/printbackends/cups'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory 
> `/usr/ports/opt/gtk/work/src/gtk+-2.10.14/modules/printbackends'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory
> `/usr/ports/opt/gtk/work/src/gtk+-2.10.14/modules' make[1]: ***
> [all-recursive] Error 1 make[1]: Leaving directory
> `/usr/ports/opt/gtk/work/src/gtk+-2.10.14' make: *** [all] Error 2
> 
> 
> I've tried to fix it, but it doesn't work:
> 
> --- gtk+-2.10.14/modules/printbackends/cups/gtkcupsutils.c.orig
> 2007-07-16 21:45:18.000000000 +0200
> +++ gtk+-2.10.14/modules/printbackends/cups/gtkcupsutils.c
> 2007-08-29 00:55:49.000000000 +0200
> @@ -627,7 +627,9 @@
>    httpClearFields(request->http);
>    httpSetField(request->http, HTTP_FIELD_CONTENT_LENGTH, length);
>    httpSetField(request->http, HTTP_FIELD_CONTENT_TYPE,
> "application/ipp"); -#ifdef HAVE_HTTP_AUTHSTRING
> +#ifdef HAVE_CUPS_API_1_3
> +  httpSetField (request->http, HTTP_FIELD_AUTHORIZATION,
> httpGetAuthString (request->http));
> +#else
>    httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, 
> request->http->authstring);
>  #endif
> 
> @@ -966,7 +968,9 @@
>      }
> 
>    httpClearFields(request->http);
> -#ifdef HAVE_HTTP_AUTHSTRING
> +#ifdef HAVE_CUPS_API_1_3
> +  httpSetField (request->http, HTTP_FIELD_AUTHORIZATION,
> httpGetAuthString (request->http));
> +#else
>    httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, 
> request->http->authstring);
>  #endif
> 
> --- gtk+-2.10.14/acconfig.h.orig        2007-07-16 21:46:25.000000000
> +0200 +++ gtk+-2.10.14/acconfig.h     2007-08-29 00:35:07.000000000
> +0200 @@ -70,6 +70,8 @@
> 
>  #undef HAVE_CUPS_API_1_2
> 
> +#undef HAVE_CUPS_API_1_3
> +
>  /* #undef PACKAGE */
>  /* #undef VERSION */
> 
> --- gtk+-2.10.14/configure.in.orig      2007-07-16 21:46:25.000000000
> +0200 +++ gtk+-2.10.14/configure.in   2007-08-29 01:16:09.000000000
> +0200 @@ -1565,6 +1565,11 @@
>      AC_DEFINE(HAVE_CUPS_API_1_2)
>    fi
> 
> +  if test $CUPS_API_MAJOR -gt 1 -o \
> +          $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 3; then
> +    AC_DEFINE(HAVE_CUPS_API_1_3)
> +  fi
> +
>    AC_SUBST(CUPS_API_MAJOR)
>    AC_SUBST(CUPS_API_MINOR)
>    AC_SUBST(CUPS_CFLAGS)
> 
> 
> Someone with any ideas?
> 
> regards
> Hannes
> 
> 

Try: http://pred.dcaf-security.org/gtk-cups13.patch

I've given that patch to Jaeger as well, but he has yet to apply it.
GTK 2.10.14 built fine with that patch.

-- 
~predatorfreak
GnuPG Public key: http://pred.dcaf-security.org/dcafsec-pub-gpgkey.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.crux.nu/pipermail/crux/attachments/20070828/d20d36bb/attachment.asc>


More information about the CRUX mailing list