This is the mail archive of the gdb@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]

Re: gdb on AIX


> 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


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