Bug 691126 - build fails with gdevcups.c:2709: 'ppd_attr_t' undeclared on RH Linux 9
build fails with gdevcups.c:2709: 'ppd_attr_t' undeclared on RH Linux 9
Status: RESOLVED WONTFIX
Product: Ghostscript
Classification: Unclassified
Component: CUPS driver
8.71
PC Linux
: P4 minor
Assigned To: Michael Sweet
Bug traffic
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-19 19:35 UTC by William Bader
Modified: 2010-02-22 08:29 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Bader 2010-02-19 19:35:54 UTC
On an old RH Linux 9 system, configure detects cups and reports:
checking for cups-config... /usr/bin/cups-config

rpm on this system reports:
gimp-print-cups-4.2.4-5
qtcups-2.0-15
cups-1.1.17-13.3
cups-devel-1.1.17-13.3
qtcups-devel-2.0-15
cups-libs-1.1.17-13.3

Would it be possible for the configure script to test whether ppd.h defines
ppd_attr_t?
My ppd.h has #define PPD_VERSION 4.3 and my cups.h has
cups.h:#  define CUPS_VERSION           1.0117
cups.h:#  define CUPS_VERSION_MAJOR     1
cups.h:#  define CUPS_VERSION_MINOR     1
cups.h:#  define CUPS_VERSION_PATCH     17

This is how the make ends:
gcc  -DHAVE_MKSTEMP -DHAVE_HYPOT -DHAVE_FILE64 -DHAVE_MKSTEMP64
-DHAVE_FONTCONFIG -O2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations
-Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing
-Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H
-DGX_COLOR_INDEX_TYPE="unsigned long long"  -O2 -ffast-math -fomit-frame-pointer
-pipe  -I./obj -I./base  -O2 -ffast-math -fomit-frame-pointer -pipe -o
./obj/gdevcups.o -c cups/gdevcups.c
cups/gdevcups.c: In function 'cups_put_params':
cups/gdevcups.c:2709: error: 'ppd_attr_t' undeclared (first use in this function)
cups/gdevcups.c:2709: error: (Each undeclared identifier is reported only once
cups/gdevcups.c:2709: error: for each function it appears in.)
cups/gdevcups.c:2709: error: 'backside' undeclared (first use in this function)
cups/gdevcups.c:2710: error: 'backsiderequiresflippedmargins' undeclared (first
use in this function)
cups/gdevcups.c:2710: warning: left-hand operand of comma expression has no effect
cups/gdevcups.c:2710: warning: statement with no effect
cups/gdevcups.c:2711: warning: ISO C90 forbids mixed declarations and code
cups/gdevcups.c:2940: warning: implicit declaration of function 'ppdFindAttr'
cups/gdevcups.c:2714: warning: unused variable 'found'
cups/gdevcups.c:2698: warning: unused variable 'floatval'
cups/gdevcups.c: In function 'cups_print_chunked':
cups/gdevcups.c:3735: error: 'ppd_attr_t' undeclared (first use in this function)
cups/gdevcups.c:3735: error: 'backside' undeclared (first use in this function)
cups/gdevcups.c: In function 'cups_print_banded':
cups/gdevcups.c:3955: error: 'ppd_attr_t' undeclared (first use in this function)
cups/gdevcups.c:3955: error: 'backside' undeclared (first use in this function)
make: *** [obj/gdevcups.o] Error 1
Comment 1 Michael Sweet 2010-02-19 20:39:49 UTC
CUPS 1.1.17 is too old (over 7 years old) to use the current gdevcups code.
Comment 2 William Bader 2010-02-22 08:29:56 UTC
I was only hoping that configure would realize that cups was too old and disable
it from the build.  Most of my systems don't have the cups libraries, so
configure automatically disables cups.  One of my older systems has almost every
rpm loaded, and the presence of the old cups libraries broke the build.  It was
easy enough to add --disable-cups to the configure line, but it is one more
special thing to remember, and it would have been nicer if configure would have
given me a warning that the cups libraries were version X and gs requires
version Y or higher.