This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb on AIX
On Mon, 2005-12-19 at 15:19 +0400, Joel Brobecker wrote:
> > gcc -g -O2 -Wl,-bbigtoc -lpthdebug \
> > -o gdb gdb.o libgdb.a \
> > ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a ../libiberty/libiberty.a -lcurses -liconv ../libiberty/libiberty.a
> > ld: 0711-317 ERROR: Undefined symbol: .pow
> > ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> > information.
> > collect2: ld returned 8 exit status
>
> pow() is part of libm.
=====
I checked where pow is defined in /usr/lib with:
$ nm -A lib*.a | grep "\.pow"
And i found these symbol definitions:
libC.a:ansi_32.o:000000000007751c T .pow
libC.a:ansi_64.o:0000000000076964 T .pow
libC128.a:ansi_32.o:0000000000077924 T .pow
libC128.a:ansi_64.o:0000000000076e50 T .pow
libC128_r.a:ansi_32.o:0000000000077924 T .pow
libC128_r.a:ansi_64.o:0000000000076e50 T .pow
libC_r.a:ansi_32.o:000000000007751c T .pow
libbsd.a:shr.o:0000000000003a28 T .pow
libbsd_r.a:shr.o:0000000000003a28 T .pow
libdiag.a:shr.o:0000000000022cb0 T .pow
libisode.a:shr.o:0000000000030b48 T .pow
libisode.a:shr_64.o:0000000000035444 T .pow
So the function should be available from the libC.a library !?
> On our AIX machine (5.3), configure automatically
> adds -lm to the list of libs (ie "-lcurses -lm -liconv") or somesuch.
> I think the check that adds it is:
>
> # We might need to link with -lm; most simulators need it.
> AC_CHECK_LIB(m, main)
>
> You need to search a line in your build output saying something like:
>
> checking for main in -lm
> And see what it answered. The answer should be "yes". If you see "no",
> then check out "config.log". This file should contain all the details.
=====
I found this in gdbgdb/config.log subdir
....
configure:7505: checking for mig
configure:7534: result: no
configure:7550: checking for main in -lm
configure:7606: result: no
configure:7622: checking for wctype
configure:7710: result: yes
....
Do you know from what package this lib is located?
I'm going to Google for it try to install and give it a try.
gabriel
--
Petchesi Gabriel Horatiu
E-mail: gabi@prolix.ro