From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23460 invoked by alias); 20 Dec 2005 09:11:45 -0000 Received: (qmail 23442 invoked from network); 20 Dec 2005 09:11:41 -0000 Received: from unknown (193.231.236.63) by sourceware.org with QMTP; 20 Dec 2005 09:11:41 -0000 Received: (qmail 9174 invoked from network); 20 Dec 2005 09:11:41 -0000 X-Mail-Scanner: Scanned by qSheff 0.8-p3 against viruses and spams (http://www.enderunix.org/qsheff/) Received: from unknown (HELO mail.rdslink.ro) (193.231.236.20) by emta2.rdslink.ro with SMTP; 20 Dec 2005 09:11:41 -0000 Received: (qmail 26998 invoked from network); 20 Dec 2005 09:11:33 -0000 Received: from unknown (HELO ?82.77.63.137?) (82.77.63.137) by mail.rdslink.ro with SMTP; 20 Dec 2005 09:11:33 -0000 Subject: Re: gdb on AIX From: Petchesi Gabriel Horatiu To: gdb@sources.redhat.com In-Reply-To: <20051219111902.GD31944@adacore.com> References: <1134986205.16296.30.camel@localhost.localdomain> <20051219111902.GD31944@adacore.com> Content-Type: text/plain Date: Tue, 20 Dec 2005 09:11:00 -0000 Message-Id: <1135069892.18884.6.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2005-12/txt/msg00162.txt.bz2 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