I am trying to build openwsman (2.3.0 downloaded yesterday from the official website) on Ubunutu 12.04. I follow the instruction found in README.md and after installing several additional packages I finally got the command cmake ..
to succeed.
However when I run make
I get the following error:
Linking C executable test_list
../libwsman_curl_client_transport.so.1.0.0: undefined reference to `X509_digest'
../libwsman_curl_client_transport.so.1.0.0: undefined reference to `SSL_CTX_set_cert_verify_callback'
../libwsman_curl_client_transport.so.1.0.0: undefined reference to `SSL_CTX_set_verify'
../libwsman_curl_client_transport.so.1.0.0: undefined reference to `EVP_sha1'
collect2: ld returned 1 exit status
make[2]: *** [src/lib/test/test_list] Error 1
make[1]: *** [src/lib/test/CMakeFiles/test_list.dir/all] Error 2
Does anyone have an idea how to fix that?
I have finally been able to resolve this issue. It turns out I needed to change a CMakeLists file in the openwsman library.
What I needed to change are the libraries linked with libwsman_curl_client_transport
. To fix the issue open the file src/lib/CMakeLists.txt
(assuming you are located in openwsman base directory) and change the line that looks like:
TARGET_LINK_LIBRARIES( wsman_curl_client_transport ${CURL_LIBRARIES})
To
TARGET_LINK_LIBRARIES( wsman_curl_client_transport ${CURL_LIBRARIES} ssl crypto)
In the openwsman distribution I have downloaded(openwsman2.3.0) this is line 53 of the file described.
In what I do here is I tell the given library to be linked with crypto and ssl too and this resolves the linker errors.
Hope this answer helps someone to resolve this issue way faster than I did.