Subject: pkg/33897: benchmarks/ttcp is not 64-bit clean (alpha/ultrasparc)
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <fair@netbsd.org>
List: pkgsrc-bugs
Date: 07/02/2006 22:35:00
>Number:         33897
>Category:       pkg
>Synopsis:       benchmarks/ttcp is not 64-bit clean (alpha/ultrasparc)
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 02 22:35:00 +0000 2006
>Originator:     Erik E. Fair
>Release:        NetBSD 3.99.7
>Organization:
	The NetBSD Project
>Environment:
	
	
System: NetBSD 3.99.7 (PC164-ROUTER) #1: Sat Aug 6 12:12:56 PDT 2005
Architecture: alpha
Machine: alpha

	NetBSD 3.99.7 (PC164-ROUTER) #1: Sat Aug  6 12:12:56 PDT 2005
		root@timex.clock.org:/usr/obj/sys/arch/alpha/compile/PC164-ROUTER
	Digital AlphaPC 164 500 MHz, s/n 
	8192 byte page size, 1 processor.
	total memory = 256 MB
	(2472 KB reserved for PROM, 253 MB used by NetBSD)
	avail memory = 245 MB
	mainbus0 (root)
	cpu0 at mainbus0: ID 0 (primary), 21164A-2
	cpu0: Architecture extensions: 1<BWX>
	[...]

 also:
	NetBSD 3.0 (GENERIC) #0: Mon Dec 19 04:05:17 UTC 2005
		builds@b4.netbsd.org:/home/builds/ab/netbsd-3-0-RELEASE/sparc64/200512182024Z-obj/home/builds/ab/netbsd-3-0-RELEASE/src/sys/arch/sparc64/compile/GENERIC
	total memory = 256 MB
	avail memory = 239 MB
	bootpath: /sbus@1f,0/SUNW,fas@e,8800000/sd@0,0
	mainbus0 (root): SUNW,Ultra-2: hostid
	cpu0 at mainbus0: SUNW,UltraSPARC-II @ 296.003 MHz, version 0 FPU
	cpu0: 32K instruction (32 b/l), 16K data (32 b/l), 2048K external (64 b/l)
	[...]

>Description:
	benchmarks/ttcp doesn't work on Alpha or UltraSPARC; very
	probably due to LP64 issues.

	NetBSD should take over maintenance of this small piece of
	useful software, and also fix PR 22102 at the same time.

	The package should be disabled for 64-bit platforms until fixed.

	I'll see if I can't hack it up to work, and send diffs to this PR,
	that one of the pkgsrc maintainers can integrate.

>How-To-Repeat:
	fair@Alpha 42} make ttcp
	cc -O2   -o ttcp ttcp.c 
	ttcp.c: In function `main':
	ttcp.c:263: warning: cast to pointer from integer of different size
	ttcp.c:266: warning: cast from pointer to integer of different size
	ttcp.c:288: warning: passing arg 2 of `bind' from incompatible pointer type
	ttcp.c:329: warning: passing arg 2 of `connect' from incompatible pointer type
	ttcp.c:351: warning: passing arg 2 of `accept' from incompatible pointer type
	ttcp.c:356: warning: passing arg 2 of `getpeername' from incompatible pointer type
	ttcp.c: In function `Nread':
	ttcp.c:755: warning: passing arg 5 of `recvfrom' from incompatible pointer type
	ttcp.c: In function `Nwrite':
	ttcp.c:785: warning: passing arg 5 of `sendto' from incompatible pointer type
	ttcp.c: In function `delay':
	ttcp.c:806: warning: passing arg 2 of `select' from incompatible pointer type
	ttcp.c:806: warning: passing arg 3 of `select' from incompatible pointer type
	ttcp.c:806: warning: passing arg 4 of `select' from incompatible pointer type
	3.2u 0.2s 0:03.47 99.1% 0+0k 0+12io 0pf+0w

	fair@Alpha 43} ./ttcp -r -s -v
	ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
	ttcp-r: socket
	ttcp-r: bind: Address family not supported by protocol family
	errno=47

	fair@UltraSPARC 27} make ttcp
	cc -O2   -o ttcp ttcp.c 
	ttcp.c: In function `main':
	ttcp.c:263: warning: cast to pointer from integer of different size
	ttcp.c:266: warning: cast from pointer to integer of different size
	ttcp.c:288: warning: passing arg 2 of `bind' from incompatible pointer type
	ttcp.c:329: warning: passing arg 2 of `connect' from incompatible pointer type
	ttcp.c:351: warning: passing arg 2 of `accept' from incompatible pointer type
	ttcp.c:356: warning: passing arg 2 of `getpeername' from incompatible pointer type
	ttcp.c: In function `Nread':
	ttcp.c:755: warning: passing arg 5 of `recvfrom' from incompatible pointer type
	ttcp.c: In function `Nwrite':
	ttcp.c:785: warning: passing arg 5 of `sendto' from incompatible pointer type
	2.9u 0.2s 0:05.13 61.7% 0+0k 8+12io 239pf+0w

	fair@UltraSPARC 28} ./ttcp -r -s
	ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
	ttcp-r: socket
	ttcp-r: bind: Address family not supported by protocol family
	errno=47

>Fix:
	

>Unformatted: