Closed tladesignz closed 4 years ago
@chrisballinger Any ideas on this?
@tladesignz Are you able to compile CPAProxy w/ the latest Tor versions? https://github.com/ursachec/CPAProxy/blob/marzipan/scripts/build-libs.sh#L64
Same with newest Tor 0.4.2.6 and 0.4.1.8.
@tladesignz Are you able to compile CPAProxy w/ the latest Tor versions?
Thanks for that idea, @chrisballinger, I'll have a look at it!
@chrisballinger, CPAProxy's build-all script runs with latest versions (Tor 0.4.2.5, OpenSSL 1.1.1d and libevent 2.1.11) But of course, the Objective-C glue code comes in only afterwards here. (Which is, where my problems lie.)
So I added CPAProxy as a dependency to a test project. First I tried with the original versions:
Undefined symbols for architecture arm64:
"_inflateEnd", referenced from:
_tor_zlib_compress_free_ in libtor-compress.a(compress_zlib.o)
"_deflate", referenced from:
_tor_zlib_compress_process in libtor-compress.a(compress_zlib.o)
"_inflate", referenced from:
_tor_zlib_compress_process in libtor-compress.a(compress_zlib.o)
"_zlibVersion", referenced from:
_tor_zlib_get_version_str in libtor-compress.a(compress_zlib.o)
"_deflateInit2_", referenced from:
_tor_zlib_compress_new in libtor-compress.a(compress_zlib.o)
"_deflateEnd", referenced from:
_tor_zlib_compress_free_ in libtor-compress.a(compress_zlib.o)
"_inflateInit2_", referenced from:
_tor_zlib_compress_new in libtor-compress.a(compress_zlib.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does this thing run at all, in the state it currently is?
I had to replace this: https://github.com/ursachec/CPAProxy/blob/ee5e827e82275ac80a9153fcbd4209db37fe84ba/CPAProxy/GCDAsyncSocket%2BCPAProxy.h#L9
with this:
#import <CocoaAsyncSocket/GCDAsyncSocket.h>
Otherwise wouldn't start compiling at all.
@tladesignz You just gotta link libz
to fix those linker errors. Please check out the marzipan
branch not master
: https://github.com/ursachec/CPAProxy/tree/marzipan which eliminates the dependency on CocoaAsyncSocket. However I'm not sure if the new Network.framework
code written for the control socket is functional, which is why I have Tor disabled in ChatSecure v5.0. It compiles and links just fine though.
Man, that's so annoying. Not everyone is on MacOS 10.15, already. Mostly because it's so shitty.
10.15 ain't so bad now, unless you've got some ancient 32-bit programs as part of your daily workflow. ;)
So, I finally gave in and installed Catalina. I could compile CPAProxy with the marzipan branch. And I don't get this error there.
Reason is: the wrapping layer of CPAProxy around Tor is much thinner. So there's no code, where Tor and Objective-C code using CFStream
is used together.
I don't see what I could learn from that, now. :-/
Next steps:
@nmathewson found the problem. I just did a new release containing Tor 0.4.2.7. Yay!
https://blog.torproject.org/new-release-0425-also-0417-0406-and-0359
Building 0.4.0.6 works out of the box. However, when trying to build 0.4.2.5 or 0.4.1.7, I'm getting this error:
error: unknown type name 'dispatch_queue_t'
inFoundation.framework
.WTF? It seems, somehow Tor mangles with
dispatch_queue_t
or with anything around it, so the compiler doesn't recognize it anymore.@mtigas, do you have any idea where to start looking?