From roderick@stud187236.mobiel.utwente.nl  Wed Jan  1 07:44:19 2003
Return-Path: <roderick@stud187236.mobiel.utwente.nl>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 615CF37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  1 Jan 2003 07:44:19 -0800 (PST)
Received: from stud187236.mobiel.utwente.nl (stud187236.mobiel.utwente.nl [130.89.187.236])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6153243EC5
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  1 Jan 2003 07:44:18 -0800 (PST)
	(envelope-from roderick@stud187236.mobiel.utwente.nl)
Received: from stud187236.mobiel.utwente.nl (localhost [127.0.0.1])
	by stud187236.mobiel.utwente.nl (8.12.6/8.12.6) with ESMTP id h01FiG7d037878;
	Wed, 1 Jan 2003 15:44:17 GMT
	(envelope-from roderick@stud187236.mobiel.utwente.nl)
Received: (from roderick@localhost)
	by stud187236.mobiel.utwente.nl (8.12.6/8.12.6/Submit) id h01FiGUe037877;
	Wed, 1 Jan 2003 15:44:16 GMT
Message-Id: <200301011544.h01FiGUe037877@stud187236.mobiel.utwente.nl>
Date: Wed, 1 Jan 2003 15:44:16 GMT
From: Roderick van Domburg <roderick@stud187236.mobiel.utwente.nl>
Reply-To: Roderick van Domburg <roderick@stud187236.mobiel.utwente.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc: r.s.a.vandomburg@student.utwente.nl
Subject: postgresql fails to build on sparc64
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         46666
>Category:       ports
>Synopsis:       postgresql fails to build on sparc64
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 01 07:50:01 PST 2003
>Closed-Date:    Wed Jan 01 20:05:12 PST 2003
>Last-Modified:  Thu Jan  2 11:50:01 PST 2003
>Originator:     Roderick van Domburg
>Release:        FreeBSD 5.0-CURRENT sparc64
>Organization:
University of Twente
>Environment:
System: FreeBSD stud187236.mobiel.utwente.nl 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Wed Jan 1 14:28:39 GMT 2003 roderick@stud187236.mobiel.utwente.nl:/usr/obj/usr/src/sys/STUD187236 sparc64


>Description:
Building postgresql from ports on a sparc64 fails with the following error message. Both postgresql7 and postgresql-devel suffer from the same problem.

cc -O -pipe  -O3 -funroll-loops -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../../src/include -I/usr/local/include  -c -o xlog.o xlog.c
In file included from ../../../../src/include/storage/spin.h:50,
                 from xlog.c:38:
../../../../src/include/storage/s_lock.h:211: syntax error before '*' token
../../../../src/include/storage/s_lock.h:212: warning: return type defaults to `int'
../../../../src/include/storage/s_lock.h:212: warning: no previous prototype for `tas'
../../../../src/include/storage/s_lock.h: In function `tas':
../../../../src/include/storage/s_lock.h:213: syntax error before "_res"
../../../../src/include/storage/s_lock.h:217: `_res' undeclared (first use in this function)
../../../../src/include/storage/s_lock.h:217: (Each undeclared identifier is reported only once
../../../../src/include/storage/s_lock.h:217: for each function it appears in.)
../../../../src/include/storage/s_lock.h:217: `lock' undeclared (first use in this function)
../../../../src/include/storage/s_lock.h: At top level:
../../../../src/include/storage/s_lock.h:562: syntax error before '*' token
../../../../src/include/storage/s_lock.h:562: warning: type defaults to `int' in declaration of `s_lock'
xlog.c:291: syntax error before "slock_t"
xlog.c: In function `XLogInsert':
xlog.c:638: structure has no member named `info_lck'
xlog.c:638: structure has no member named `info_lck'
xlog.c:641: syntax error before "slock_t"
xlog.c:641: structure has no member named `info_lck'
xlog.c:864: structure has no member named `info_lck'
xlog.c:864: structure has no member named `info_lck'
xlog.c:870: syntax error before "slock_t"
xlog.c:870: structure has no member named `info_lck'
xlog.c: In function `AdvanceXLInsertBuffer':
xlog.c:925: structure has no member named `info_lck'
xlog.c:925: structure has no member named `info_lck'
xlog.c:929: syntax error before "slock_t"
xlog.c:929: structure has no member named `info_lck'
xlog.c: In function `XLogWrite':
xlog.c:1183: structure has no member named `info_lck'
xlog.c:1183: structure has no member named `info_lck'
xlog.c:1189: syntax error before "slock_t"
xlog.c:1189: structure has no member named `info_lck'
xlog.c: In function `XLogFlush':
xlog.c:1244: structure has no member named `info_lck'
xlog.c:1244: structure has no member named `info_lck'
xlog.c:1248: syntax error before "slock_t"
xlog.c:1248: structure has no member named `info_lck'
xlog.c: In function `XLOGShmemInit':
xlog.c:2361: syntax error before "slock_t"
xlog.c:2361: structure has no member named `info_lck'
xlog.c: In function `GetRedoRecPtr':
xlog.c:2885: structure has no member named `info_lck'
xlog.c:2885: structure has no member named `info_lck'
xlog.c:2888: syntax error before "slock_t"
xlog.c:2888: structure has no member named `info_lck'
xlog.c: In function `CreateCheckPoint':
xlog.c:3024: structure has no member named `info_lck'
xlog.c:3024: structure has no member named `info_lck'
xlog.c:3026: syntax error before "slock_t"
xlog.c:3026: structure has no member named `info_lck'
gmake[5]: *** [xlog.o] Error 1
gmake[5]: Leaving directory `/usr/ports/databases/postgresql-devel/work/postgresql-7.3/src/backend/access/transam'
gmake[4]: *** [transam-recursive] Error 2
gmake[4]: Leaving directory `/usr/ports/databases/postgresql-devel/work/postgresql-7.3/src/backend/access'
gmake[3]: *** [access-recursive] Error 2
gmake[3]: Leaving directory `/usr/ports/databases/postgresql-devel/work/postgresql-7.3/src/backend'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/ports/databases/postgresql-devel/work/postgresql-7.3/src'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/ports/databases/postgresql-devel/work/postgresql-7.3'
gmake: *** [all] Error 2
*** Error code 2

Stop in /usr/ports/databases/postgresql-devel.
>How-To-Repeat:
Try to build either postgresql7 or postgresql-devel from ports on a sparc64.
>Fix:
Unknown.
>Release-Note:
>Audit-Trail:

From: "Roderick van Domburg" <r.s.a.vandomburg@student.utwente.nl>
To: <freebsd-gnats-submit@FreeBSD.org>
Cc:  
Subject: Re: ports/46666: postgresql fails to build on sparc64
Date: Wed, 1 Jan 2003 16:56:54 +0100

 I have forgotten to mention that building with either -O3 or -O doesn't seem
 to make any difference.
 
 

From: "Roderick van Domburg" <r.s.a.vandomburg@student.utwente.nl>
To: <freebsd-gnats-submit@FreeBSD.org>
Cc:  
Subject: Re: ports/46666: postgresql fails to build on sparc64
Date: Wed, 1 Jan 2003 20:54:39 +0100

 Sorry to bother you again, but I just resolved the issue with the help of
 the PostgreSQL developers. The following patch does the magic. I assume that
 this patch will be incorporated into later releases of PostgreSQL (> 7.3.1).
 
 *** freebsd.h   Wed Jan  1 19:46:24 2003
 --- /home/roderick/freebsd.h   Wed Jan  1 19:46:14 2003
 ***************
 *** 7,12 ****
 --- 7,13 ----
   #if defined(__sparc__)
   #define NEED_SPARC_TAS_ASM
   #define HAS_TEST_AND_SET
 + typedef unsigned char slock_t;
   #endif
 
   #if defined(__alpha__)
 
 
State-Changed-From-To: open->closed 
State-Changed-By: seanc 
State-Changed-When: Wed Jan 1 20:04:45 PST 2003 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46666 

From: Palle Girgensohn <girgen@pingpong.net>
To: Roderick van Domburg <roderick@stud187236.mobiel.utwente.nl>,
	FreeBSD-gnats-submit@FreeBSD.ORG
