This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb on AIX
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Petchesi Gabriel Horatiu <gabi at prolix dot ro>
- Cc: gdb at sources dot redhat dot com
- Date: Mon, 19 Dec 2005 15:19:02 +0400
- Subject: Re: gdb on AIX
- References: <1134986205.16296.30.camel@localhost.localdomain>
> 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. 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.
--
Joel