Subject: pkg/28655: graphics/gd doesn't compile on pkgsrc-current
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Wouter Schoot <ascent@schoot.org>
List: pkgsrc-bugs
Date: 12/14/2004 13:43:00
>Number:         28655
>Category:       pkg
>Synopsis:       graphics/gd doesn't compile on amd64/2.0-release
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 14 13:43:00 +0000 2004
>Originator:     Wouter Schoot <ascent@schoot.org>
>Release:        NetBSD 2.0
>Organization:

>Environment:
	
	
System: NetBSD ascent 2.0 NetBSD 2.0 (ASCENT) #1: Sun Dec 12 17:48:59 CET 2004 root@ascwin:/usr/obj/sys/arch/amd64/compile/ASCENT amd64
Architecture: x86_64
Machine: amd64
>Description:
I tried to install graphics/gd for webalizer, but it failed. I run NetBSD 2.0 release and use the amd64 port.

This is the output:


Script started on Tue Dec 14 14:08:53 2004
[root@ascent /usr/pkgsrc/graphics/gd]# make
===> *** No /usr/pkgsrc/distfiles/pkg-vulnerabilities file found,
===> *** skipping vulnerability checks. To fix, install
===> *** the pkgsrc/security/audit-packages package and run
===> *** '/usr/pkg/sbin/download-vulnerability-list'.
=> Checksum OK for gd-2.0.33.tar.gz.
===> Extracting for gd-2.0.33
===> Required installed package freetype2>=2.1.9nb1: freetype2-2.1.9nb1 found
===> Required installed package jpeg>=6bnb2: jpeg-6bnb3 found
===> Required installed package png>=1.2.6nb1: png-1.2.8 found
===> Required installed package libtool-base>=1.5.10nb6: libtool-base-1.5.10nb6 found
===> Patching for gd-2.0.33
===> Overriding tools for gd-2.0.33
===> Creating toolchain wrappers for gd-2.0.33
===> Configuring for gd-2.0.33
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
checking for gawk... /usr/bin/awk
checking whether make sets $(MAKE)... yes
checking for x86_64--netbsd-strip... no
checking for strip... strip
checking for x86_64--netbsd-gcc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of cc... gcc3
checking for x86_64--netbsd-gcc... (cached) cc
checking whether we are using the GNU C compiler... (cached) yes
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ANSI C... (cached) none needed
checking dependency style of cc... (cached) gcc3
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking build system type... x86_64-unknown-netbsd2.0
checking host system type... x86_64--netbsd
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... nm
checking for a sed that does not truncate output... /usr/bin/sed
checking whether ln -s works... yes
checking how to recognise dependent libraries... match_pattern /lib[^/\.]+\.so$
checking command to parse nm output... ok
checking how to run the C preprocessor... cc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for x86_64--netbsd-ranlib... no
checking for ranlib... ranlib
checking for x86_64--netbsd-strip... strip
checking for objdir... .libs
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.lo... yes
checking if cc supports -fno-rtti -fno-exceptions... no
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... NetBSD ld.elf_so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether -lc should be explicitly linked in... yes
creating libtool
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for x86_64--netbsd-ranlib... ranlib
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for ANSI C header files... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for iconv... yes
checking for iconv declaration... 
         extern size_t iconv (iconv_t cd, const char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking whether iconv.h defines iconv_t... yes
checking for sin... no
checking for sin in -lm... yes
checking for deflate in -lz... yes
checking for libpng12-config... no
checking for libpng-config... no
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_create_read_struct in -lpng... yes
checking for freetype-config... /usr/pkg/bin/freetype-config
checking for FT_Init_FreeType in -lfreetype... yes
checking ft2build.h usability... yes
checking ft2build.h presence... yes
checking for ft2build.h... yes
checking for FcInit in -lfontconfig... yes
checking for jpeg_set_defaults in -ljpeg... yes
checking for XpmReadFileToXpmImage in -lXpm... yes
checking for pthread_join in LIBS= with CFLAGS= -pthread ... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for cc_r... cc

** Configuration summary for gd 2.0.33:

   Support for PNG library:          yes
   Support for JPEG library:         yes
   Support for Freetype 2.x library: yes
   Support for Fontconfig library:   yes
   Support for Xpm library:          yes
   Support for pthreads:             yes

configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/Makefile
config.status: creating config/gdlib-config
config.status: creating test/Makefile
config.status: creating config.h
config.status: executing depfiles commands
===> Building for gd-2.0.33
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
/usr/bin/make  all-recursive
Making all in config
cd .. && /bin/sh ./config.status config/gdlib-config
config.status: creating config/gdlib-config
Making all in test
 /bin/sh ./config.status
config.status: creating Makefile
config.status: creating config/Makefile
config.status: creating config/gdlib-config
config.status: creating test/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
if /bin/sh ./libtool --mode=compile cc -DHAVE_CONFIG_H  -I. -I. -I.   -I/usr/pkg/include/freetype2 -I/usr/pkg/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include -I/usr/include -I/usr/X11R6/include   -O2 -pthread -I/usr/pkg/include/freetype2 -I/usr/pkg/include -I/usr/include -MT gd.lo -MD -MP -MF ".deps/gd.Tpo" -c -o gd.lo gd.c;  then mv -f ".deps/gd.Tpo" ".deps/gd.Plo"; else rm -f ".deps/gd.Tpo"; exit 1; fi
mkdir .libs
 cc -DHAVE_CONFIG_H -I. -I/usr/pkgsrc/graphics/gd/work/.buildlink/include/freetype2 -I/usr/pkgsrc/graphics/gd/work/.buildlink/include -O2 -pthread -MT gd.lo -MD -MP -MF .deps/gd.Tpo -c gd.c  -fPIC -DPIC -o .libs/gd.o
 cc -DHAVE_CONFIG_H -I. -I/usr/pkgsrc/graphics/gd/work/.buildlink/include/freetype2 -I/usr/pkgsrc/graphics/gd/work/.buildlink/include -O2 -pthread -MT gd.lo -MD -MP -MF .deps/gd.Tpo -c gd.c -o gd.o >/dev/null 2>&1

<snip>

 cc -DHAVE_CONFIG_H -I. -I/usr/pkgsrc/graphics/gd/work/.buildlink/include/freetype2 -I/usr/pkgsrc/graphics/gd/work/.buildlink/include -O2 -pthread -MT gdfontt.lo -MD -MP -MF .deps/gdfontt.Tpo -c gdfontt.c -o gdfontt.o >/dev/null 2>&1
if /bin/sh ./libtool --mode=compile cc -DHAVE_CONFIG_H  -I. -I. -I.   -I/usr/pkg/include/freetype2 -I/usr/pkg/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include -I/usr/include -I/usr/X11R6/include   -O2 -pthread -I/usr/pkg/include/freetype2 -I/usr/pkg/include -I/usr/include -MT gdft.lo -MD -MP -MF ".deps/gdft.Tpo" -c -o gdft.lo gdft.c;  then mv -f ".deps/gdft.Tpo" ".deps/gdft.Plo"; else rm -f ".deps/gdft.Tpo"; exit 1; fi
 cc -DHAVE_CONFIG_H -I. -I/usr/pkgsrc/graphics/gd/work/.buildlink/include/freetype2 -I/usr/pkgsrc/graphics/gd/work/.buildlink/include -O2 -pthread -MT gdft.lo -MD -MP -MF .deps/gdft.Tpo -c gdft.c  -fPIC -DPIC -o .libs/gdft.o
gdft.c:1366:35: fontconfig/fontconfig.h: No such file or directory
gdft.c:1429: error: parse error before '*' token
gdft.c:1429: error: parse error before '*' token
gdft.c: In function `find_font':
gdft.c:1431: error: `FcResult' undeclared (first use in this function)
gdft.c:1431: error: (Each undeclared identifier is reported only once
gdft.c:1431: error: for each function it appears in.)
gdft.c:1431: error: parse error before "result"
gdft.c:1433: error: `pattern' undeclared (first use in this function)
gdft.c:1433: error: `FcMatchPattern' undeclared (first use in this function)
gdft.c:1434: error: `FcMatchFont' undeclared (first use in this function)
gdft.c:1437: error: `result' undeclared (first use in this function)
gdft.c:1437: warning: return makes pointer from integer without a cast
gdft.c: At top level:
gdft.c:1442: error: parse error before '*' token
gdft.c: In function `find_postscript_font':
gdft.c:1444: error: `FcPattern' undeclared (first use in this function)
gdft.c:1444: error: `font' undeclared (first use in this function)
gdft.c:1447: error: `fontpattern' undeclared (first use in this function)
gdft.c:1449: error: `fontname' undeclared (first use in this function)
gdft.c:1450: error: `FcChar8' undeclared (first use in this function)
gdft.c:1450: error: `family' undeclared (first use in this function)
gdft.c:1452: error: `pattern' undeclared (first use in this function)
gdft.c:1454: error: `FC_FAMILY' undeclared (first use in this function)
gdft.c:1454: error: `FcTypeString' undeclared (first use in this function)
gdft.c:1455: error: `FC_STYLE' undeclared (first use in this function)
gdft.c:1460: error: `FcResultMatch' undeclared (first use in this function)
gdft.c: In function `font_pattern':
gdft.c:1479: error: `FcPattern' undeclared (first use in this function)
gdft.c:1479: error: `font' undeclared (first use in this function)
gdft.c:1480: error: `FcChar8' undeclared (first use in this function)
gdft.c:1480: error: `file' undeclared (first use in this function)
gdft.c:1481: error: `pattern' undeclared (first use in this function)
gdft.c:1494: error: parse error before "FcChar8"
gdft.c:1501: error: `FC_FILE' undeclared (first use in this function)
gdft.c:1501: error: `FcResultMatch' undeclared (first use in this function)
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/graphics/gd/work/gd-2.0.33
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/graphics/gd/work/gd-2.0.33
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/graphics/gd/work/gd-2.0.33
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/graphics/gd
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/graphics/gd
[root@ascent /usr/pkgsrc/graphics/gd]# 
Script done on Tue Dec 14 14:10:12 2004
It complains about fontconfig/fontconfig.h, which comes with the fontconfig-2.2.96 package. I have that one installed as well, and also the file exist:

[root@ascent /usr/pkgsrc/fonts/fontconfig]# pkg_info | grep font
fontconfig-2.2.96nb1 Library for configuring and customizing font access

[root@ascent /usr/pkgsrc/fonts/fontconfig]# ls -l /usr/pkg/include/fontconfig/fontconfig.h
-r--r--r--  1 root  wheel  18517 Dec 14 14:07 /usr/pkg/include/fontconfig/fontconfig.h

[root@ascent /usr/pkgsrc/graphics/gd]# file /usr/pkg/include/fontconfig/fontconfig.h
/usr/pkg/include/fontconfig/fontconfig.h: ISO-8859 C program text

>How-To-Repeat:
cd /usr/pkgsrc/graphics/gd; make
>Fix: