NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
xsrc/40503: build of freetype fails when USE_FORT=yes is defined
>Number: 40503
>Category: xsrc
>Synopsis: build of freetype fails when USE_FORT=yes is defined
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: xsrc-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 28 11:55:00 +0000 2009
>Originator: George Abdelmalik
>Release: 5.0_RC1
>Organization:
ADS
>Environment:
NetBSD bart.fork.id.au 4.99.73 NetBSD 4.99.73 (BART) #0: Thu Oct 23 22:40:26
EST 2008
srcmstr%bart.fork.id.au@localhost:/vstore/netbsd-current/obj/sys/arch/amd64/compile/BART
amd64
>Description:
# compile freetype/ftgzip.o
/vstore/netbsd-5/src/../tools/bin/x86_64--netbsd-gcc -O2 -Werror -fPIC -DPIC
-fstack-protector -Wstack-protector --param ssp-buffer-size=1
-fno-strict-aliasing -DFT_CONFIG_OPTION_SYSTEM_ZLIB
-DFT_CONFIG_CONFIG_H="<ftconfig.h>" -DFT2_BUILD_LIBRARY
-DFT_CONFIG_MODULES_H="<ftmodule.h>"
-I/vstore/netbsd-5/src/../dest/usr/X11R7/include/freetype2
-I/vstore/netbsd-5/src/../dest/usr/X11R7/include/freetype2/freetype/config
-I/vstore/netbsd-5/src/../xsrc/external/mit/freetype/dist/include
-D_FORTIFY_SOURCE=2 -DNO_ALLOCA -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO
-I/vstore/netbsd-5/src/../dest/usr/X11R7/include -D__AMD64__ -nostdinc
-isystem /vstore/netbsd-5/src/../dest/usr/include -c
/vstore/netbsd-5/src/../xsrc/external/mit/freetype/dist/src/gzip/ftgzip.c -o
ftgzip.o
/vstore/netbsd-5/src/../xsrc/external/mit/freetype/dist/src/gzip/ftgzip.c:359:48:
error: macro "read" passed 4 arguments, but takes just 3
cc1: warnings being treated as errors
/vstore/netbsd-5/src/../xsrc/external/mit/freetype/dist/src/gzip/ftgzip.c: In
function 'ft_gzip_file_fill_input':
/vstore/netbsd-5/src/../xsrc/external/mit/freetype/dist/src/gzip/ftgzip.c:358:
warning: assignment makes integer from pointer without a cast
*** Failed target: ftgzip.o
*** Failed command: /vstore/netbsd-5/src/../tools/bin/x86_64--netbsd-gcc -O2
-Werror -fPIC -DPIC -fstack-protector -Wstack-protector --param
ssp-buffer-size=1 -fno-strict-aliasing -DFT_CONFIG_OPTION_SYSTEM_ZLIB
-DFT_CONFIG_CONFIG_H="<ftconfig.h>" -DFT2_BUILD_LIBRARY
-DFT_CONFIG_MODULES_H="<ftmodule.h>"
-I/vstore/netbsd-5/src/../dest/usr/X11R7/include/freetype2
-I/vstore/netbsd-5/src/../dest/usr/X11R7/include/freetype2/freetype/config
-I/vstore/netbsd-5/src/../xsrc/external/mit/freetype/dist/include
-D_FORTIFY_SOURCE=2 -DNO_ALLOCA -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO
-I/vstore/netbsd-5/src/../dest/usr/X11R7/include -D__AMD64__ -nostdinc -isystem
/vstore/netbsd-5/src/../dest/usr/include -c
/vstore/netbsd-5/src/../xsrc/external/mit/freetype/dist/src/gzip/ftgzip.c -o
ftgzip.o
*** Error code 1
Stop.
nbmake: stopped in /vstore/netbsd-5/src/external/mit/xorg/lib/freetype
Problem seems that the macro defined for 'read' in ssp/unistd.h substitutes a
call to presumably some function pointer of the same name which is not intended
to be the 'read' function of unistd.h fame.
>How-To-Repeat:
Run build.sh with USE_FORT=yes defined in mk.conf.
>Fix:
Without knowing if such erroneous ssp macro substitutions means that it is not
possible to have freetype fortified, and in order to get my build.sh to
complete, I chose simply to inhibit fortification if the user requests it.
My patch to its Makefile is as follows.
Index: freetype/Makefile
===================================================================
RCS file: /cvsroot/src/external/mit/xorg/lib/freetype/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- freetype/Makefile 25 Oct 2008 13:14:49 -0000 1.3
+++ freetype/Makefile 28 Jan 2009 11:49:52 -0000
@@ -87,6 +87,13 @@
CPPFLAGS+= -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
.endif
+# Freetype doesn't compile when _FORTIFY_SOURCE > 0 is defined, so
+# deactivate USE_FORT if the user specified it in their mk.conf
+#
+.if defined(USE_FORT) && ${USE_FORT} != "no"
+USE_FORT= no
+.endif
+
LIBDPLIBS= \
z ${.CURDIR}/../../../../../lib/libz
Home |
Main Index |
Thread Index |
Old Index