Subject: pkg/8789: postgresql does not link on -current sparc
To: None <gnats-bugs@gnats.netbsd.org>
From: Ingolf Koch <ingolf@knuut.de>
List: netbsd-bugs
Date: 11/13/1999 05:09:51
>Number: 8789
>Category: pkg
>Synopsis: postgresql does not link due to missing TAS symbol
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager (NetBSD software packages system bug manager)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Nov 13 05:09:00 1999
>Last-Modified:
>Originator: Ingolf Koch
>Organization:
Beste Kneipe in Jena-Ost
>Release: NetBSD-current 1.4M
>Environment:
System: NetBSD elefant 1.4M NetBSD 1.4M (ELEFANT.v6) #0: Fri Nov 12 07:48:21 MET 1999 ingolf@elefant:/usr/obj/sys/arch/sparc/compile/ELEFANT.v6 sparc
>Description:
The postgresql-6.5.2 package (in databases/postgresql) cannot
be compiled at least with current userland on a sparc. The linker
complains about a missing TAS symbol. TAS is usually a preprocessor
macro which would have been defined if there were a HAS_TEST_AND_SET
preprocessor macro (see include/storage/s_lock.h).
The HAS_TEST_AND_SET is set in include/os.h (which is a link to
include/port/bsd.h) if the compiler has a predefined "sparc"
macro. But cc only predefines "__sparc__". (This may apply to
other architectures, too.)
>How-To-Repeat:
On a -current sparc:
cd /usr/pkgsrc/databases/postgresql
make install
>Fix:
Add the following patch (also needed if the package is
changed to version 6.5.3 as requested in pkg/8757):
--- ./include/port/bsd.h.orig Tue May 25 18:14:29 1999
+++ ./include/port/bsd.h Sat Nov 13 13:39:31 1999
@@ -5,7 +5,7 @@
#define HAS_TEST_AND_SET
#endif
-#if defined(sparc)
+#if defined(__sparc__)
#define NEED_SPARC_TAS_ASM
#define HAS_TEST_AND_SET
#endif
>Audit-Trail:
>Unformatted: