Bug 688184 - gs 8.51 - jasper clashes with HP-UX system header, won't build
Summary: gs 8.51 - jasper clashes with HP-UX system header, won't build
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Build Process (show other bugs)
Version: 8.51
Hardware: HP HP-UX
: P4 normal
Assignee: Hin-Tak Leung
URL:
Keywords: bountiable
: 690369 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-02 14:37 UTC by Hin-Tak Leung
Modified: 2010-05-14 05:23 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
/usr/include/sys/_inttypes.h on an HP-UX box (6.03 KB, text/plain)
2005-07-02 14:49 UTC, Hin-Tak Leung
Details
jas_types.h (6.75 KB, text/plain)
2009-08-04 03:00 UTC, Andre Beaud
Details
jas_types.h.patch (3.16 KB, patch)
2009-08-04 03:02 UTC, Andre Beaud
Details | Diff
uncommitted changes from hp.connect ghostscript 8.62 diff (1.10 KB, patch)
2010-05-14 05:10 UTC, Hin-Tak Leung
Details | Diff
uncommitted change from hp.connect jaser 1.900.1 diff (1.92 KB, patch)
2010-05-14 05:13 UTC, Hin-Tak Leung
Details | Diff
tgz of the 6 patches mentioned here. (3.15 KB, application/x-gzip)
2010-05-14 05:23 UTC, Hin-Tak Leung
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hin-Tak Leung 2005-07-02 14:37:33 UTC
gcc error:
=============================================================
In file included from jasper/src/libjasper/include/jasper/jasper.h:66,
                 from ./src/sjpx.h:27,
                 from ./src/zfjpx.c:34:
jasper/src/libjasper/include/jasper/jas_types.h:167: error: conflicting types
for 'int_fast8_t'
/usr/include/sys/_inttypes.h:133: error: previous declaration of 'int_fast8_t'
was here
jasper/src/libjasper/include/jasper/jas_types.h:173: error: conflicting types
for 'uint_fast8_t'
/usr/include/sys/_inttypes.h:136: error: previous declaration of 'uint_fast8_t'
was here
jasper/src/libjasper/include/jasper/jas_types.h:178: error: conflicting types
for 'int_fast16_t'
/usr/include/sys/_inttypes.h:145: error: previous declaration of 'int_fast16_t'
was here
jasper/src/libjasper/include/jasper/jas_types.h:184: error: conflicting types
for 'uint_fast16_t'
/usr/include/sys/_inttypes.h:148: error: previous declaration of 'uint_fast16_t'
was here
*** Error exit code 1
=============================================

HP cc compiler error messages:
=============================================
        cc  -DHAVE_MKSTEMP -DHAVE_HYPOT -O -DSYS_TYPES_HAS_STDINT_TYPES
-DGX_COLOR_INDEX_TYPE="unsigned long long"   -I./src -I./obj -I./obj -I./src 
-Ijasper/src/libjasper/include -DJAS_CONFIGURE -o ./obj/zfjpx.o -c ./src/zfjpx.c
cpp: "jasper/src/libjasper/include/jasper/jas_config_ac.h", line 153: warning
2001: Redefinition of macro inline.
cpp: "/usr/include/stdbool.h", line 10: warning 2001: Redefinition of macro true.
cpp: "/usr/include/stdbool.h", line 11: warning 2001: Redefinition of macro false.
cc: "jasper/src/libjasper/include/jasper/jas_types.h", line 167: error 1584:
Inconsistent type declaration: "int_fast8_t".
cc: "jasper/src/libjasper/include/jasper/jas_types.h", line 173: error 1584:
Inconsistent type declaration: "uint_fast8_t".
cc: "jasper/src/libjasper/include/jasper/jas_types.h", line 178: error 1584:
Inconsistent type declaration: "int_fast16_t".
cc: "jasper/src/libjasper/include/jasper/jas_types.h", line 184: error 1584:
Inconsistent type declaration: "uint_fast16_t".
cc: "jasper/src/libjasper/include/jasper/jas_types.h", line 189: error 1713:
Illegal redeclaration for identifier "int_fast32_t".
cc: "jasper/src/libjasper/include/jasper/jas_types.h", line 195: error 1713:
Illegal redeclaration for identifier "uint_fast32_t".
cc: "jasper/src/libjasper/include/jasper/jas_types.h", line 200: error 1713:
Illegal redeclaration for identifier "int_fast64_t".
cc: "jasper/src/libjasper/include/jasper/jas_types.h", line 206: error 1713:
Illegal redeclaration for identifier "uint_fast64_t".
*** Error exit code 1

