ccompilationposixcross-compilinggnutls

How to compile GnuTLS for every posix operating system


I want to create secure server and client which use GnuTLS for encrypting the network communication. I want to deploy the clients on many Unix operating systems and many Linux distributions. I found that for example in Centos 5 and 6 the versions of GnuTLS which are by default installed are different versions. Maybe in other operating systems the version of GnuTLS is always different. One solutions will be to compile GnuTLS every time from source in order to have always the same version. Is it possible to compile it into one monolithic(including all dependent libraries) executable program and use it in every Posix operating system?


Solution

  • No, because POSIX does not specify binary compatibility, only source compatibility. You'll have to (cross-)compile GNU TLS for every OS you're targeting that does not have the required version.