Archlinux OpenSSL Compilation Error


#1

Cannot compile OF on Archlinux because of OpenSSL incompatiblities. This is what I get compiling OF:

g++ -Iinclude -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/CppUnit/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/CppUnit/WinTestRunner/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/Foundation/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/XML/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/JSON/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/Util/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/Net/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/Crypto/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/NetSSL_OpenSSL/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/Data/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/Data/SQLite/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/Data/ODBC/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/Data/MySQL/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/Zip/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/PageCompiler/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/PageCompiler/File2Page/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/PDF/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/CppParser/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/MongoDB/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/PocoDoc/include -I/home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/ProGen/include -Wall -Wno-sign-compare -DPOCO_BUILD_HOST=nuc -DPOCO_TARGET_OSNAME=Linux -DPOCO_TARGET_OSARCH=x86_64 -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DPOCO_HAVE_FD_EPOLL -g -D_DEBUG -c src/HTTPStream.cpp -o /home/elly/Downloads/openFrameworks/scripts/apothecary/apothecary/build/poco/Net/obj/Linux/x86_64/debug_static/HTTPStream.o
src/CipherImpl.cpp:80:21: error: field ‘_ctx’ has incomplete type ‘EVP_CIPHER_CTX {aka evp_cipher_ctx_st}’
EVP_CIPHER_CTX _ctx;
^~~~
In file included from /usr/include/openssl/crypto.h:31:0,
from include/Poco/Crypto/OpenSSLInitializer.h:26,
from include/Poco/Crypto/CipherKeyImpl.h:24,
from include/Poco/Crypto/CipherKey.h:24,
from include/Poco/Crypto/CipherImpl.h:25,
from src/CipherImpl.cpp:17:
/usr/include/openssl/ossl_typ.h:90:16: note: forward declaration of ‘EVP_CIPHER_CTX {aka struct evp_cipher_ctx_st}’
typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
^~~~~~~~~~~~~~~~~

We have seen similar issues in the past. Here are also some links that might be helpful:

https://github.com/openssl/openssl/issues/962
https://github.com/openresty/encrypted-session-nginx-module/pull/13
https://github.com/jbreams/gonepass/issues/18
http://www.mail-archive.com/arch-dev-public@archlinux.org/msg25115.html
https://bbs.archlinux.org/viewtopic.php?pid=1707447#p1707447

I am not sure whether OpenSSL 1.1 is supported now by OF or if I have to compile against OpenSSL 1.0. I used several OF versions (latest stable, nightly, github clone) but nothing worked. Always same error message. Setting PKG_CONFIG_PATH does not help either because Poco simply does not care.


#2

what version of openframeworks are you using? the poco version in 0.9.8 is not compatible anymore with recent linux releases.


#3

I tried OF 0.9.8, the latest nightly version and also made a clone of the github repository. Error message consistently the same.

[Did a Kubuntu 17.04 test installation this morning. Works fine. If my beloved Archlinux causes too many troubles getting OF running I will install Kubuntu.]


#4

, it seems the install_dependencies script is trying to compile poco but it shouln’t be necesary, i’ll remove it now in master but you can safely remove all lines from line 29 in the install_dependencies script


#5

Yes, the error happens during poco compilation.

Just a quick question for my understanding: is poco not necessary anymore or do I have to install it as part of the operating system?


#6

it’s been always included with the download but the version that came with 0.9.8 or earlier was only compatible with gcc 4 so we had to compile it manually. the nightly builds now have versions compatible with gcc5 and 6 or later


#7

also poco is not needed by the core anymore, only if you use the ofxPoco addon explicitly


#8

Cool. Thanks a lot for your support!!!