Subject: a2ps build fails
To: None <tech-pkg@netbsd.org>
From: Rob Quinn <rquinn@sec.sprint.net>
List: tech-pkg
Date: 04/09/2003 16:04:52
 I have been unable to build a2ps for some time (months?).  I know it works for
others since I have the binary package installed.  Below are the errors from
today, with a pkgsrc udpated early this morning.  Since no one else is
complaining, I figure it's something unusual I did.  Ideas?

 a2ps compiles fine on my Solaris2.8 box with lang/gcc3 installed, so I tried
the same on my NetBSD box ("make CC=/usr/pkg/gcc3-3....") but it failed in many
different ways that seemed to be about missing includes (stdlib.h and
locale.h).  In several files (like intl/localealias.c) an "#ifndef memcpy" test
defined memcpy to be dbcopy, which caused problems in the code expecting to use
memcpy's return value.

   # ifndef memcpy
   #  define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
   # endif



#uname -a
NetBSD strikeXXXXXX 1.6Q NetBSD 1.6Q (STRIKE) #148: Wed Apr  9 09:40:51 EDT 2003  rquinn@strikeXXXX:/usr/obj/STRIKE i386

#make
=> Checksum OK for a2ps-4.13b.tar.gz.
work -> /usr/obj/pkg/print/a2ps/work
===> Extracting for a2ps-4.13.0.2nb2
===> Required installed package papersize>=1.0.2: papersize-1.0.4 found
===> Required installed package psutils>=1.17: psutils-1.17nb1 found
===> Required installed package perl>=5.0: perl-5.6.1nb7 found
===> Required installed package gmake>=3.78: gmake-3.80nb1 found
===> Required installed package libtool-base>=1.4.20010614nb11: libtool-base-1.4.20010614nb14 found
===> Patching for a2ps-4.13.0.2nb2
===> Applying pkgsrc patches for a2ps-4.13.0.2nb2
===> Buildlinking for a2ps-4.13.0.2nb2
[...clipped....]
mkdir .libs
cc -DHAVE_CONFIG_H -DLOCALEDIR=\"/usr/pkg/share/locale\" -DSYSCONFFILE=\"/usr/pk
g/etc/a2ps.cfg\" -I.. -I../intl -I. -I/usr/obj/pkg/print/a2ps/work/.buildlink/in
clude -O2 -I/usr/obj/pkg/print/a2ps/work/.buildlink/include -c encoding.c -Wp,-M
D,.deps/encoding.TPlo  -fPIC -DPIC -o .libs/encoding.o
In file included from jobs.h:38,
                 from encoding.c:30:
media.h:68: parse error before `a2ps_medium_libpaper_p'
media.h:69: warning: data definition has no type or storage class
In file included from jobs.h:44,
                 from encoding.c:30:
printers.h:89: parse error before `a2ps_printers_add'
printers.h:91: warning: data definition has no type or storage class
printers.h:103: parse error before `_Bool'
printers.h:106: parse error before `a2ps_printers_flag_output_is_printer_get'
printers.h:107: warning: data definition has no type or storage class
In file included from encoding.c:30:
jobs.h:97: parse error before `_Bool'
jobs.h:97: warning: no semicolon at end of struct or union
jobs.h:105: parse error before `debug'
jobs.h:105: warning: data definition has no type or storage class
jobs.h:156: parse error before `}'
jobs.h:156: warning: data definition has no type or storage class
encoding.c: In function `load_encodings_map':
encoding.c:165: dereferencing pointer to incomplete type
encoding.c: In function `load_main_encodings_map':
encoding.c:177: dereferencing pointer to incomplete type
encoding.c:182: dereferencing pointer to incomplete type
encoding.c: At top level:
encoding.c:534: parse error before `*'
encoding.c: In function `load_encoding_description_file':
encoding.c:556: `job' undeclared (first use in this function)
encoding.c:556: (Each undeclared identifier is reported only once
encoding.c:556: for each function it appears in.)
encoding.c: In function `encoding_output_ps_vector':
encoding.c:675: dereferencing pointer to incomplete type
encoding.c:677: dereferencing pointer to incomplete type
encoding.c:682: dereferencing pointer to incomplete type
encoding.c:683: dereferencing pointer to incomplete type
encoding.c:685: dereferencing pointer to incomplete type
encoding.c:686: dereferencing pointer to incomplete type
encoding.c: In function `encoding_setup':
encoding.c:870: dereferencing pointer to incomplete type
encoding.c:877: warning: unreachable code at beginning of switch statement
encoding.c: In function `encoding_add':
encoding.c:904: dereferencing pointer to incomplete type
encoding.c: At top level:
encoding.c:923: parse error before `*'
encoding.c: In function `encoding_build_faces_wx':
encoding.c:924: number of arguments doesn't match prototype
encoding.h:78: prototype declaration
encoding.c:933: `job' undeclared (first use in this function)
encoding.c: In function `encoding_get':
encoding.c:955: dereferencing pointer to incomplete type
encoding.c:960: dereferencing pointer to incomplete type
encoding.c: In function `get_encoding_by_alias':
encoding.c:973: dereferencing pointer to incomplete type
encoding.c: In function `dump_encodings_setup':
encoding.c:994: dereferencing pointer to incomplete type
encoding.c: At top level:
encoding.c:1010: parse error before `*'
encoding.c: In function `char_WX':
encoding.c:1011: number of arguments doesn't match prototype
encoding.h:44: prototype declaration
encoding.c:1013: `job' undeclared (first use in this function)
encoding.c:1013: `c' undeclared (first use in this function)
encoding.c:1024: warning: unreachable code at beginning of switch statement
encoding.c: At top level:
encoding.c:1081: parse error before `*'
encoding.c: In function `string_WX':
encoding.c:1082: number of arguments doesn't match prototype
encoding.h:45: prototype declaration
encoding.c:1085: `string' undeclared (first use in this function)
encoding.c:1086: `job' undeclared (first use in this function)
encoding.c: In function `set_encoding':
encoding.c:1097: dereferencing pointer to incomplete type
encoding.c: At top level:
encoding.c:1113: parse error before `*'
encoding.c: In function `list_encodings_short':
encoding.c:1114: number of arguments doesn't match prototype
encoding.h:88: prototype declaration
encoding.c:1115: `stream' undeclared (first use in this function)
encoding.c:1117: `job' undeclared (first use in this function)
encoding.c: At top level:
encoding.c:1124: parse error before `*'
encoding.c: In function `list_encodings_long':
encoding.c:1125: number of arguments doesn't match prototype
encoding.h:89: prototype declaration
encoding.c:1130: `job' undeclared (first use in this function)
encoding.c:1136: `stream' undeclared (first use in this function)
encoding.c: At top level:
encoding.c:1170: parse error before `*'
encoding.c: In function `list_texinfo_encodings_long':
encoding.c:1171: number of arguments doesn't match prototype
encoding.h:91: prototype declaration
encoding.c:1176: `job' undeclared (first use in this function)
encoding.c:1182: `stream' undeclared (first use in this function)
gmake[2]: *** [encoding.lo] Error 1
gmake[2]: Leaving directory `/usr/obj/pkg/print/a2ps/work/a2ps-4.13/lib'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/obj/pkg/print/a2ps/work/a2ps-4.13'
gmake: *** [all-recursive-am] Error 2
*** Error code 2

Stop.
make: stopped in /usr/pkgsrc/print/a2ps
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/print/a2ps