I am trying to compile passenger with nginx and openssl 1.1.0 (in a custom location) on Fedora as a rpm.
I can compile nginx alone fine with openssl1.1.0 if i add this to my rpm spec file:
export SSL_CFLAGS="-I/usr/local/ulyaoth/openssl1.1.0/include -L/usr/local/ulyaoth/openssl1.1.0/lib"
export SSL_LIBS=-lssl
export CRYPTO_CFLAGS="-I/usr/local/ulyaoth/openssl1.1.0/include -L/usr/local/ulyaoth/openssl1.1.0/lib"
export CRYPTO_LIBS=-lcrypto
export C_INCLUDE_PATH=/usr/local/ulyaoth/openssl1.1.0/include
export LIBRARY_PATH=/usr/local/ulyaoth/openssl1.1.0/lib
export LD_RUN_PATH=/usr/local/ulyaoth/openssl1.1.0/lib
and then then add to the configure: -with-openssl=/usr/local/ulyaoth/openssl1.1.0 \
Now if I also add passenger like this for example: --add-dynamic-module=/usr/local/ulyaoth/passenger/5/src/nginx_module \
then Passenger will not compile and breaks with this error:
In file included from src/agent/Core/SecurityUpdateChecker.h:17:0, from src/agent/Core/CoreMain.cpp:94: src/cxx_supportlib/Crypto.h:37:25: fatal error: openssl/pem.h: No such file or directory #include <openssl/pem.h>
I have also tried to add the following to my rpm spec file:
export OPENSSL_LIB=/usr/local/ulyaoth/openssl1.1.0/lib
export OPENSSL_INC=/usr/local/ulyaoth/openssl1.1.0/include
export OPENSSL_BASE=/usr/local/ulyaoth/openssl1.1.0
But i still get the exact same error.
What should I do to make passenger also compile with my openssl 1.1.0 version? is there some config file I perhaps have to alter to make this work?
I appreciate any help!