[cairo] bug trying to upgrade cairo from cairo-1.8.10_1, 1 to cairo-1.10.0_3, 1 on FreeBSD 6.3

Benjamin Ward ben at forward.net.au
Thu Nov 25 17:07:43 PST 2010


On 26/11/2010, at 12:01 AM, M Joonas Pihlaja wrote:

> 
> Hi Ben,
> 
> On Thu, 25 Nov 2010, ben ward wrote:
> 
>>  CC     cairo-bentley-ottmann.lo
>> cairo-bentley-ottmann.c: In function `edges_compare_x_for_y_general':
>> cairo-bentley-ottmann.c:425: internal compiler error: in expand_mult, at
>> expmed.c:2653
>> Please submit a full bug report,
>> with preprocessed source if appropriate.
> 
> This looks like flaky __uint128_t support in gcc 3.4.  Could you try
> the patch below to see if it fixes the problem for you?
> 
> Joonas
> 
> diff --git a/src/cairo-wideint-type-private.h b/src/cairo-wideint-type-private.h
> index 4c910ed..2d23d17 100644
> --- a/src/cairo-wideint-type-private.h
> +++ b/src/cairo-wideint-type-private.h
> @@ -121,6 +121,11 @@ typedef struct _cairo_quorem64 {
>     cairo_int64_t      rem;
> } cairo_quorem64_t;
> 
> +/* Intrinsic __uint128_t support is broken on gcc 3.4/sparc. */
> +#if __GNUC__ == 3 && __GNUC_MINOR__ == 4
> +#undef HAVE___UINT128_T
> +#endif
> +
> /* gcc has a non-standard name. */
> #if HAVE___UINT128_T && !HAVE_UINT128_T
> typedef __uint128_t uint128_t;
> 

Hi Joonas,

thanks for the patch. but unfortunately I am having trouble applying it. I preface this with note that im not at all experienced with patching ports so please forgive if im asking the bleeding obvious. 

Not sure if you are a FreeBSD person but patches to ports are in a in a different format. This may now not 
be a "cairo" question but a "how do you patch FreeBSD" question. (I have posted a question on the freeBSD forums)


Anyway the current set of cairo patches are:

[root at hushus /usr/ports/graphics/cairo/files]# ls    
patch-src_cairo-xlib-display.c		patch-src_cairo.h			patch-src_cairoint.h

Looking at one:

[root at hushus /usr/ports/graphics/cairo/files]# less patch-src_cairo.h
--- src/cairo.h.orig    2010-10-29 16:27:48.000000000 +0200
+++ src/cairo.h 2010-10-29 16:28:07.000000000 +0200
@@ -1973,7 +1973,7 @@ typedef enum _cairo_device_type {
     CAIRO_DEVICE_TYPE_SCRIPT,
     CAIRO_DEVICE_TYPE_XCB,
     CAIRO_DEVICE_TYPE_XLIB,
-    CAIRO_DEVICE_TYPE_XML,
+    CAIRO_DEVICE_TYPE_XML
 } cairo_device_type_t;
 
 cairo_public cairo_device_type_t
patch-src_cairo.h (END) 


i named your patch files/patch-src_cairo-wideint-type-private.h and re-ran make. but i got this error

===>  Patching for cairo-1.10.0_3,1
===>   cairo-1.10.0_3,1 depends on package: libtool>=2.2 - found
===>  Applying FreeBSD patches for cairo-1.10.0_3,1
File to patch: src/cairo-wideint-type-private.h                                   
patch: **** malformed patch at line 12:     +#endif
=> Patch patch-src_cairo-wideint-type-private.h failed to apply cleanly.
*** Error code 1

I then tired to edit out the diff --git lines and change the formatting so that it matched the patches in files. but still no luck.

patch: **** malformed patch at line 10:     +#endif
=> Patch patch-src_cairo-wideint-type-private.h failed to apply cleanly.
*** Error code 1



Any thoughts?




More information about the cairo mailing list