Subject: xsrc/24783: Build in src/x11 makes mkfontscale and fc-cache dump core
To: None <>
From: None <>
List: netbsd-bugs
Date: 03/15/2004 00:31:13
>Number:         24783
>Category:       xsrc
>Synopsis:       Build in src/x11 makes mkfontscale and fc-cache dump core
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 15 00:32:00 UTC 2004
>Originator:     Krister Walfridsson
>Release:        NetBSD 1.6.2
NetBSD pc2 1.6.2 NetBSD 1.6.2 (GENERIC) #0: Tue Feb 10 21:53:10 UTC 2004 i386
Architecture: i386
Machine: i386
Building X11 using " -x" on NetBSD/i386 1.6.2 fails due to
mkfontscale dumping core (and if you hack around this, you
fail at a later point from fc-cache dumping core).

The error goes away if you compile ftgzip.c without optimization.
I have not analyzed what goes wrong (because ftgzip.c is a nasty
file that includes a modified version of the libz source code...)
But it is possible to compile this file so that it uses the normal
libz instead, in which case the result seems to work without

Note that mkfontscale already links with libz, so this built-in
libz code is unnecessary bloat anyway.

./ -u -U -x -m i386 release
Index: mkfontscale/Makefile
RCS file: /cvsroot/src/x11/tools/mkfontscale/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- mkfontscale/Makefile        6 Mar 2004 02:55:20 -0000       1.1
+++ mkfontscale/Makefile        15 Mar 2004 00:20:39 -0000
@@ -56,6 +56,8 @@
 SRCS=  ${SRCS.mkfontscale} ${SRCS.freetype} ${SRCS.fontenc}
 LDADD= -lz
Index: fc-cache/Makefile
RCS file: /cvsroot/src/x11/tools/fc-cache/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- fc-cache/Makefile   6 Mar 2004 02:55:20 -0000       1.5
+++ fc-cache/Makefile   15 Mar 2004 00:20:40 -0000
@@ -57,5 +57,10 @@
 # resource fork font support which needs the carbon libraries.
+LDADD= -lz
 .include <>
 .include <>