Thanks for the heads up.<br>I got it working on my mipsel box.<br><br>First of all I switched to 2.3.18-rc git.<br><br>I build the latest zlib 1.2.7 with -fPIC and -DPIC (seems to be required for mipsel).<br><br>I recompiled and reinstalled OpenSSL 1.0.1 with "shared no-ssl2 enable-tlsext"<br>
"shared" also seems to build the static libraries aswell.<br><br>Then I reconpiled and libevent 2.0.19-stable.<br>For libevent I also used the --with-pic and pointed the ./configure to my compiled zlib 1.2.7<br>
Also I left out the "--disable-debug-option"  this time.<br><br>Now for Tor, it seems that this "bufferevents"-options causes problems.<br>I threw away the log but it makes setting up the circuit very slow and after a while I'm getting timeouts and errors about "connections marked for closing?"<br>
If you want I can rebuild it with bufferevents and send you a detailed log about it.<br><br>Anywyas I build it using these options:<br><br>./configure --host=mipsel-oe-linux --prefix=/usr --localstatedir=/var --sysconfdir=/etc \<br>
--with-openssl-dir=/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib \<br>--with-zlib-dir=/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib \<br>--with-libevent-dir=/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib \<br>
--enable-static-libevent --disable-asciidoc --enable-static-zlib --enable-static-openssl \<br>CPPFLAGS="-I/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/include" \<br>LDFLAGS="-L/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib" LIBS="-lz"<br>
<br>The resulting binary is still 5Megs after I manually stripped it, but it seems to work :)<br><br>I still can't configure with --enable-static-tor though.<br>The OpenSSL test will fail with:<br><br>configure:6940: mipsel-oe-linux-gcc -o conftest  -static -I/usr/local/include -I/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/include -I${top_srcdir}/src/common -L/usr/local/lib -L/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib conftest.c -lpthread -lrt -ldl -lz -lssl -lcrypto  >&5<br>
conftest.c: In function 'main':<br>conftest.c:61: warning: incompatible implicit declaration of built-in function 'exit'<br>/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':<br>
dso_dlfcn.c:(.text+0x110): undefined reference to `dlopen'<br>dso_dlfcn.c:(.text+0x178): undefined reference to `dlerror'<br>dso_dlfcn.c:(.text+0x2a8): undefined reference to `dlclose'<br>/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':<br>
dso_dlfcn.c:(.text+0x44c): undefined reference to `dlclose'<br>/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':<br>dso_dlfcn.c:(.text+0x64c): undefined reference to `dlsym'<br>
dso_dlfcn.c:(.text+0x6b4): undefined reference to `dlerror'<br>/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':<br>dso_dlfcn.c:(.text+0x900): undefined reference to `dlsym'<br>
dso_dlfcn.c:(.text+0x968): undefined reference to `dlerror'<br>/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':<br>dso_dlfcn.c:(.text+0x10dc): undefined reference to `dladdr'<br>
dso_dlfcn.c:(.text+0x11cc): undefined reference to `dlerror'<br>/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':<br>dso_dlfcn.c:(.text+0x125c): undefined reference to `dlopen'<br>
dso_dlfcn.c:(.text+0x1290): undefined reference to `dlsym'<br>dso_dlfcn.c:(.text+0x12b0): undefined reference to `dlclose'<br>/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib/libcrypto.a(c_zlib.o): In function `zlib_stateful_init':<br>
c_zlib.c:(.text+0x214): undefined reference to `inflateInit_'<br>c_zlib.c:(.text+0x2c8): undefined reference to `deflateInit_'<br>/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib/libcrypto.a(c_zlib.o): In function `zlib_stateful_finish':<br>
c_zlib.c:(.text+0x43c): undefined reference to `inflateEnd'<br>c_zlib.c:(.text+0x464): undefined reference to `deflateEnd'<br>/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib/libcrypto.a(c_zlib.o): In function `zlib_stateful_compress_block':<br>
c_zlib.c:(.text+0x5d0): undefined reference to `deflate'<br>/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib/libcrypto.a(c_zlib.o): In function `zlib_stateful_expand_block':<br>c_zlib.c:(.text+0x724): undefined reference to `inflate'<br>
/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib/libcrypto.a(c_zlib.o): In function `bio_zlib_free':<br>c_zlib.c:(.text+0xb7c): undefined reference to `inflateEnd'<br>c_zlib.c:(.text+0xbe8): undefined reference to `deflateEnd'<br>
/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib/libcrypto.a(c_zlib.o): In function `bio_zlib_read':<br>c_zlib.c:(.text+0xdf8): undefined reference to `inflateInit_'<br>c_zlib.c:(.text+0xe64): undefined reference to `inflate'<br>
c_zlib.c:(.text+0xedc): undefined reference to `zError'<br>/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib/libcrypto.a(c_zlib.o): In function `bio_zlib_write':<br>c_zlib.c:(.text+0x1274): undefined reference to `deflateInit_'<br>
c_zlib.c:(.text+0x149c): undefined reference to `deflate'<br>c_zlib.c:(.text+0x1504): undefined reference to `zError'<br>/home/mastag/src/openpli/build-dm800/tmp/sysroots/mipsel-oe-linux/lib/libcrypto.a(c_zlib.o): In function `bio_zlib_flush':<br>
c_zlib.c:(.text+0x17e8): undefined reference to `deflate'<br>c_zlib.c:(.text+0x1874): undefined reference to `zError'<br>collect2: ld returned 1 exit status<br><br>The dso_dlfcn.c errors can be solved by compiling OpenSSL with "no-dso".<br>
However I can't figure out why the static OpenSSL has trouble finding zlib?<br>I don't think it's a problem because my semi-static binary works well enough now :)<br><br><br><br><div class="gmail_quote">2012/6/27 grarpamp <span dir="ltr"><<a href="mailto:grarpamp@gmail.com" target="_blank">grarpamp@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">> I had to alter the Makefile<br>
</div>> and tell the linker where to find ... libz.so and libz.a and zlib includes<br>
<br>
If you got a static 'openssl' binary with zlib in it, and both<br>
.a and .so's for the openssl libs, and libevent and tor compiled<br>
against that, I'd like to see the openssl diff. I gave up early.<br>
<div class="im"><br>
> Also libevent and tor need the ./configure CPPFLAGS and LDFLAGS for zlib<br>
<br>
</div>Yeah, and and for against openssl and libevent too. I left that out.<br>
<div class="im"><br>
> I'm only encountering timeouts after the circuit has been established:<br>
> Jun 26 21:21:04.000 [notice] Tried for 120 seconds to get a connection to<br>
> [scrubbed]:53. Giving up. (waiting for circuit)<br>
<br>
</div>Don't know., sounds normal, send a signal newnym.<br>
<br>
> static OpenSSL 1.0.1c (... zlib ...)<br>
<br>
I think 'zlib' works the same as not specifying any zlib* phrase.<br>
And that not specifying 'shared' gets you only static libs and<br>
a dynamic bin, 'shared' adds dyn libs.<br>
<div class="im"><br>
> libevent-2.0.19-stable (bufferevents enabled)<br>
> Also I compiled with miniupnpc-1.7 and libnatpmp-20110808 support.<br>
> I think the Tor binary is too big 5.3MB which is due to libcrypto.a being<br>
> 4.4MB (stripped).<br>
<br>
</div>Tor here is 3487400 bytes, stripped.<br>
<div class="im"><br>
> Would you happen to know which ciphers I can drop from OpenSSL? (so I can<br>
> shrink it a bit).<br>
<br>
</div>It's in the torspec docs somewhere. Probably just rsa, dh, aes and x509, basics.<br>
Or try debug in openssl.conf.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
tor-dev mailing list<br>
<a href="mailto:tor-dev@lists.torproject.org">tor-dev@lists.torproject.org</a><br>
<a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev" target="_blank">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev</a><br>
</div></div></blockquote></div><br>