GNU GDB compile problem


 
Thread Tools Search this Thread
Top Forums Programming GNU GDB compile problem
# 1  
Old 11-21-2007
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":

Code:
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 Smilie
# 2  
Old 11-21-2007
I solved with --disable-werror but now:

Code:
/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

Smilie
# 3  
Old 11-27-2007
After a "make clean", now the output is:

Code:
...
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... Smilie
# 4  
Old 11-27-2007
1. it's looking for libiconv....

2. You have PA_SOM_ONLY, I thought 64bit PA-RISC used ELF on HPUX 11.
# 5  
Old 11-27-2007
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 Smilie

Thanks a lot
# 6  
Old 11-29-2007
Quote:
Originally Posted by untamed
1. so that "ld: cannot find -liconv" means that is looking for libiconv? how ca n I verify if is it installed?
Look for a library that starts along the lines of "libiconv.*"

Quote:
Originally Posted by untamed
2. How can I verify if I have ELF? And how can gcc use ELF?
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.

Last edited by porter; 12-01-2007 at 04:01 PM..
# 7  
Old 11-30-2007
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... Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

GDB problem accessing static variables in C

Hi, Can anyone explain this please..... This is on AIX with GDB (tried a few versions). It only happens when program compiled in 64 bit and only with static variables.... A simple test program... ### snip #include <stdio.h> main() { static int n; n = 6; printf("hello %d\n", n);... (0 Replies)
Discussion started by: bagpussnz
0 Replies

2. UNIX for Dummies Questions & Answers

GDB Debugging Problem

I have added some code in my file. I have created executable rpm file of our code and also I have created debuginfo and debugsource files and installed all three. But when I debug in gdb I see the the code changes in soucre file. But the break point does not hit at that place as if it did not... (1 Reply)
Discussion started by: rupeshkp728
1 Replies

3. UNIX and Linux Applications

Cannot compile/install gnu program

Hello, I'm trying to install ansifilter which is a program that translates ansi text to HTML. The idea is to install it on AIX 7.1 but is failing. All de appropriate gcc libraries and requirements for this software were installed successfully, but when I do the gmake I get the following... (4 Replies)
Discussion started by: bazajav
4 Replies

4. AIX

Cannot compile/install gnu program on AIX

Hello, I'm trying to install ansifilter which is a program that translates ansi text to HTML. The idea is to install it on AIX 7.1 but is failing. All de appropriate gcc libraries and requirements for this software were installed successfully, but when I do the gmake I get the following... (0 Replies)
Discussion started by: bazajav
0 Replies

5. Programming

Can't debug: assert error with gdb (no problem without)

I'm sorry if the title is really criptic, but I don't know how to phrase my problem. I know I can't really ask for a solution, and I normally wouldn't but this is really escaping my abilities. Antefacts. I developed a program using the zeromq messaging library. I got to a point where the... (11 Replies)
Discussion started by: erupter
11 Replies

6. Programming

ddd/gdb debugger problem

I hope this is the right thread - not sure if it belongs in the Linux forum. Anyway, I'm having an issue with ddd and gdb. When using ddd to run gdb, there are extra parameters being appended, and my program is picking them up. I'm running on Ubuntu 11.04... Here's my command line entry - ... (1 Reply)
Discussion started by: jalburger
1 Replies

7. Programming

gdb: problem while debug an executable file

I created one file (test.cpp)and complied it and get the executable file(test) and run it.It is giving the out put but when I am trying to debug that executable.I am getting the error -- please tell me the solutions?? Thanks in advance ..... (2 Replies)
Discussion started by: smartgupta
2 Replies

8. HP-UX

gdb problem viewing variables

Hi, I don't know if this is HP-UX specific, but I'll take my chances with this forum. ;) I'm using WDB 5.7 on HP Itanium 11.23. 'file' on my executable shows: ELF-32 executable object file - IA64 The problem is with viewing the contents of the variables. Following is a sequence that... (0 Replies)
Discussion started by: rimon
0 Replies

9. AIX

Compile Problem on AIX5.3

Hello, I try to compile apt-rpm on a AIX box. AIX: AIX 5300-05-03 make : 3.81 CC= VAC 8 I get the follwing error: make: Entering directory `/home/root/apt-0.5.15lorg3/apt-pkg' source='contrib/cmndline.cc' object='contrib/cmndline.lo' libtool=yes \ DEPDIR=.deps depmode=none... (1 Reply)
Discussion started by: jbo
1 Replies

10. Programming

Compile problem.

I am a newbie to unix environment and i am currently using bash. May i know how to compile a new c program. (1 Reply)
Discussion started by: alkyo
1 Replies
Login or Register to Ask a Question