#849339 xcolorsel: FTBFS on hppa - conflicting HP compiler options

Package:
xcolorsel
Source:
xcolorsel
Description:
display colors and names in X
Submitter:
John David Anglin
Date:
2023-03-12 20:21:05 UTC
Severity:
normal
Tags:
#849339#5
Date:
2016-12-25 19:10:30 UTC
From:
To:
Dear Maintainer,

The build fails here:
gcc -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Aa -D_HPUX_SOURCE        -Dlinux -D__hppa__ -D_POSIX_C_SOURCE=199309L 				-D_POSIX_SOURCE -D_XOPEN_SOURCE 				-D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 				  				  -DFUNCPROTO=15 -DNARROWPROTO    -DHELPFILE=\"/usr/lib/X11/xcolorsel/Xcolorsel.help\" -Wdate-time -D_FORTIFY_SOURCE=2  -c -o RgbText.o RgbText.c
<command-line>:0:1: error: missing '(' after predicate
In file included from /usr/include/stdio.h:27:0,
                 from RgbText.c:77:

This error is caused by the HP compiler option '-Aa'.

Full log is here:
https://buildd.debian.org/status/fetch.php?pkg=xcolorsel&arch=hppa&ver=1.1a-20&stamp=1482455899

The HP options are added by Imakefile.  Build is successful with the attached
patch.

Regards,
Dave Anglin

#849339#10
Date:
2021-09-27 19:35:01 UTC
From:
To:
alternatively, this patch works too.
Please apply.
THX, Helge

#849339#15
Date:
2023-03-12 20:13:11 UTC
From:
To:
The original patch is best.

The "-Aa" option is not compatible with gcc.  With gcc, the "-Aa" option is an assert. This option
invokes ANSI mode with the HP compiler.

CCOPTIONS only needs setting when not using gcc.  gcc defines _HPUX_SOURCE by default on HP-UX.

Regards,
Dave Anglin