From nobody@FreeBSD.org  Sun Oct 11 18:59:56 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E0BCB1065672
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 11 Oct 2009 18:59:55 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id D08998FC31
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 11 Oct 2009 18:59:55 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n9BIxtQW005583
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 11 Oct 2009 18:59:55 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n9BIxttN005582;
	Sun, 11 Oct 2009 18:59:55 GMT
	(envelope-from nobody)
Message-Id: <200910111859.n9BIxttN005582@www.freebsd.org>
Date: Sun, 11 Oct 2009 18:59:55 GMT
From: Nathaniel Filardo <nwf@cs.jhu.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: twa driver fails to build in CURRENT
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         139527
>Category:       kern
>Synopsis:       [twa] twa driver fails to build in CURRENT
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 11 19:00:09 UTC 2009
>Closed-Date:    Mon Aug 23 19:44:01 UTC 2010
>Last-Modified:  Sun Mar 11 01:50:12 UTC 2012
>Originator:     Nathaniel Filardo
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD hydra.priv.oc.ietfng.org 9.0-CURRENT FreeBSD 9.0-CURRENT #7: Thu Sep 24 22:08:03 EDT 2009     root@hydra.priv.oc.ietfng.org:/systank/obj/systank/src/sys/NWFKERN  sparc64

>Description:
While building twa, the TW_CL_SWAP64 macro raises errors:

cc -c -O -pipe  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc  -I. -I/systank/src/sys -I/systank/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000  -mcmodel=medany -msoft-float -ffreestanding -fstack-protector -Werror  /systank/src/sys/dev/twa/tw_cl_io.c -I/systank/src/sys/dev/twa
/systank/src/sys/dev/twa/tw_cl_io.c: In function 'tw_cli_get_param':
/systank/src/sys/dev/twa/tw_cl_io.c:790: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:790: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:790: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:790: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:790: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:790: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:790: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:790: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c: In function 'tw_cli_set_param':
/systank/src/sys/dev/twa/tw_cl_io.c:908: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:908: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:908: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:908: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:908: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:908: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:908: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:908: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:908: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c: In function 'tw_cli_send_scsi_cmd':
/systank/src/sys/dev/twa/tw_cl_io.c:1313: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:1313: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:1313: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:1313: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:1313: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:1313: error: lvalue required as unary '&' operand
/systank/src/sys/dev/twa/tw_cl_io.c:1313: error: lvalue required as unary '&' operand

etc.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback  
State-Changed-By: brucec 
State-Changed-When: Wed Feb 17 14:00:14 UTC 2010 
State-Changed-Why:  
I suspect the problem is due to settings in /etc/src.conf or /etc/make.conf. 
Could you email the contents of those files please? 

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

From: Garrett Cooper <yanefbsd@gmail.com>
To: bug-followup@FreeBSD.org, nwf@cs.jhu.edu
Cc:  
Subject: Re: kern/139527: [twa] twa driver fails to build in CURRENT
Date: Tue, 8 Jun 2010 15:35:04 -0700

 Going once... going twice... close me?
 -Garrett
State-Changed-From-To: feedback->closed 
State-Changed-By: delphij 
State-Changed-When: Mon Aug 23 19:43:29 UTC 2010 
State-Changed-Why:  
Mark closed due to feedback timeout. 


Responsible-Changed-From-To: freebsd-bugs->delphij 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Mon Aug 23 19:43:29 UTC 2010 
Responsible-Changed-Why:  
Take so just in case there is still problem. 

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

From: Nathaniel W Filardo <nwf@cs.jhu.edu>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/139527: %5Btwa%5D twa driver fails to build in CURRENT
Date: Sat, 10 Mar 2012 20:33:30 -0500

 --ryJZkp9/svQ58syV
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 I had replaced the card and then forgot about this, but today I attempted to
 build the driver again and, lo', the errors and my memory of the bug
 resurfaced.  So:
 
 I don't have an /etc/src.conf, and /etc/make.conf is pretty boring:
 > WRKDIRPREFIX?=  /usr/obj/ports
 > WITHOUT_X11= Yes
 > FETCH_ENV= HTTP_PROXY=http://172.29.0.52:3128/
 > CPUTYPE=ultrasparc3
 > # added by use.perl 2012-02-20 17:02:38
 > PERL_VERSION=5.12.4
 
 uname -a is a little further in the future, too:
 > FreeBSD hydra.priv.oc.ietfng.org 9.0-STABLE FreeBSD 9.0-STABLE #31
 > r232602+b4f0300-dirty: Tue Mar  6 09:32:59 EST 2012
 > root@hydra.priv.oc.ietfng.org:/usr/obj/systank/src/sys/NWFKERN  sparc64
 
 Let me tentatively suggest that the answer is to replace the current
 definition which relies on pointer tricks:
 > #define TW_CL_SWAP64_WITH_CAST(x)                                       \
 >         ((((TW_UINT64)(TW_CL_SWAP32(((TW_UINT32 *)(&(x)))[1]))) << 32) |\
 >         ((TW_UINT32)(TW_CL_SWAP32(((TW_UINT32 *)(&(x)))[0]))))
 with a purely numeric, host-endian-agnostic equivalent (along the lines of
 the other macros):
 > #define TW_CL_SWAP64_WITH_CAST(x)                                       \
 >         ((TW_UINT64)(TW_CL_SWAP32((x) >> 32)))                         |\
 >         ((TW_UINT64)(TW_CL_SWAP32((x) & 0xFFFFFFFF)) << 32)
 in /src/sys/dev/twa/tw_cl_share.h:248 .
 
 This compiles but I have not yet tested the driver with real hardware on my
 big-endian system.  Will report back when I can; hopefully before 2014.
 --nwf;
 
 --ryJZkp9/svQ58syV
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iEYEARECAAYFAk9cAOkACgkQTeQabvr9Tc96sQCeKOc1G9FKL3wV0PO619iFYMCd
 5s4Aniz0ICMEaLDkzpQOGeqdQ/+Fqb5M
 =vkNU
 -----END PGP SIGNATURE-----
 
 --ryJZkp9/svQ58syV--
>Unformatted:
