Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jan 2006 21:16:21 -0500 (EST)
From:      "Jeffrey H. Johnson" <CPE1704TKS@bellsouth.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        mnag@FreeBSD.org, ports@FreeBSD.org, CPE1704TKS@bellsouth.net, ports-amd64@FreeBSD.org, kris@obsecurity.org
Subject:   ports/92658: [PATCH] sysutils/heirloom: [Unbreak AMD64 build]
Message-ID:  <20060201021621.92CD93981C@offworld.cqasys.com>
Resent-Message-ID: <200602010220.k112K3ja029806@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         92658
>Category:       ports
>Synopsis:       [PATCH] sysutils/heirloom: [Unbreak AMD64 build]
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 01 02:20:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Jeffrey H. Johnson
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD offworld.cqasys.com 6.0-STABLE FreeBSD 6.0-STABLE #21: Wed Jan 18 22:35:45 EST 2006
>Description:

> Subject: heirloom-060122 failed on amd64 6
> [.. snip ..]
> http://pointyhat.freebsd.org/errorlogs/amd64-errorlogs/e.7.2006011605/heirloom-060122.log
> http://portsmon.freebsd.org/portoverview.py?category=&portname=heirloom&wildcard=

This only seems to fail on 6 and 7, not on 5 which is strange!  It
also works on all other 64-bit architectures.  The code in question
is actually code from OpenSolaris.  I see no reason why it would
fail, but I do not have access to an AMD64 machine.  

I had someone who does send me a back trace, and the error is in a 
debugging statement, and apparently it is argv becoming corrupted.

Commenting out the debugging statements fix the port, and it also
produces bit-identical output, verified by sha256.  

I can only assume this is a compiler bug on AMD64 FreeBSD!  This
code also works correctly when compiled for 64-bit PPC Mac OS X.

Someone else can verify?

Again, not compiling-in these two fprintf statements will fix the
build on AMD64.  I wasn't able to test using a non-default compiler.

Thanks.

Added file(s):
- files/patch-spell::spellin.c

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- heirloom-060122.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sysutils/heirloom/files/patch-spell::spellin.c /usr/home/trn/heirloom/files/patch-spell::spellin.c
--- /usr/ports/sysutils/heirloom/files/patch-spell::spellin.c	Wed Dec 31 19:00:00 1969
+++ /usr/home/trn/heirloom/files/patch-spell::spellin.c	Tue Jan 31 21:10:33 2006
@@ -0,0 +1,19 @@
+--- spell/spellin.c.orig	Tue Jan 31 20:45:43 2006
++++ spell/spellin.c	Tue Jan 31 21:05:25 2006
+@@ -146,12 +146,16 @@
+ 	for (i = 0; i < wp; i++)
+ 		le32p(table[i], (char *)&table[i]);
+ 	fwrite((char *)table, sizeof (*table), wp, stdout);
++#ifndef __amd64__
+ 	fprintf(stderr,
+ 	    "%s: %ld items, %d ignored, %d extra, %u words occupied\n",
+ 	    argv[0], (long)count, ignore, extra, (unsigned)wp);
++#endif /* !amd64 */
+ 	count -= ignore;
++#ifndef __amd64__
+ 	fprintf(stderr, "%s: %f table bits/item, %f table+index bits\n",
+ 	    argv[0], (((float)BYTE * wp) * sizeof (*table) / count),
+ 	    (BYTE * ((float)wp * sizeof (*table) + sizeof (hindex)) / count));
++#endif /* !amd64 */
+ 	return 0;
+ }
--- heirloom-060122.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060201021621.92CD93981C>