NetBSD Problem Report #23590

Received: (qmail 3086 invoked by uid 605); 28 Nov 2003 14:35:38 -0000
Message-Id: <200311281435.hASEZZ47024755@sparky.coris.org.uk>
Date: Fri, 28 Nov 2003 14:35:36 GMT
From: Julian Coleman <jdc@coris.org.uk>
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: jdc@coris.org.uk
To: gnats-bugs@gnats.netbsd.org
Subject: databases/db does not compile on sparc/sparc64 (fix included)
X-Send-Pr-Version: 3.95

>Number:         23590
>Category:       pkg
>Synopsis:       databases/db does not compile on sparc/sparc64 (fix included)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    tron
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 28 14:36:00 +0000 2003
>Closed-Date:    Tue Mar 15 16:14:33 +0000 2005
>Last-Modified:  Tue Mar 15 16:14:33 +0000 2005
>Originator:     Julian Coleman
>Release:        NetBSD 1.6ZF
>Organization:
@home
>Environment:
System: NetBSD sparky 1.6ZF NetBSD 1.6ZF (SUN4M_SCSI3_BRFW) #0: Sat Nov 15 08:36:29 GMT 2003 root@sparky:/usr/obj/sparc/usr/src/sys/arch/sparc/compile/SUN4M_SCSI3_BRFW sparc
Architecture: sparc
Machine: sparc
>Description:
	databases/db does not compile on sparc (and probably sparc64)
	because of a name conflict with machine/mcontext.h:

cc -c -O2 -I/tmp/obj/pkg/databases/db/work/.buildlink/include -I. -I../dist/../include -I/tmp/obj/pkg/databases/db/work/.buildlink/include ../dist/../db_archive/db_archive.c  -fPIC -DPIC -o .libs/db_archive.o
In file included from ../db_archive/db_archive.c:30:
../include/log.h:148: error: redefinition of `struct __fq'

>How-To-Repeat:
	mysparc$ cd /usr/pkgsrc/databases/db && make

>Fix:
	Add new file patch-ab:

--- ../include/log.h.dist	1999-08-31 18:45:43.000000000 +0100
+++ ../include/log.h	2003-11-28 12:35:27.000000000 +0000
@@ -145,7 +145,7 @@

 	LOGP	  persist;		/* Persistent information. */

-	SH_TAILQ_HEAD(__fq) fq;		/* List of file names. */
+	SH_TAILQ_HEAD(__fnq) fq;	/* List of file names. */

 	/*
 	 * The lsn LSN is the file offset that we're about to write and which
>Release-Note:
>Audit-Trail:

From: Martin Husemann <martin@duskware.de>
To: Julian Coleman <jdc@coris.org.uk>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/23590: databases/db does not compile on sparc/sparc64 (fix included)
Date: Sat, 29 Nov 2003 21:01:06 +0100

 On Fri, Nov 28, 2003 at 02:35:36PM +0000, Julian Coleman wrote:
 > -	SH_TAILQ_HEAD(__fq) fq;		/* List of file names. */
 > +	SH_TAILQ_HEAD(__fnq) fq;	/* List of file names. */

 Neither __fq nor __fnq are in application namespace - so this is both just
 wrong.

 Martin

From: Julian Coleman <jdc@coris.org.uk>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/23590: databases/db does not compile on sparc/sparc64 (fix included)
Date: Sun, 30 Nov 2003 09:57:42 +0000

 > Neither __fq nor __fnq are in application namespace - so this is both just
 > wrong.

 Yes.  However, db names its internal variables with the prefix __.  This
 seemed the smallest workround.

 J

 -- 
                     My other computer also runs NetBSD
                           http://www.netbsd.org/

From: Martin Husemann <martin@duskware.de>
To: Julian Coleman <jdc@coris.org.uk>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/23590: databases/db does not compile on sparc/sparc64 (fix included)
Date: Sun, 30 Nov 2003 11:09:51 +0100

 On Sun, Nov 30, 2003 at 09:57:42AM +0000, Julian Coleman wrote:
 > Yes.  However, db names its internal variables with the prefix __.  This
 > seemed the smallest workround.

 *blink* 

 Ok, the PR needs to be renamed into "databases/db is written by a bunch of 
 morons" and sleepycat needs some serious bricking.

 Martin
Responsible-Changed-From-To: pkg-manager->tron
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Tue, 15 Mar 2005 15:43:43 +0000
Responsible-Changed-Why:
Over to maintainer.


From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/23590 CVS commit: pkgsrc/databases/db
Date: Tue, 15 Mar 2005 16:13:58 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	tron
 Date:		Tue Mar 15 16:13:58 UTC 2005

 Modified Files:
 	pkgsrc/databases/db: Makefile distinfo
 Added Files:
 	pkgsrc/databases/db/patches: patch-ac

 Log Message:
 Avoid build failures under NetBSD-sparc and NetBSD-sparc64 caused by a
 namespace violation (use of "__" prefix in an application header file).
 The patch was provided by Julian Coleman in PR pkg/23590.


 To generate a diff of this commit:
 cvs rdiff -r1.20 -r1.21 pkgsrc/databases/db/Makefile
 cvs rdiff -r1.5 -r1.6 pkgsrc/databases/db/distinfo
 cvs rdiff -r0 -r1.1 pkgsrc/databases/db/patches/patch-ac

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

State-Changed-From-To: open->closed
State-Changed-By: tron@netbsd.org
State-Changed-When: Tue, 15 Mar 2005 16:14:33 +0000
State-Changed-Why:
I've added the supplied patch file. Thanks a lot.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.