libcrypt removed in glibc 2.39

Julien ÉLIE julien at trigofacile.com
Sat May 23 19:32:55 UTC 2026


Hi all,

In glibc 2.39, according to its changelog:

* libcrypt has been removed from the GNU C Library.  The configure
   options "--enable-crypt" and "--enable-nss-crypt" are no longer
   available.  <crypt.h>, libcrypt.a, and libcrypt.so.1 will not be
   installed.  For now <unistd.h> continues to declare the crypt
   function by default, to avoid introducing vulnerabilities into
   existing applications due to a missing prototype.  This declaration
   is deprecated and may be removed in a future glibc release.

   The replacement for libcrypt is libxcrypt, maintained separately from
   GNU libc, but available under compatible licensing terms, and providing
   binary backward compatibility with the former libcrypt.  It is currently
   distributed from <https://github.com/besser82/libxcrypt/>.

   As a consequence of this removal, GNU libc no longer makes any use of
   the NSS cryptography library (Network Security Services; not to be
   confused with Name Service Switch).  Distributors of binary packages
   of GNU libc are advised to check whether their build processes can be
   simplified.




We use the crypt.h header and the crypt() function in two programs: 
ckpasswd and contrib/auth_pass.

With latest glibc, and in the absence of libcrypt, even with the 
inclusion of <unistd.h>, the build fails with:
   undefined reference to `crypt'

I've just came across 2 such servers on the GCC Compile Farm.


Should we just mention in INSTALL that a library like libcrypt or 
libxcrypt is necessary?
Or should something else be done at our level?

-- 
Julien ÉLIE

« La grippe, ça dure huit jours si on la soigne et une semaine si on ne
   fait rien. » (Raymond Devos)



More information about the inn-workers mailing list