Building tor on Solaris10-Sparc and SunStudio CC
Thomas.Hluchnik at netcologne.de
Thomas.Hluchnik at netcologne.de
Wed Aug 26 19:05:55 UTC 2009
Hello,
may I shortly introduce myself here: I am a german Sysadmin who is member of the German Privacy Foundation. I am running two tor nodes with Linux (baphomet, info4all) privately. Now I take my time to play around running tor on Sparc/Solaris10 with Sun's Compiler Suite. For this purpose I have another node (herecomesthesun) running at home via DSL. Perhaps I can manage to setup a high volume tor node on Sparc hardware in the near future.
My test machine:
Sun Enterprise E450, 4x248 Mhz, 2GB RAM
root at e450# uname -a
SunOS e450 5.10 Generic_127127-11 sun4u sparc SUNW,Ultra-4
root at e450# pkginfo -l SPROcc
PKGINST: SPROcc
NAME: Sun Studio 12 C Compiler
CATEGORY: application
ARCH: sparc
VERSION: 12.0,REV=2007.05.03
You must know that I am NO programmer. I dont understand any C code.
When building the tor executables I noticed some courious messages I would like to tell here, maybe this helps the developers improving the code.
First, I changed the configure script fast & dirty to enable threads with Solaris:
if test x$enable_threads = x; then
case $host in
*-*-solaris* )
# Don't try multithreading on solaris -- cpuworkers seem to lock.
{ echo "$as_me:$LINENO: You are running Solaris; Sometimes threading makes
cpu workers lock up here. Use it at your risk." >&5
echo "$as_me: You are running Solaris; Sometimes threading makes
cpu workers lock up here. Use it at your risk." >&6;}
enable_threads="yes";;
*)
enable_threads="yes";;
esac
fi
This seems to work, because configure notices:
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create... yes
Another message that always occurs with or without threads is this:
checking for net/pfvar.h... no
checking for linux/netfilter_ipv4.h... no
configure: Transparent proxy support enabled, but missing headers.
checking for struct timeval.tv_sec... yes
OK. configure succeeds.
Then doing make, I get some warning messages here:
source='compat.c' object='compat.o' libtool=no \
DEPDIR=.deps depmode=none /bin/bash ../../depcomp \
cc -DHAVE_CONFIG_H -I. -I../.. -I../../src/common -I/usr/local/ssl/include -g -g -O -c compat.c
"compat.c", line 373: warning: initializer does not fit or is out of range: 128
"compat.c", line 373: warning: initializer does not fit or is out of range: 129
"compat.c", line 373: warning: initializer does not fit or is out of range: 130
...
... # lots of lines here !
...
"compat.c", line 398: warning: initializer does not fit or is out of range: 255
"compat.c", line 1162: warning: statement not reached
"compat.c", line 2177: warning: initializer does not fit or is out of range: -1
source='circuituse.c' object='circuituse.o' libtool=no \
DEPDIR=.deps depmode=none /bin/bash ../../depcomp \
cc -DHAVE_CONFIG_H -I. -I../.. -DSHARE_DATADIR="\"/usr/share\"" -DLOCALSTATEDIR="\"/usr/var\"" -DBINDIR="\"/usr/bin\"" -I../../src/common -I/usr/local/ssl/include -g -g -O -c circuituse.c
"circuitlist.c", line 679: warning: loop not entered at top
source='buffers.c' object='buffers.o' libtool=no \
DEPDIR=.deps depmode=none /bin/bash ../../depcomp \
cc -DHAVE_CONFIG_H -I. -I../.. -DSHARE_DATADIR="\"/usr/share\"" -DLOCALSTATEDIR="\"/usr/var\"" -DBINDIR="\"/usr/bin\"" -I../../src/common -I/usr/local/ssl/include -g -g -O -c buffers.c
"buffers.c", line 1456: warning: statement not reached
source='geoip.c' object='geoip.o' libtool=no \
DEPDIR=.deps depmode=none /bin/bash ../../depcomp \
cc -DHAVE_CONFIG_H -I. -I../.. -DSHARE_DATADIR="\"/usr/share\"" -DLOCALSTATEDIR="\"/usr/var\"" -DBINDIR="\"/usr/bin\"" -I../../src/common -I/usr/local/ssl/include -g -g -O -c geoip.c
"geoip.c", line 296: warning: syntax error: empty declaration
"geoip.c", line 298: warning: syntax error: empty declaration
make finishes successful (exit 0) an I got a binary:
root at e450# file src/or/tor
src/or/tor: ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
root at e450# ldd src/or/tor
libz.so.1 => /usr/lib/libz.so.1
libevent-1.4.so.2 => /usr/lib/libevent-1.4.so.2
libssl.so.0.9.8 => /usr/local/ssl/lib/libssl.so.0.9.8
libcrypto.so.0.9.8 => /usr/local/ssl/lib/libcrypto.so.0.9.8
libnsl.so.1 => /lib/libnsl.so.1
libsocket.so.1 => /lib/libsocket.so.1
libc.so.1 => /lib/libc.so.1
librt.so.1 => /lib/librt.so.1
libresolv.so.2 => /lib/libresolv.so.2
libdl.so.1 => /lib/libdl.so.1
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libmp.so.2 => /lib/libmp.so.2
libmd.so.1 => /lib/libmd.so.1
libscf.so.1 => /lib/libscf.so.1
libaio.so.1 => /lib/libaio.so.1
libdoor.so.1 => /lib/libdoor.so.1
libuutil.so.1 => /lib/libuutil.so.1
libgen.so.1 => /lib/libgen.so.1
libm.so.2 => /lib/libm.so.2
/platform/SUNW,Ultra-4/lib/libc_psr.so.1
/platform/SUNW,Ultra-4/lib/libmd_psr.so.1
Please notice libgcc_s.so.1 Is this OK? I use Sun's CC, so is this wrong or right to have linked the binary against a gcc library? The executable works all day long, I got no errors.
Kind Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20090826/d1677ee1/attachment.pgp>
More information about the tor-dev
mailing list