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.
State Changed From-To: open->feedback 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?
Going once... going twice... close me? -Garrett
State Changed From-To: feedback->closed Mark closed due to feedback timeout.
Responsible Changed From-To: freebsd-bugs->delphij Take so just in case there is still problem.
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;