Bug 687506

Summary: building gs8.30 fails on SuSE 7.x
Product: Ghostscript Reporter: Martin Schröder <martin>
Component: Build ProcessAssignee: Ralph Giles <ralph.giles>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P2    
Version: master   
Hardware: Other   
OS: Linux   
Customer: Word Size: ---
Attachments: config.log
Output of make

Description Martin Schröder 2004-06-08 05:35:11 UTC
On two SuSE 7.x systems building gs8.30 (after a simple configure) fails with 
In file included from jasper/src/libjasper/include/jasper/jas_types.h:111, 
                 from jasper/src/libjasper/include/jasper/jasper.h:66, 
                 from src/sjpx.h:27, 
                 from ./src/zfjpx.c:34: 
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdbool.h:14: warning: `false' 
redefined 
src/stdpre.h:298: warning: this is the location of the previous definition 
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdbool.h:15: warning: `true' 
redefined 
src/stdpre.h:300: warning: this is the location of the previous definition 
In file included from jasper/src/libjasper/include/jasper/jas_types.h:111, 
                 from jasper/src/libjasper/include/jasper/jasper.h:66, 
                 from src/sjpx.h:27, 
                 from ./src/zfjpx.c:34: 
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdbool.h:9: parse error 
before `(' 
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdbool.h:11: conflicting 
types for `bool' 
src/stdpre.h:288: previous declaration of `bool' 
make: *** [obj/zfjpx.o] Error 1
Comment 1 Martin Schröder 2004-06-08 05:36:44 UTC
Created attachment 710 [details]
config.log
Comment 2 Martin Schröder 2004-06-08 05:40:53 UTC
Created attachment 711 [details]
Output of make
Comment 3 Ralph Giles 2004-06-16 02:59:20 UTC
Ah, the horrors of C portability.

This is a conflict between the jasper build system, which tries to use stdbool.h
and the Ghostscript build system, which rolls its own definition. the glue code
in zfjpx.c needs to include both.

The correct fix is probably to internalize a bunch of the jasper headers so they
don't pollute the namespace.

The workaround is to move the jasper source out of the way, compile and install
the library separately, and then reconfigure ghostscript to link to the shared
verison.
Comment 4 Ralph Giles 2004-06-16 03:10:58 UTC
I've opened bug 687518 against jasper to track the cleanup issue. My guess is we
didn't see this on newer gcc because gcclib is now using int for _Bool?

Thanks for the report.

*** This bug has been marked as a duplicate of 687518 ***