Cc: r.s.a.vandomburg@student.utwente.nl
Subject: Re: ports/46666: postgresql fails to build on sparc64
Date: Thu, 02 Jan 2003 20:49:27 +0100

 Hi!
 
 Can you send this to the postgresql port list? Maybe they can help us. 
 While I do have an old sparc lying around, I don't have the time to install 
 freebsd on it at this time, so I cannot really test this out.
 
 Regards,
 Palle
 
 --On onsdag, januari 01, 2003 15.44.16 +0000 Roderick van Domburg 
 <roderick@stud187236.mobiel.utwente.nl> wrote:
 
 >
 >> Number:         46666
 >> Category:       ports
 >> Synopsis:       postgresql fails to build on sparc64
 >> Confidential:   no
 >> Severity:       critical
 >> Priority:       medium
 >> Responsible:    freebsd-ports
 >> State:          open
 >> Quarter:
 >> Keywords:
 >> Date-Required:
 >> Class:          sw-bug
 >> Submitter-Id:   current-users
 >> Arrival-Date:   Wed Jan 01 07:50:01 PST 2003
 >> Closed-Date:
 >> Last-Modified:
 >> Originator:     Roderick van Domburg
 >> Release:        FreeBSD 5.0-CURRENT sparc64
 >> Organization:
 > University of Twente
 >> Environment:
 > System: FreeBSD stud187236.mobiel.utwente.nl 5.0-CURRENT FreeBSD
 > 5.0-CURRENT #1: Wed Jan 1 14:28:39 GMT 2003
 > roderick@stud187236.mobiel.utwente.nl:/usr/obj/usr/src/sys/STUD187236
 > sparc64
 >
 >
 >> Description:
 > Building postgresql from ports on a sparc64 fails with the following
 > error message. Both postgresql7 and postgresql-devel suffer from the same
 > problem.
 >
 > cc -O -pipe  -O3 -funroll-loops -Wall -Wmissing-prototypes
 > -Wmissing-declarations -I../../../../src/include -I/usr/local/include  -c
 > -o xlog.o xlog.c In file included from
 > ../../../../src/include/storage/spin.h:50,
 >                  from xlog.c:38:
 > ../../../../src/include/storage/s_lock.h:211: syntax error before '*'
 > token ../../../../src/include/storage/s_lock.h:212: warning: return type
 > defaults to `int' ../../../../src/include/storage/s_lock.h:212: warning:
 > no previous prototype for `tas' ../../../../src/include/storage/s_lock.h:
 > In function `tas':
 > ../../../../src/include/storage/s_lock.h:213: syntax error before "_res"
 > ../../../../src/include/storage/s_lock.h:217: `_res' undeclared (first
 > use in this function) ../../../../src/include/storage/s_lock.h:217: (Each
 > undeclared identifier is reported only once
 > ../../../../src/include/storage/s_lock.h:217: for each function it
 > appears in.) ../../../../src/include/storage/s_lock.h:217: `lock'
 > undeclared (first use in this function)
 > ../../../../src/include/storage/s_lock.h: At top level:
 > ../../../../src/include/storage/s_lock.h:562: syntax error before '*'
 > token ../../../../src/include/storage/s_lock.h:562: warning: type
 > defaults to `int' in declaration of `s_lock' xlog.c:291: syntax error
 > before "slock_t"
 > xlog.c: In function `XLogInsert':
 > xlog.c:638: structure has no member named `info_lck'
 > xlog.c:638: structure has no member named `info_lck'
 > xlog.c:641: syntax error before "slock_t"
 > xlog.c:641: structure has no member named `info_lck'
 > xlog.c:864: structure has no member named `info_lck'
 > xlog.c:864: structure has no member named `info_lck'
 > xlog.c:870: syntax error before "slock_t"
 > xlog.c:870: structure has no member named `info_lck'
 > xlog.c: In function `AdvanceXLInsertBuffer':
 > xlog.c:925: structure has no member named `info_lck'
 > xlog.c:925: structure has no member named `info_lck'
 > xlog.c:929: syntax error before "slock_t"
 > xlog.c:929: structure has no member named `info_lck'
 > xlog.c: In function `XLogWrite':
 > xlog.c:1183: structure has no member named `info_lck'
 > xlog.c:1183: structure has no member named `info_lck'
 > xlog.c:1189: syntax error before "slock_t"
 > xlog.c:1189: structure has no member named `info_lck'
 > xlog.c: In function `XLogFlush':
 > xlog.c:1244: structure has no member named `info_lck'
 > xlog.c:1244: structure has no member named `info_lck'
 > xlog.c:1248: syntax error before "slock_t"
 > xlog.c:1248: structure has no member named `info_lck'
 > xlog.c: In function `XLOGShmemInit':
 > xlog.c:2361: syntax error before "slock_t"
 > xlog.c:2361: structure has no member named `info_lck'
 > xlog.c: In function `GetRedoRecPtr':
 > xlog.c:2885: structure has no member named `info_lck'
 > xlog.c:2885: structure has no member named `info_lck'
 > xlog.c:2888: syntax error before "slock_t"
 > xlog.c:2888: structure has no member named `info_lck'
 > xlog.c: In function `CreateCheckPoint':
 > xlog.c:3024: structure has no member named `info_lck'
 > xlog.c:3024: structure has no member named `info_lck'
 > xlog.c:3026: syntax error before "slock_t"
 > xlog.c:3026: structure has no member named `info_lck'
 > gmake[5]: *** [xlog.o] Error 1
 > gmake[5]: Leaving directory
 > `/usr/ports/databases/postgresql-devel/work/postgresql-7.3/src/backend/ac
 > cess/transam' gmake[4]: *** [transam-recursive] Error 2
 > gmake[4]: Leaving directory
 > `/usr/ports/databases/postgresql-devel/work/postgresql-7.3/src/backend/ac
 > cess' gmake[3]: *** [access-recursive] Error 2
 > gmake[3]: Leaving directory
 > `/usr/ports/databases/postgresql-devel/work/postgresql-7.3/src/backend'
 > gmake[2]: *** [all] Error 2
 > gmake[2]: Leaving directory
 > `/usr/ports/databases/postgresql-devel/work/postgresql-7.3/src' gmake[1]:
 > *** [all] Error 2
 > gmake[1]: Leaving directory
 > `/usr/ports/databases/postgresql-devel/work/postgresql-7.3' gmake: ***
 > [all] Error 2
 > *** Error code 2
 >
 > Stop in /usr/ports/databases/postgresql-devel.
 >> How-To-Repeat:
 > Try to build either postgresql7 or postgresql-devel from ports on a
 > sparc64.
 >> Fix:
 > Unknown.
 >> Release-Note:
 >> Audit-Trail:
 >> Unformatted:
 >
 > To Unsubscribe: send mail to majordomo@FreeBSD.org
 > with "unsubscribe freebsd-ports" in the body of the message
 
 
>Unformatted:
