The sources for Tor 0.4.7.7 (and earlier releases) will not compile on OpenBSD 7.1.
The OpenSSL version is: LibreSSL 3.5.2 .
The error returned is:
src/test/test_crypto_openssl.c:64:25: error: invalid application of ‘sizeof’ to an incomplete type ‘EVP_ENCODE_CTX’ (aka ‘struct evp_Encode_Ctx_st’)
EVP_ENCODE_CTX *ctx = EVP_ENCODE_CTX_new();
^~~~~~~~~~~~~~~~~~~~
src/test/test_crypto_openssl.c:53:46: note: expanded from macro ‘EVP_ENCODE_CTX_new’
#define EVP_ENCODE_CTX_new() tor_malloc_zero(sizeof(EVP_ENCODE_CTX))
^ ~~~~~~~~~~~~~~~~
./src/lib/malloc/malloc.h:59:49: note: expanded from macro ‘tor_malloc_zero’
#define tor_malloc_zero(size) tor_malloc_zero_(size)
^~~~
/usr/include/openssl/ossl_typ.h:112:16: note: forward declaration of ‘struct evp_Encode_Ctx_st’
typedef struct evp_Encode_Ctx_st EVP_ENCODE_CTX;
^
1 error generated.
*** Error 1 in target ‘src/test/test-test_crypto_openssl.o’
*** Error 1 in . (Makefile:22364 ‘src/test/test-test_crypto_openssl.o’: @echo "
CC " src/test/test-test_crypto_openssl.o;cc -DHAVE_CON…)
*** Error 2 in /home/kheper/sources/tor-0.4.7.7 (Makefile:7468 ‘all’)
ahf
May 18, 2022, 12:36pm
2
Hello and welcome to the Tor community forum.
What prevents you from using the ports tree version of Tor here? It’s my impression that it’s updated to 0.4.7.7. They do apply some patches specifically related to the LibreSSL implementation that provides libssl and libcrypto on OpenBSD.
3 Likes
Nothing prevents me from using OpenBSD’s Tor package or port. A few programs, I like to compile by hand - tor being one of them. In the past, OpenBSD’s Tor package was far out of date. The 7.1 package version is 0.4.6.10. I’ll apply the patches in the ports tree to the 0.4.7.7 sources, then compile again. Thanks.
ahf
May 18, 2022, 4:05pm
4
Excellent. Let us know if that doesn’t work out for you.
2 Likes
system
Closed
May 18, 2022, 7:09pm
5
This topic was automatically closed 2 hours after the last reply. New replies are no longer allowed.
gus
May 19, 2022, 3:11am
6
Please see this message from Gman999:
The OpenBSD net/tor -current port is correctly on 0.4.7.7, but the -stable port is still on 0.4.6.10.
I submitted a diff to update -stable port to 0.4.7.7 last week, but it has not been committed yet.
https://marc.info/?l=openbsd-ports&m=165179875418235&w=2
It's attached and should work fine.
In order to update the OpenBSD -stable port you need an updated -stable 7.1 ports tree, then you apply the patch within the /usr/ports/net/tor port, and build from there.
I can provide more guidance if…
2 Likes