Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 3150 - Can't link programs that call crypt()
Can't link programs that call crypt()
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: David Lawrence
Depends On:
  Show dependency treegraph
Reported: 1999-05-30 00:10 EDT by josh
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1999-05-30 15:28:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description josh 1999-05-30 00:10:13 EDT
I get a linker error whenever I attempt to call the crypt
or fcrypt functions in a program I compile with gcc.  the
result is something like the following:

/tmp/cca070171.o: In function `main':
/tmp/cca070171.o(.text+0xe): undefined reference to `crypt'

Here is the program that give that error:

#include <unistd.h>
#include <stdio.h>

void main(void) {
    printf("%d\n", crypt("password", "Na"));

This doesn't occur under RedHat 4.2 or other systems not
using GLibc.
Comment 1 Jeff Johnson 1999-05-30 15:28:59 EDT
Add -lcrypt.

Note You need to log in before you can comment on or make changes to this bug.