Subject: pkg/5587: cddbd does not compile on alpha
To: None <gnats-bugs@gnats.netbsd.org>
From: Charlie Root <root@polaris.garbled.net>
List: netbsd-bugs
Date: 06/14/1998 06:52:57
>Number:         5587
>Category:       pkg
>Synopsis:       cddbd does not compile on alpha
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 14 06:50:00 1998
>Last-Modified:
>Originator:     Charlie Root
>Organization:
Tim Rightnour    -  root@garbled.net
http://www.zynetwc.com/~garbled/garbled.html
>Release:        6-10-98<NetBSD-current source date>
>Environment:
	
System: NetBSD polaris 1.3 NetBSD 1.3 (POLARIS) #0: Thu Mar 26 13:17:18 MST 1998 root@polaris:/usr/src/sys/arch/i386/compile/POLARIS i386


>Description:
cddbd pkg doesn't compile on alpha due to many errors like:

cddbd.c:192: initializer element for `acctab[0].at_def' is not computable at
load time

Thanks to Matt Thomas who gave this description:
This is almost certainly due to foo being 32 bits and the address of
"string" being 64 bits.  So you telling the compiler to store the lower
part of address and there isn't a mechanism in ELF to do that.

	
>How-To-Repeat:
Try to compile cddbd on an alpha machine.  Lose.

	
>Fix:
The below patches work for alpha, and I tested them against i386, and they
caused no problems.
Two new patches:

--- cddbd.c.orig	Sun Jun 14 06:42:12 1998
+++ cddbd.c	Sun Jun 14 06:42:50 1998
@@ -191,14 +191,14 @@
 access_t acctab[] = {
-	"logfile",	logfile,       AC_PATH,    0,	     (int)TMPDIR"/log",
-	"motdfile",	motdfile,      AC_PATH,    0,	     (int)"",
-	"sitefile",	sitefile,      AC_PATH,    0,	     (int)"",
-	"histfile",	histfile,      AC_PATH,    0,	     (int)"",
-	"lockdir",	lockdir,       AC_PATH,    0,	     (int)"",
-	"hashdir",	hashdir,       AC_PATH,    0,	     (int)"",
-	"cddbdir",	cddbdir,       AC_PATH,    0,	     (int)"",
-	"dupdir",	dupdir,	       AC_PATH,    0,	     (int)"",
-	"postdir",	postdir,       AC_PATH,    0,	     (int)"",
-	"smtphost",	smtphost,      AC_STRING,  0,        (int)"localhost",
+	"logfile",	logfile,       AC_PATH,    0,	     (long)TMPDIR"/log",
+	"motdfile",	motdfile,      AC_PATH,    0,	     (long)"",
+	"sitefile",	sitefile,      AC_PATH,    0,	     (long)"",
+	"histfile",	histfile,      AC_PATH,    0,	     (long)"",
+	"lockdir",	lockdir,       AC_PATH,    0,	     (long)"",
+	"hashdir",	hashdir,       AC_PATH,    0,	     (long)"",
+	"cddbdir",	cddbdir,       AC_PATH,    0,	     (long)"",
+	"dupdir",	dupdir,	       AC_PATH,    0,	     (long)"",
+	"postdir",	postdir,       AC_PATH,    0,	     (long)"",
+	"smtphost",	smtphost,      AC_STRING,  0,        (long)"localhost",
 	"admin_email",	admin_email,   AC_STRING,  AF_NODEF, 0,
-	"bounce_email",	bounce_email,  AC_STRING,  0,	     (int)"",
+	"bounce_email",	bounce_email,  AC_STRING,  0,	     (long)"",
 	"xmit_time",	&xmit_time,    AC_NUMERIC, AF_ZERO,  DEF_XMIT_TO,

--- cddbd.h.orig	Sun Jun 14 06:41:32 1998
+++ cddbd.h	Sun Jun 14 06:42:05 1998
@@ -261,3 +261,3 @@
 	int	at_flags;		/* Access flags. */
-	int	at_def;			/* Default value. */
+	long	at_def;			/* Default value. */
 } access_t;


	
>Audit-Trail:
>Unformatted: