| Summary: | The lack of -lcrypt in Perl's Config.pm breaks Perl extension building. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Anton Berezin <tobez> | ||||
| Component: | conf | Assignee: | Anton Berezin <tobez> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | CC: | markm | ||||
| Priority: | Normal | ||||||
| Version: | 5.0-CURRENT | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
Responsible Changed From-To: freebsd-bugs->markm Over to perl maintainer. Responsible Changed From-To: markm->tobez Originator of the PR, and is now the committer who is going to fix it. State Changed From-To: open->closed The fix in the PR, slightly modified due to the removal of threaded perl in -current, committed. |
Config.pm bundled with FreeBSD's Perl does not have a `-lcrypt' in its linking-related variables. Under certain conditions, this may break the build of Perl extensions. See the `How-To-Repeat' section for self-explanatory example, and the `Fix' section for a patch and a workaround. Fix: Apply the following patch and rebuild the system. As a quick fix for impatient, edit two files (they are identical): /usr/libdata/perl/5.6.0/mach/Config.pm /usr/libdata/perl/5.6.0/Config.pm and add -lcrypt to lddlflags and to ldflags. This patch is relative to /usr/src/gnu/usr.bin/perl/libperl, and is only tested on i386, non-threaded perl. How-To-Repeat: $ mkdir perlbug ; cd perlbug $ cat >Makefile.PL use ExtUtils::MakeMaker; WriteMakefile( NAME => 'Bla', PREREQ_PM => {}, EXE_FILES => ["./bin/foo"]); ^D $ mkdir bin ; cat >bin/foo.c int main(){} ^D $ perl Makefile.PL Writing Makefile for Bla $ make mkdir blib mkdir blib/lib mkdir blib/arch mkdir blib/arch/auto mkdir blib/arch/auto/Bla mkdir blib/lib/auto/Bla mkdir blib/man1 cc -O -pipe -Wl,-E -lperl -lm ./bin/foo.c -o ./bin/foo /usr/lib/libperl.so: undefined reference to `crypt' *** Error code 1 Stop in /usr/home/tobez/tmp/perlbug.