I'm working on a project which requires to build several cURL releases, so I cloned them from cURL's Github repository. I'm on Ubuntu 14.04.
According to the instructions, I do what follows:
./buildconf
./configure
make
First two commands end successfully, make command instead gives me some errors:
CCLD curl
../lib/.libs/libcurl.so: undefined reference to `ldap_msgtype@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ber_free@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_init_fd@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_abandon_ext@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_get_option@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_get_dn_ber@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_memfree@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_msgfree@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_set_option@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_search_ext@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_free_urldesc@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ber_sockbuf_add_io@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_url_parse@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_sasl_bind@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_result@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_err2string@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_unbind_ext@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_parse_result@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ber_memfree@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_get_attribute_ber@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_first_message@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_pvt_url_scheme2proto@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_next_message@OPENLDAP_2.4_2'
collect2: error: ld returned 1 exit status
make[2]: *** [curl] Error 1
make[2]: Leaving directory `/home/user/Desktop/curl/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/Desktop/curl/src'
make: *** [all-recursive] Error 1
I don't understand how to solve this. The only thing that comes to my mind is that I have two versions of cURL and I might have misaligned something when some time ago I followed this reply: https://stackoverflow.com/a/38896967/6912352
At the moment this is the situation:
curl -V
curl: /opt/PostgreSQL/9.6/lib/libcurl.so.4: no version information available (required by curl)
curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.51.0 OpenSSL/1.0.2l zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
In fact, since then I noticed that probably the first one (/opt/...) is the default one because every time I use cURL o cURL is needed I get the following:
~/Desktop$ git clone --depth 1 https://github.com/openssl/openssl
Cloning into 'openssl'...
git-remote-https: /opt/PostgreSQL/9.6/lib/libldap_r-2.4.so.2: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4)
git-remote-https: /opt/PostgreSQL/9.6/lib/liblber-2.4.so.2: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4)
Can anyone help me to figure it out? Thanks. Ask me for more details if needed.