ports/183536: [patch] fontconfig on armv6

Matthieu Volat mazhe at alkumuna.eu
Thu Oct 31 19:40:05 UTC 2013


>Number:         183536
>Category:       ports
>Synopsis:       [patch] fontconfig on armv6
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 31 19:40:05 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Matthieu Volat
>Release:        10-BETA1
>Organization:
>Environment:
>Description:
x11-fonts/fontconfig was reported to segfault a while ago when built with clang on the arm architecture.

at the time, the proposed workaround was to build it with gcc, but this is not working anymore on freebsd 10 : lang/gcc is not buildable yet on the arm platform.

I've investigated the real problem, this is a segfault when calling the random() function in the FcRandom() function, located in src/fccompat.c
>How-To-Repeat:
=> build fontconfig on arm target with freebsd 10
>Fix:
Here's another, not perfect but working, fix :

--- src/fccompat.c.orig	2013-10-31 19:16:42.000000000 +0000
+++ src/fccompat.c	2013-10-31 19:15:57.000000000 +0000
@@ -182,7 +182,7 @@
     }
 
     random_r(&fcrandbuf, &result);
-#elif HAVE_RANDOM
+#elif HAVE_RANDOM && !defined(__arm__)
     static char statebuf[256];
     char *state;
     static FcBool initialized = FcFalse;

When applied, USE_GCC can be removed and fontconfig segfault is not obversable anymore.

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list