This repository was archived by the owner on Nov 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 184
This repository was archived by the owner on Nov 18, 2022. It is now read-only.
Fails to compile on Alpine Linux 3.9 (OpenSSL no-comp option) #607
Copy link
Copy link
Closed
Description
Alpine Linux moved from LibreSSL to OpenSSL 1.1.1 for 3.9. As it stands, there are no commits that build.
g++ -DHAVE_CONFIG_H -I. -I./daemon/connect -I./daemon/extension -I./daemon/feed -I./daemon/frontend -I./daemon/main -I./daemon/nntp -I./daemon/postprocess -I./daemon/queue -I./daemon/remote -I./daemon/util -I./daemon/nserv -I./lib/par2 -I./lib/yencode -I/usr/include/libxml2 -g -O2 -c -o daemon/connect/TlsSocket.o daemon/connect/TlsSocket.cpp
daemon/connect/TlsSocket.cpp: In static member function 'static void TlsSocket::Final()':
daemon/connect/TlsSocket.cpp:208:2: error: 'COMP_zlib_cleanup' was not declared in this scope
COMP_zlib_cleanup();
^~~~~~~~~~~~~~~~~
daemon/connect/TlsSocket.cpp:208:2: note: suggested alternative: 'EVP_PBE_cleanup'
COMP_zlib_cleanup();
^~~~~~~~~~~~~~~~~
EVP_PBE_cleanup
make[1]: *** [Makefile:1661: daemon/connect/TlsSocket.o] Error 1
make[1]: Leaving directory '/nzbget'
make: *** [Makefile:980: all] Error 2
I think I have narrowed it down to the fact that OpenSSL is built with the no-comp option on Alpine, which in contrast to another popular distro like Arch, it is not the case:
https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/openssl#n34
https://git.alpinelinux.org/aports/tree/main/openssl/APKBUILD?h=3.9-stable#n58
The following patch to fix the build is as follows, although I'm sure this is not entirely safe, and I have not tested this on any other systems, it simply allows compilation. (See no-comp here: https://wiki.openssl.org/index.php/Compilation_and_Installation)
diff --git a/daemon/connect/TlsSocket.cpp b/daemon/connect/TlsSocket.cpp
index 5ab31644..544bf685 100644
--- a/daemon/connect/TlsSocket.cpp
+++ b/daemon/connect/TlsSocket.cpp
@@ -204,7 +204,9 @@ void TlsSocket::Final()
//ENGINE_cleanup();
CONF_modules_free();
CONF_modules_unload(1);
+#ifndef OPENSSL_NO_COMP
COMP_zlib_cleanup();
+#endif
ERR_free_strings();
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels