GNU GDB compile problem

I have to compile gnu-gdb 6.7 on HP-UX 11.11 with /usr/local/pa64/bin/gcc 64-bit compiler, but I'm having some problems during "make":

ser-tcp.c: In function `net_open':
ser-tcp.c:207: warning: passing arg 5 of `getsockopt' from incompatible pointer type
make[2]: *** [ser-tcp.o] Error 1
make[2]: Leaving directory `/opt/gdb-6.7/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/opt/gdb-6.7'
make: *** [all] Error 2

I already tried with another version of gdb (6.5).....
I have no idea of what I could do.... please help :o

I solved with --disable-werror but now:

/usr/ccs/bin/ld: ../bfd/libbfd.a(archive.o): Not a valid object file (invalid system id)
collect2: ld returned 1 exit status
make[2]: *** [gdb] Error 1
make[2]: Leaving directory `/opt/gdb-6.7/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/opt/gdb-6.7'
make: *** [all] Error 2

:confused:

After a "make clean", now the output is:

...
rm -f gdb
gcc -g -O2 -DPA_SOM_ONLY=1      \
        -o gdb gdb.o libgdb.a \
           ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a ./../intl/libintl.a ../libiberty/libiberty.a     -lcurses -lm -liconv /usr/local/lib/libexpat.sl ../libiberty/libiberty.a
/usr/local/pa64/lib/gcc-lib/hppa64-hp-hpux11.11/3.3.2/../../../../hppa64-hp-hpux11.11/bin/ld: cannot find -liconv
collect2: ld returned 1 exit status
make[2]: *** [gdb] Error 1
make[2]: Leaving directory `/opt/gdb-6.7/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/opt/gdb-6.7'
make: *** [all] Error 2

Please help... :frowning:

  1. it's looking for libiconv....

  2. You have PA_SOM_ONLY, I thought 64bit PA-RISC used ELF on HPUX 11.

  1. so that "ld: cannot find -liconv" means that is looking for libiconv? how ca n I verify if is it installed?

  2. How can I verify if I have ELF? And how can gcc use ELF?

Sorry but I'm not so skilled :stuck_out_tongue:

Thanks a lot

Look for a library that starts along the lines of "libiconv.*"

It looks like it is option for the build of gdb. I presume you are trying to build gdb to debug 64 bit code?

Try using the tool "elfdump" on a built binary.

I found:

/usr/local/lib/libiconv.sl.4
/usr/local/lib/libiconv.sl.4.0
/usr/local/lib/libiconv.sl
/usr/local/lib/libiconv.la
/usr/local/share/doc/libiconv

so I think is installed

However, yes, I'm trying to build gdb for debugging 64 bit code....but how can I pass the ELF option to gcc? And I don't understand how can elfdump help me... :o

Just curious .....

Why not just use WDB which is the "HP-supported implementation of the GDB debugger." ?

I need to debug 64 bit code...