configure: warning: cannot find gnu tls, disabling

source : debian-user-digest # 1352,1373.

The problem is that the archive library doesn't contain the same symbols as the shared library. I think that is probably a bug. But mostly for things like that the shared library is the best one to use since if a security vulnerability is found then updating the shared library fixes all uses of it.

But at the low level detail the configure script creates the following test case.

#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
int main() {
gnutls_x509_crt_sign2(0, 0, 0, 0, 0);
return 0;
}

Then it tries compiling it. Here is an example :

gcc -std=gnu99 -o conftest -g conftest.c -lgnutls
That works.

But when you add -static to the options :

gcc -std=gnu99 -o conftest -g -static conftest.c -lgnutls
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libgnutls.a(x509_write.o): In function `gnutls_x509_crt_set_serial': (.text+0x16): undefined reference to `asn1_write_value'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libgnutls.a(x509_write.o): In function `gnutls_x509_crt_set_key_purpose_oid': (.text+0x1a7): undefined reference to `asn1_create_element'
... and many, many more ...

At one level it is because this is failing.

Issue : I can't for the life of me figure out what's going on. I don't usually static compile but in this case I decided to try out the new PHP 5.3.3 with CHROOT and CHDIR which requires me to static compile msmtp ( or sendmail but lets be realistic about a full static compile on an MTA for a shared server) so that users don't have to rely solely on SMTP ( we use smart hosting with msmtp ~ which again is unrealistic for a shared environment. )

Solution : You do not need to statically compile msmtp ( or sendmail ). You just need to install the shared libraries in the chroot too.

How are you setting up the chroot ? Personally I like using debootstrap and setting up a chroot managed by dpkg and apt. In which case installing packages and dependencies is as easy as

# apt-get install msmtp

Personally I always set up nullmailer in chroots and configure it to deliver to the localhost. Then the host's main MTA handles delivery normally.

I recommend just setting up a chroot with debootstrap so that you can install packages and dependencies easily with apt.
http://wiki.debian.org/Debootstrap
 
 
Creative Commons License
This work by maniac.vardhan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
 
 

0 comments :: configure: warning: cannot find gnu tls, disabling

Post a Comment