Stop.
=============================================
Comment 1 Hin-Tak Leung 2005-07-02 14:43:51 UTC
This is a spin-off of Bug 687360 , see 
http://bugs.ghostscript.com/show_bug.cgi?id=687360#c16

Ralph: how about making this bountiable and let Alex do it?
See bug 687360 comment 30.
Comment 2 Hin-Tak Leung 2005-07-02 14:49:53 UTC
Created attachment 1497 [details]
/usr/include/sys/_inttypes.h on an HP-UX box

/usr/include/sys/_inttypes.h on an HP-UX box, for reference
and where the clashes is.
Comment 3 Ralph Giles 2005-07-07 02:05:58 UTC
*** Bug 688197 has been marked as a duplicate of this bug. ***
Comment 4 Hin-Tak Leung 2005-07-27 08:05:55 UTC
tried cvs 2005-07-26 mid-day, and the problem is still there.
(I read elsewhere that there are some compilation change/improvement 
beyond 8.51, but apparently not related). 
Comment 5 Ralph Giles 2007-10-24 16:39:35 UTC
Hin-Tak, do you still have access to an HP-UX machine? I've made the bug
bountiable in case someone wants to track down a fix.
Comment 6 Hin-Tak Leung 2007-10-25 13:19:21 UTC
Could try; but is rather busy lately, so anybody who feels like having a crack
at it, feel free to do so.
Comment 7 Andre Beaud 2009-08-04 03:00:35 UTC
Created attachment 5271 [details]
jas_types.h

Hi, this allows the build to succeed on my HP (HP-UX 11.11, PA-RISC), patch to
follow.
Comment 8 Andre Beaud 2009-08-04 03:02:00 UTC
Created attachment 5272 [details]
jas_types.h.patch

Patch to create jas_types.h, against gs ver 8.64
Comment 9 Hin-Tak Leung 2010-05-02 02:36:48 UTC
*** Bug 690369 has been marked as a duplicate of this bug. ***
Comment 10 Hin-Tak Leung 2010-05-02 03:12:45 UTC
Grabbing a Ralph's bugs.
Comment 12 Hin-Tak Leung 2010-05-14 04:53:26 UTC
Reviewed all the patches and committed r11237 (fixes jasper issue detailed here) , r11238 (jbig2dec issue), r11239 (HP cc compiler quirk workaround for opvp), r11240 (fix for non-GNU make on Tru64/HP-UX)

r11240 is not needed if GNU make is used instead of HP make; r11239 is possibly not needed if a recent GCC is used instead of HP cc.

To build ghostscript 8.71 on HP-UX, r11240 is irrelevant because it fixes a problem introduced after 8.71; r10826 and r10827 (both issues against AIX's CC) are also needed for HP cc.

r11237 is equivalent to (and better than) attachment 5272 [details] - which may break other systems; there are some extraneous changes from the hpux.connect which were not needed on the system I tested but may be relevant to other HP hardware/compiler combo so I'll attach them here for reference.

# uname -a
HP-UX vital50 B.11.23 U ia64 0997504964 unlimited-user license
# cc --version
cc: HP C/aC++ B3910B A.06.15 [May 16 2007]
# ld -V
ld: 92453-07 linker ld HP Itanium(R) B.12.42  IPF/IPF
Comment 13 Hin-Tak Leung 2010-05-14 05:10:19 UTC
Created attachment 6282 [details]
uncommitted changes from hp.connect ghostscript 8.62 diff

I don't find these changes necessary, but may be useful for other hardware/compiler combo than the one I used.
Comment 14 Hin-Tak Leung 2010-05-14 05:13:21 UTC
Created attachment 6283 [details]
uncommitted change from hp.connect jaser 1.900.1 diff

I don't find these changes necessary - attached here for reference.
Comment 15 Hin-Tak Leung 2010-05-14 05:23:57 UTC
Created attachment 6284 [details]
tgz of the 6 patches mentioned here.

0001-Fixes-part-of-691149-void-function-returning-value-t.patch  r10826
0001-First-half-of-patch-from-John-Wehle-for-bug-691149-v.patch  r10827
0001-fix-conflicting-types-against-HP-UX-system-header-in.patch  r11237
0002-uint8_t-type-located-in-usual-header-on-HP-UX-needed.patch  r11238
0003-HP-compiler-quirk-apparently-the-same-workaround-is-.patch  r11239
0004-remove-one-extra-tab-introduced-in-r10994-non-GNU-Ma.patch  r11240

To patch against 8.71, only the first 5 are needed. These will require GNU patch (HP patch doesn't take unified diff's), of which HP binaries can be downloaded from:
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/patch-2.6.1/