Where can I find the source code and instructions for building libcurl-gnutls.so?
I'm working on a project that needs libcurl-gnutls.so. I am required to build it from source code - I am not allowed to simply install it with "apt-get install libcurl". Unfortunately, my google-fu is failing me and I can't find a source code repository or instructions to build libcurl-gnutls.so anywhere.
Here's what I have found:
Linux-from-scratch has well-documented instructions for building libcurl.so, here: https://www.linuxfromscratch.org/blfs/view/svn/basicnet/curl.html. That lets me build libcurl.so with gnutls, but not libcurl-gnutls.so.
The curl website (curl.se), has detailed instructions on its various options here: https://curl.se/docs/install.html. Those show me how to build libcurl with gnutls, but the end product is still libcurl.so, not libcurl-gnutls.so.
When I run ldd -r on my project, it identifies the functions it needs (curl_easy_init, curl_easy_setopt, curl_easy_perform, and curl_easy_cleanup). I can find those symbols in both libcurl.so and a pre-built libcurl-gnutls.so. This leads me to suspect that libcurl-gnutls.so is libcurl.so, published under a different name. However, renaming libcurl.so to libcurl-gnutls.so is not sufficient to meet the dependency requirements. I could try altering the libcurl project to set its name and version to libcurl-gnutls (not that I know how to do it - I would poke around until I figure it out), but I don't know how appropriate that would be.
I found one other question on Stack Overflow about libcurl-gnutls (How to create lib curl-gnutls.so.4), but the answers to that are to install a pre-built version via apt-get install, which I am not allowed to do.
Here's a complete answer cobbled together from everyone's input (Thanks especially to Knud Larsen and Wassim Dhif):
libcurl-gnutls.sois justlibcurl.sobuilt with gnutls support. Archives for the project are here: https://curl.se/downloadChange the SONAME that
libcurl.sois built with by editingltmain.shto change:To:
I'm sure there's a more elegant way to do it, but this works and I need to move on.
Alternatively, you can modify the the
SONAMEafterlibcurl.sois built with:Check your client (the program or shared library that requires
libcurl-gnutls.soas a dependency), to see if it requires version information. For instance, when I runobjdump -p myprogram, I get this:To build
libcurl-gnutls.sowith this version information:2a. Set the version information to version 3: In lib/libcurl.vers.in change:
To:
2b. Use
--enable-versioned-symbolswhen configuring the libcurl project. This adds the required version information.The final product may be named
libcurl.so, but can be renamed. It will have itsSONAMEset tolibcurl-gnutls.so.4and will have the required version information.