clockspeed issues on NetBSD/sparc64
Sean Davis <[email protected]> Thu, 27 May 2004 09:36:55 -0400
| Newsgroups | gmane.comp.lib.libtai |
|---|---|
| Message-ID | <[email protected]> |
Hi, first off, I realize it was a bit of a stretch to expect
clockspeed to compile and work on a sparc machine running NetBSD, but
I thought I'd give it a shot anyway. The compile bombed. I'd like to
note at this point that clockspeed built and installed fine on the
same version of NetBSD/i386 - so I suspect it is an architecture issue
(since I'm not sure whether the NetBSD kernel lets userland see %tick,
as Solaris does)
Anyway, on to the build output, in case it is of any help:
starways# make setup check
nroff -man clockspeed.1 > clockspeed.0
nroff -man clockadd.1 > clockadd.0
nroff -man clockview.1 > clockview.0
( cat warn-auto.sh; echo CC=\'`head -1 conf-cc`\'; echo LD=\'`head
-1 conf-ld`\' ) > auto-ccld.sh
cat auto-ccld.sh make-load.sh > make-load
chmod 755 make-load
cat auto-ccld.sh find-systype.sh > find-systype
chmod 755 find-systype
./find-systype > systype
( cat warn-auto.sh; ./make-load "`cat systype`" ) > load
chmod 755 load
cat auto-ccld.sh make-compile.sh > make-compile
chmod 755 make-compile
( cat warn-auto.sh; ./make-compile "`cat systype`" ) > compile
chmod 755 compile
( ./compile trysysel.c >/dev/null 2>&1 && cat select.h2 || cat
select.h1 ) > select.h
rm -f trysysel.o trysysel
( ( ./compile tryulong64.c && ./load tryulong64 && ./tryulong64 )
>/dev/null 2>&1 && cat uint64.h1 || cat uint64.h2 )
rm -f tryulong64.o tryulong64
./compile sntpclock.c
sntpclock.c: In function `main':
sntpclock.c:123: warning: return type of `main' is not `int'
./compile ip.c
cat auto-ccld.sh make-makelib.sh > make-makelib
chmod 755 make-makelib
( cat warn-auto.sh; ./make-makelib "`cat systype`" ) > makelib
chmod 755 makelib
./compile tai_pack.c
./compile tai_unpack.c
./compile taia_add.c
./compile taia_half.c
./compile taia_less.c
./compile taia_now.c
./compile taia_pack.c
./compile taia_sub.c
./compile taia_unpack.c
./compile leapsecs_add.c
./compile leapsecs_init.c
./compile leapsecs_read.c
leapsecs_read.c: In function `leapsecs_read':
leapsecs_read.c:32: warning: cast to pointer from integer of different size
./makelib libtai.a tai_pack.o tai_unpack.o taia_add.o taia_half.o
taia_less.o taia_now.o taia_pack.o taia_sub.o taia_
./compile strerr_sys.c
./compile strerr_die.c
./makelib strerr.a strerr_sys.o strerr_die.o
./compile substdio.c
./compile substdi.c
./compile substdo.c
./compile subfderr.c
./compile substdio_copy.c
./makelib substdio.a substdio.o substdi.o substdo.o subfderr.o substdio_copy.o
./compile error.c
./compile error_str.c
./makelib error.a error.o error_str.o
./compile str_len.c
./compile str_diff.c
./compile byte_diff.c
./compile byte_chr.c
./compile byte_copy.c
./compile byte_cr.c
./compile byte_zero.c
./makelib str.a str_len.o str_diff.o byte_diff.o byte_chr.o
byte_copy.o byte_cr.o byte_zero.o
./compile fmt_str.c
./compile fmt_uint.c
./compile fmt_uint0.c
./compile fmt_ulong.c
./compile scan_ulong.c
./makelib fs.a fmt_str.o fmt_uint.o fmt_uint0.o fmt_ulong.o scan_ulong.o
( ( ./compile trylsock.c && ./load trylsock -lsocket -lnsl )
>/dev/null 2>&1 && echo -lsocket -lnsl || exit 0 ) > soc
rm -f trylsock.o trylsock
./load sntpclock ip.o libtai.a strerr.a substdio.a error.a str.a fs.a
`cat socket.lib`
./compile taiclock.c
taiclock.c: In function `main':
taiclock.c:57: warning: return type of `main' is not `int'
./load taiclock ip.o libtai.a strerr.a substdio.a error.a str.a fs.a
`cat socket.lib`
./compile taiclockd.c
taiclockd.c: In function `main':
taiclockd.c:21: warning: return type of `main' is not `int'
./load taiclockd libtai.a strerr.a substdio.a error.a str.a `cat socket.lib`
( ( ./compile tryrdtsc.c && ./load tryrdtsc && ./tryrdtsc )
>/dev/null 2>&1 && echo \#define HASRDTSC 1 || exit 0 ) >
rm -f tryrdtsc.o tryrdtsc
( ( ./compile trygethr.c && ./load trygethr ) >/dev/null 2>&1 &&
echo \#define HASGETHRTIME 1 || exit 0 ) > hasgethr.
rm -f trygethr.o
./compile clockspeed.c
clockspeed.c:18: error: syntax error before '!' token
clockspeed.c:28: error: syntax error before '}' token
clockspeed.c: In function `now':
clockspeed.c:33: error: dereferencing pointer to incomplete type
clockspeed.c:34: error: dereferencing pointer to incomplete type
clockspeed.c:35: error: dereferencing pointer to incomplete type
clockspeed.c:36: error: dereferencing pointer to incomplete type
clockspeed.c: In function `main':
clockspeed.c:166: error: invalid use of undefined type `struct point'
clockspeed.c:167: error: invalid use of undefined type `struct point'
clockspeed.c:169: error: invalid use of undefined type `struct point'
clockspeed.c:169: error: `first' has an incomplete type
clockspeed.c:171: error: invalid use of undefined type `struct point'
clockspeed.c:171: error: invalid use of undefined type `struct point'
clockspeed.c:171: error: invalid use of undefined type `struct point'
clockspeed.c:171: error: invalid use of undefined type `struct point'
clockspeed.c:172: error: invalid use of undefined type `struct point'
clockspeed.c:172: error: invalid use of undefined type `struct point'
clockspeed.c:172: error: invalid use of undefined type `struct point'
clockspeed.c:172: error: invalid use of undefined type `struct point'
clockspeed.c:173: error: invalid use of undefined type `struct point'
clockspeed.c:173: error: invalid use of undefined type `struct point'
clockspeed.c:184: error: invalid use of undefined type `struct point'
clockspeed.c:184: error: invalid use of undefined type `struct point'
clockspeed.c:184: error: invalid use of undefined type `struct point'
clockspeed.c:184: error: invalid use of undefined type `struct point'
clockspeed.c:186: error: invalid use of undefined type `struct point'
clockspeed.c:186: error: invalid use of undefined type `struct point'
clockspeed.c:186: error: invalid use of undefined type `struct point'
clockspeed.c:186: error: invalid use of undefined type `struct point'
clockspeed.c:187: error: invalid use of undefined type `struct point'
clockspeed.c:126: warning: return type of `main' is not `int'
clockspeed.c: At top level:
clockspeed.c:71: error: storage size of `first' isn't known
clockspeed.c:72: error: storage size of `current' isn't known
*** Error code 1
Stop.
make: stopped in /tmp/clockspeed-0.62
starways#
I looked at where it bombed first in clockspeed.c, and it appears to
be dying because it doesn't have RDTSC or GETHR. This makes sense; I'm
guessing GETHR is what it uses on non-i386 platforms, if available?
In any case, clockspeed.c won't build - so my original plan of getting
clockspeed adjusted properly on the i386 machine and running taiclockd
to sync the Ultra won't work. Should I just continue to use NTP on the
UltraSPARC, and then once clockspeed has had it's few months to
adjust, run ntpd on the i386 machine and sync the ultra that way?
Or, should I edit the Makefile/source so that it compiles everything
but clockspeed, and do it that way? (I know modifying the source is
generally discouraged; this is why I'm looking for other ideas.)
If there is any more information that would help, I'll be happy to provide it.
Thanks,
-Sean