Error running cmake

Hello, good afternoon.

I’m installing janus on a centos 7 server, I run the following commands:
tar -zxvf cmake-3.6.2.tar.gz
cd cmake-3.6.2
./bootstrap --prefix=/usr/local
and it works fine, but when I run the “make” command I get the following error:

[ 3%] Built target cmsys
[ 3%] Built target cmsysTestDynload
[ 5%] Built target cmsys_c
[ 5%] Built target cmsysTestProcess
[ 6%] Built target cmsysTestSharedForward
[ 6%] Built target cmsysTestsC
[ 8%] Built target cmsysTestsCxx
[ 10%] Built target kwiml_test
[ 11%] Built target cmzlib
[ 31%] Built target cmcurl
[ 31%] Linking C executable LIBCURL
lib/libcmcurl.a(openssl.c.o): In function sk_X509_EXTENSION_num': openssl.c:(.text+0xa4): undefined reference to OPENSSL_sk_num’
lib/libcmcurl.a(openssl.c.o): In function sk_X509_EXTENSION_value': openssl.c:(.text+0xc6): undefined reference to OPENSSL_sk_value’
lib/libcmcurl.a(openssl.c.o): In function sk_X509_num': openssl.c:(.text+0xe0): undefined reference to OPENSSL_sk_num’
lib/libcmcurl.a(openssl.c.o): In function sk_X509_value': openssl.c:(.text+0x102): undefined reference to OPENSSL_sk_value’
lib/libcmcurl.a(openssl.c.o): In function sk_X509_pop': openssl.c:(.text+0x11c): undefined reference to OPENSSL_sk_pop’
lib/libcmcurl.a(openssl.c.o): In function sk_X509_pop_free': openssl.c:(.text+0x141): undefined reference to OPENSSL_sk_pop_free’
lib/libcmcurl.a(openssl.c.o): In function sk_GENERAL_NAME_num': openssl.c:(.text+0x15b): undefined reference to OPENSSL_sk_num’
lib/libcmcurl.a(openssl.c.o): In function sk_GENERAL_NAME_value': openssl.c:(.text+0x17d): undefined reference to OPENSSL_sk_value’
lib/libcmcurl.a(openssl.c.o): In function Curl_ossl_init': openssl.c:(.text+0xf80): undefined reference to OPENSSL_init_ssl’
openssl.c:(.text+0xf8f): undefined reference to OPENSSL_init_ssl' openssl.c:(.text+0xfa9): undefined reference to OPENSSL_init_crypto’
lib/libcmcurl.a(openssl.c.o): In function ossl_connect_step1': openssl.c:(.text+0x2492): undefined reference to TLS_client_method’
openssl.c:(.text+0x26c5): undefined reference to SSL_CTX_set_options' lib/libcmcurl.a(openssl.c.o): In function get_cert_chain’:
openssl.c:(.text+0x3636): undefined reference to X509_get_version' openssl.c:(.text+0x3897): undefined reference to X509_get0_extensions’
openssl.c:(.text+0x38b7): undefined reference to X509_getm_notBefore' openssl.c:(.text+0x393f): undefined reference to X509_getm_notAfter’
openssl.c:(.text+0x3a2c): undefined reference to EVP_PKEY_get0_RSA' openssl.c:(.text+0x3a57): undefined reference to RSA_get0_key’
openssl.c:(.text+0x3a77): undefined reference to RSA_get0_factors' openssl.c:(.text+0x3a9b): ​​undefined reference to RSA_get0_crt_params’
openssl.c:(.text+0x3c72): undefined reference to EVP_PKEY_get0_DSA' openssl.c:(.text+0x3c9d): undefined reference to DSA_get0_pqg’
openssl.c:(.text+0x3cbd): undefined reference to DSA_get0_key' openssl.c:(.text+0x3d96): undefined reference to EVP_PKEY_get0_DH’
openssl.c:(.text+0x3dc1): undefined reference to DH_get0_pqg' openssl.c:(.text+0x3de1): undefined reference to DH_get0_key’
lib/libcmcurl.a(openssl.c.o): In function pkp_pin_peer_pubkey': openssl.c:(.text+0x408b): undefined reference to X509_get_X509_PUBKEY’
openssl.c:(.text+0x40de): undefined reference to X509_get_X509_PUBKEY' lib/libcmcurl.a(openssl.c.o): In function servercert’:
openssl.c:(.text+0x4291): undefined reference to X509_getm_notBefore' openssl.c:(.text+0x4310): undefined reference to X509_getm_notAfter’
lib/libcmcurl.a(openssl.c.o): In function Curl_ossl_version': openssl.c:(.text+0x50ff): undefined reference to OpenSSL_version_num’
collect2: error: ld returned 1 exit status
make[2]: *** [Utilities/cmcurl/LIBCURL] Error 1
make[1]: *** [Utilities/cmcurl/CMakeFiles/LIBCURL.dir/all] Error 2
make: *** [all] Error 2

Can you help me with this error, thanks

It looks like the OpenSSL headers found do not match the library that gets found. What OpenSSL-related cache variables and values are in your build’s CMakeCache.txt?

See CentOS7 and OpenSSL 1.1 - #5 by jwm. If you have openssl11 installed, CMake won’t pick it up, by default.