Public bug reported: So crypt(3) from the binary package manpages-dev tells me I should have crypt(), usable with -lcrypt.
As I sometimes needs to compute such a crappy hash (I can't even remember when the last time was, or why, but that had to do with legacy code), I wrote this small utility: https://github.com/pcarrier/stuff/commit/f3de13682f28354397dc1b7caef5c1dd13fdfc36 It compiles completely fine under Squeeze using "gcc -lcrypt crypt.c". For some reason I'm not so lucky with precise. % gcc -lcrypt crypt.c /tmp/cczm5dUv.o: In function `main': crypt.c:(.text+0x36): undefined reference to `crypt' crypt.c:(.text+0x5d): undefined reference to `crypt' collect2: ld returned 1 exit status zsh: exit 1 gcc -lcrypt crypt.c % readelf -Ws /lib/x86_64-linux-gnu/libcrypt-2.15.so|grep crypt@ 19: 0000000000004f40 12 FUNC GLOBAL DEFAULT 13 encrypt@@GLIBC_2.2.5 22: 0000000000000ca0 131 FUNC GLOBAL DEFAULT 13 crypt@@GLIBC_2.2.5 24: 0000000000000ca0 131 FUNC WEAK DEFAULT 13 fcrypt@@GLIBC_2.2.5 % dpkg -l|grep -E 'gcc|libc6' ii gcc 4:4.6.3-1ubuntu5 GNU C compiler ii gcc-4.6 4.6.3-1ubuntu5 GNU C compiler ii gcc-4.6-base 4.6.3-1ubuntu5 GCC, the GNU Compiler Collection (base package) ii gcc-4.6-base:i386 4.6.3-1ubuntu5 GCC, the GNU Compiler Collection (base package) ii libc6 2.15-0ubuntu10 Embedded GNU C Library: Shared libraries ii libc6:i386 2.15-0ubuntu10 Embedded GNU C Library: Shared libraries ii libc6-dev 2.15-0ubuntu10 Embedded GNU C Library: Development Libraries and Header Files ii libc6-i386 2.15-0ubuntu10 Embedded GNU C Library: 32-bit shared libraries for AMD64 ii libgcc1 1:4.6.3-1ubuntu5 GCC support library ii libgcc1:i386 1:4.6.3-1ubuntu5 GCC support library ProblemType: Bug DistroRelease: Ubuntu 12.04 Package: manpages-dev 3.35-0.1ubuntu1 ProcVersionSignature: Ubuntu 3.2.0-29.46-generic 3.2.24 Uname: Linux 3.2.0-29-generic x86_64 ApportVersion: 2.0.1-0ubuntu12 Architecture: amd64 Date: Mon Aug 13 01:26:30 2012 Dependencies: manpages 3.35-0.1ubuntu1 InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120731) PackageArchitecture: all ProcEnviron: LANGUAGE=en_GB:en TERM=xterm PATH=(custom, user) LANG=en_GB.UTF-8 SHELL=/bin/zsh SourcePackage: manpages UpgradeStatus: No upgrade log present (probably fresh install) ** Affects: manpages (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug precise running-unity ** Summary changed: - libcrypt doesn't give me crypt()? + libcrypt and gcc ain't providing crypt() as advertised -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1035996 Title: libcrypt and gcc ain't providing crypt() as advertised To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/manpages/+bug/1035996/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs