This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/2045: gdb 6.4 compilation fails on HPUX 10


>Number:         2045
>Category:       gdb
>Synopsis:       gdb 6.4 compilation fails on HPUX 10
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 02 14:58:01 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     ralfixx@gmx.de
>Release:        gdb 6.4, HP-UX 10
>Organization:
>Environment:
HP-UX 10
gcc 4.0.2
>Description:
Two problems compiling gdb 6.4 on HP-UX 10 using gcc 4.0.2:

1) 'configure' tries to determine whether fseeko and fseeko64 are declared and finds they aren't, because in the check, _LARGEFILE64_SOURCE is not defined, and thus the corresponding section in stdio.h is not read.

Later when compiling gdb, _LARGEFILE64_SOURCE  is defined via -D, and only then the declaration in stdio.h is seen.  This triggers the following error:

gcc -DHAVE_CONFIG_H -I. -I.././bfd -I. -DHOST_HPPAHPUX -D_LARGEFILE64_SOURCE -DHPUX_CORE -I. -I.././bfd -I.././bfd/../include -I.././bfd/../intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -O -c archive.c -o archive.o
In file included from archive.c:133:
sysdep.h:155: error: conflicting types for 'fseeko'
/tmp_mnt /software/gcc/4.0.2/HP-UX-B.10/bin/../lib/gcc/hppa2.0-hp-hpux10.20/4.0.2/include/stdio.h:618: error: previous declaration of 'fseeko' was here
sysdep.h:161: error: conflicting types for 'fseeko64'
/tmp_mnt/software/gcc/4.0.2/HP-UX-B.10/bin/../lib/gcc/hppa2.0-hp-hpux10.20/4.0.2/include/stdio.h:525: error: previous declaration of 'fseeko64' was here

The fseek*() have 'long' return values in stdio.h and 'int' in sysdep.h.

Workaround: export the equivalent configure macros before calling configure.  Suggested fix: add -D_LARGEFILE64_SOURCE when running the configure tests.



2) curses.h on HP-UX has a brain-dead macro expansion for getyx() which triggers the following error:

gcc -c -O  -DPA_SOM_ONLY=1   -I. -I.././gdb -I.././gdb/config -DLOCALEDIR="\"/software/gdb/6.4/share/locale\"" -DHAVE_CONFIG_H -I.././gdb/../include/opcode -I.././gdb/../readline/.. -I../bfd -I.././gdb/../bfd -I.././gdb/../include -I../intl -I.././gdb/../intl  -DMI_OUT=1 -DTUI=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral -Wunused-label -Wunused-function -Wuninitialized  .././gdb/tui/tui-io.c
.././gdb/tui/tui-io.c: In function 'tui_puts':
.././gdb/tui/tui-io.c:184: error: syntax error before '}' token
.././gdb/tui/tui-io.c: In function 'tui_redisplay_readline':
.././gdb/tui/tui-io.c:229: error: syntax error before '}' token
.././gdb/tui/tui-io.c:241: error: syntax error before '}' token
.././gdb/tui/tui-io.c:255: error: syntax error before '}' token
.././gdb/tui/tui-io.c:258: error: syntax error before '}' token
.././gdb/tui/tui-io.c:264: error: syntax error before '}' token
gmake[2]: *** [tui-io.o] Error 1
gmake[2]: Leaving directory `/home/data/ralf/Software/gdb-6.4/gdb'
gmake[1]: *** [all-gdb] Error 2
gmake[1]: Leaving directory `/home/data/ralf/Software/gdb-6.4'
gmake: *** [all] Error 2


The macro is missing a semicolon before a block-closing "}".  One can work around this by adding -D__HP_CURSES to CFLAGS in the environment when configuring gdb.  In this case an alternate macro definition is used for getyx().

Best regards
R'

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]