NetBSD Problem Report #43043

From  Tue Mar 23 10:00:46 2010
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id E4CB863B86C
	for <>; Tue, 23 Mar 2010 10:00:45 +0000 (UTC)
Message-Id: <>
Date: Tue, 23 Mar 2010 10:00:45 +0000 (UTC)
Subject: linking powerpc64 gdb fails with undefined references
X-Send-Pr-Version: www-1.0

>Number:         43043
>Category:       port-powerpc
>Synopsis:       linking powerpc64 gdb fails with undefined references
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    skrll
>State:          analyzed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 23 10:05:00 +0000 2010
>Last-Modified:  Mon Mar 29 08:39:14 +0000 2010
>Originator:     Dennis Ferguson
>Release:        very recent 5.99.24
Darwin 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov  3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386

Building a powerpc64 gdb fails while linking with
undefined references:

#      link  gdb/gdb
/Users/dennis/NetBSD/5.0-current/src/gnu/usr.bin/gdb6/libgdb/obj/libgdb.a(ppcnbsd-nat.o):(.toc+0x18): undefined reference to `nbsd_pid_to_exec_file'
/Users/dennis/NetBSD/5.0-current/src/gnu/usr.bin/gdb6/libgdb/obj/libgdb.a(ppcnbsd-nat.o):(.toc+0x58): undefined reference to `ppcnbsd_gregset'
/Users/dennis/NetBSD/5.0-current/src/gnu/usr.bin/gdb6/libgdb/obj/libgdb.a(ppcnbsd-nat.o):(.toc+0x78): undefined reference to `ppcnbsd_fpregset'
collect2: ld returned 1 exit status

*** Failed target:  gdb

The missing functions are present in the sources, in

Do a:

    MACHINE=macppc64 ./ distribution
I believe the problem is that the generated build
configuration files in src/gnu/usr.bin/gdb6/arch/powerpc64/
are out of date and need to be regenerated.  While
I apparently lack the right juju to follow the instructions
for doing this myself, I know that copying the more
recently made versions of config.h, and init.c
from the powerpc/ directory into powerpc64/ made the
problem go away so I strongly suspect that making
new files the proper way will do so too. 



State-Changed-From-To: open->analyzed
State-Changed-When: Sat, 27 Mar 2010 20:18:40 +0000
i couldn't get mknative-gdb to run in the very short amount of time i gave it,
but copying the powerpc fails as dennis suggests works just fine for me, so
i've done that for now.

someone hopefully can re-generate them properly and then close this PR :)

From: matthew green <>
Subject: PR/43043 CVS commit: src/gnu/usr.bin/gdb6/arch/powerpc64
Date: Sat, 27 Mar 2010 20:17:31 +0000

 Module Name:	src
 Committed By:	mrg
 Date:		Sat Mar 27 20:17:31 UTC 2010

 Modified Files:
 	src/gnu/usr.bin/gdb6/arch/powerpc64: config.h init.c

 Log Message:
 copy across the powerpc versions of these files for now.  should use
 mknative-gdb to generate these, but my initial attempt failed and
 these ones seem to be about what i'd expect anyway.
 suggested by in PR#43043.

 To generate a diff of this commit:
 cvs rdiff -u -r1.1 -r1.2 src/gnu/usr.bin/gdb6/arch/powerpc64/config.h \
     src/gnu/usr.bin/gdb6/arch/powerpc64/ \

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: port-powerpc-maintainer->skrll
Responsible-Changed-When: Mon, 29 Mar 2010 08:39:14 +0000
Take. I'll handle this properly. ;)


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.