Skip site navigation (1)Skip section navigation (2)
Date:      Sat,  7 Oct 2000 03:25:02 +0200 (CEST)
From:      tobez@tobez.org
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        markm@FreeBSD.org, tobez@tobez.org
Subject:   conf/21804: The lack of -lcrypt in Perl's Config.pm breaks Perl extension building.
Message-ID:  <20001007012502.CBDB85445@heechee.tobez.org>

next in thread | raw e-mail | index | archive | help

>Number:         21804
>Category:       conf
>Synopsis:       The lack of -lcrypt in Perl's Config.pm breaks Perl extension building.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 06 18:30:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Anton Berezin
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
tobez.org
>Environment:

perl 5.6.0

>Description:

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.

>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.

>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.

diff -u orig/config.SH-elf.alpha ./config.SH-elf.alpha
--- orig/config.SH-elf.alpha	Sat Oct  7 00:12:58 2000
+++ ./config.SH-elf.alpha	Sat Oct  7 00:13:47 2000
@@ -532,8 +532,8 @@
 ksh=''
 large=''
 ld='cc'
-lddlflags='-Wl,-E -shared -lperl -lm '
-ldflags='-Wl,-E -lperl -lm '
+lddlflags='-Wl,-E -shared -lperl -lm -lcrypt '
+ldflags='-Wl,-E -lperl -lm -lcrypt '
 ldlibpthname='LD_LIBRARY_PATH'
 less='less'
 lib_ext='.a'
diff -u orig/config.SH-elf.arm32 ./config.SH-elf.arm32
--- orig/config.SH-elf.arm32	Sat Oct  7 00:12:58 2000
+++ ./config.SH-elf.arm32	Sat Oct  7 00:14:12 2000
@@ -411,8 +411,8 @@
 ksh=''
 large=''
 ld='cc'
-lddlflags='-Wl,-E -shared -lperl -lm '
-ldflags='-Wl,-E -lperl -lm '
+lddlflags='-Wl,-E -shared -lperl -lm -lcrypt '
+ldflags='-Wl,-E -lperl -lm -lcrypt '
 less='less'
 lib_ext='.a'
 libc=''
diff -u orig/config.SH-elf.i386 ./config.SH-elf.i386
--- orig/config.SH-elf.i386	Sat Oct  7 00:12:58 2000
+++ ./config.SH-elf.i386	Sat Oct  7 00:14:18 2000
@@ -532,8 +532,8 @@
 ksh=''
 large=''
 ld='cc'
-lddlflags='-Wl,-E -shared -lperl -lm '
-ldflags='-Wl,-E -lperl -lm '
+lddlflags='-Wl,-E -shared -lperl -lm -lcrypt '
+ldflags='-Wl,-E -lperl -lm -lcrypt '
 ldlibpthname='LD_LIBRARY_PATH'
 less='less'
 lib_ext='.a'
diff -u orig/config.SH-elf.ia64 ./config.SH-elf.ia64
--- orig/config.SH-elf.ia64	Sat Oct  7 00:12:58 2000
+++ ./config.SH-elf.ia64	Sat Oct  7 00:14:22 2000
@@ -411,8 +411,8 @@
 ksh=''
 large=''
 ld='cc'
-lddlflags='-Wl,-E -shared -lperl -lm '
-ldflags='-Wl,-E -lperl -lm '
+lddlflags='-Wl,-E -shared -lperl -lm -lcrypt '
+ldflags='-Wl,-E -lperl -lm -lcrypt '
 less='less'
 lib_ext='.a'
 libc=''
diff -u orig/config.SH-elf.ppc ./config.SH-elf.ppc
--- orig/config.SH-elf.ppc	Sat Oct  7 00:12:58 2000
+++ ./config.SH-elf.ppc	Sat Oct  7 00:14:26 2000
@@ -411,8 +411,8 @@
 ksh=''
 large=''
 ld='cc'
-lddlflags='-Wl,-E -shared -lperl -lm '
-ldflags='-Wl,-E -lperl -lm '
+lddlflags='-Wl,-E -shared -lperl -lm -lcrypt '
+ldflags='-Wl,-E -lperl -lm -lcrypt '
 less='less'
 lib_ext='.a'
 libc=''
diff -u orig/config.SH-elf.sparc ./config.SH-elf.sparc
--- orig/config.SH-elf.sparc	Sat Oct  7 00:12:58 2000
+++ ./config.SH-elf.sparc	Sat Oct  7 00:14:30 2000
@@ -411,8 +411,8 @@
 ksh=''
 large=''
 ld='cc'
-lddlflags='-Wl,-E -shared -lperl -lm '
-ldflags='-Wl,-E -lperl -lm '
+lddlflags='-Wl,-E -shared -lperl -lm -lcrypt '
+ldflags='-Wl,-E -lperl -lm -lcrypt '
 less='less'
 lib_ext='.a'
 libc=''
diff -u orig/config.SH-elf.sparc64 ./config.SH-elf.sparc64
--- orig/config.SH-elf.sparc64	Sat Oct  7 00:12:58 2000
+++ ./config.SH-elf.sparc64	Sat Oct  7 00:14:34 2000
@@ -411,8 +411,8 @@
 ksh=''
 large=''
 ld='cc'
-lddlflags='-Wl,-E -shared -lperl -lm '
-ldflags='-Wl,-E -lperl -lm '
+lddlflags='-Wl,-E -shared -lperl -lm -lcrypt '
+ldflags='-Wl,-E -lperl -lm -lcrypt '
 less='less'
 lib_ext='.a'
 libc=''
diff -u orig/config.SH-threads-elf.alpha ./config.SH-threads-elf.alpha
--- orig/config.SH-threads-elf.alpha	Sat Oct  7 00:12:58 2000
+++ ./config.SH-threads-elf.alpha	Sat Oct  7 00:14:39 2000
@@ -532,8 +532,8 @@
 ksh=''
 large=''
 ld='cc'
-lddlflags='-Wl,-E -shared -lperl -lm '
-ldflags='-Wl,-E -pthread -lperl -lm '
+lddlflags='-Wl,-E -shared -lperl -lm -lcrypt '
+ldflags='-Wl,-E -pthread -lperl -lm -lcrypt '
 ldlibpthname='LD_LIBRARY_PATH'
 less='less'
 lib_ext='.a'
diff -u orig/config.SH-threads-elf.arm32 ./config.SH-threads-elf.arm32
--- orig/config.SH-threads-elf.arm32	Sat Oct  7 00:12:58 2000
+++ ./config.SH-threads-elf.arm32	Sat Oct  7 00:14:43 2000
@@ -413,8 +413,8 @@
 ksh=''
 large=''
 ld='cc'
-lddlflags='-Wl,-E -shared -lperl -lm '
-ldflags='-Wl,-E -pthread -lperl -lm '
+lddlflags='-Wl,-E -shared -lperl -lm -lcrypt '
+ldflags='-Wl,-E -pthread -lperl -lm -lcrypt '
 less='less'
 lib_ext='.a'
 libc=''
diff -u orig/config.SH-threads-elf.i386 ./config.SH-threads-elf.i386
--- orig/config.SH-threads-elf.i386	Sat Oct  7 00:12:58 2000
+++ ./config.SH-threads-elf.i386	Sat Oct  7 00:14:47 2000
@@ -532,8 +532,8 @@
 ksh=''
 large=''
 ld='cc'
-lddlflags='-Wl,-E -shared -lperl -lm '
-ldflags='-Wl,-E -pthread -lperl -lm '
+lddlflags='-Wl,-E -shared -lperl -lm -lcrypt '
+ldflags='-Wl,-E -pthread -lperl -lm -lcrypt '
 ldlibpthname='LD_LIBRARY_PATH'
 less='less'
 lib_ext='.a'
diff -u orig/config.SH-threads-elf.ia64 ./config.SH-threads-elf.ia64
--- orig/config.SH-threads-elf.ia64	Sat Oct  7 00:12:58 2000
+++ ./config.SH-threads-elf.ia64	Sat Oct  7 00:15:28 2000
@@ -411,8 +411,8 @@
 ksh=''
 large=''
 ld='cc'
-lddlflags='-Wl,-E -shared -lperl -lm '
-ldflags='-Wl,-E -pthread -lperl -lm '
+lddlflags='-Wl,-E -shared -lperl -lm -lcrypt '
+ldflags='-Wl,-E -pthread -lperl -lm -lcrypt '
 less='less'
 lib_ext='.a'
 libc=''
diff -u orig/config.SH-threads-elf.ppc ./config.SH-threads-elf.ppc
--- orig/config.SH-threads-elf.ppc	Sat Oct  7 00:12:58 2000
+++ ./config.SH-threads-elf.ppc	Sat Oct  7 00:14:53 2000
@@ -411,8 +411,8 @@
 ksh=''
 large=''
 ld='cc'
-lddlflags='-Wl,-E -shared -lperl -lm '
-ldflags='-Wl,-E -pthread -lperl -lm '
+lddlflags='-Wl,-E -shared -lperl -lm -lcrypt '
+ldflags='-Wl,-E -pthread -lperl -lm -lcrypt '
 less='less'
 lib_ext='.a'
 libc=''
diff -u orig/config.SH-threads-elf.sparc ./config.SH-threads-elf.sparc
--- orig/config.SH-threads-elf.sparc	Sat Oct  7 00:12:58 2000
+++ ./config.SH-threads-elf.sparc	Sat Oct  7 00:14:57 2000
@@ -411,8 +411,8 @@
 ksh=''
 large=''
 ld='cc'
-lddlflags='-Wl,-E -shared -lperl -lm '
-ldflags='-Wl,-E -pthread -lperl -lm '
+lddlflags='-Wl,-E -shared -lperl -lm -lcrypt '
+ldflags='-Wl,-E -pthread -lperl -lm -lcrypt '
 less='less'
 lib_ext='.a'
 libc=''
diff -u orig/config.SH-threads-elf.sparc64 ./config.SH-threads-elf.sparc64
--- orig/config.SH-threads-elf.sparc64	Sat Oct  7 00:12:58 2000
+++ ./config.SH-threads-elf.sparc64	Sat Oct  7 00:15:00 2000
@@ -411,8 +411,8 @@
 ksh=''
 large=''
 ld='cc'
-lddlflags='-Wl,-E -shared -lperl -lm '
-ldflags='-Wl,-E -pthread -lperl -lm '
+lddlflags='-Wl,-E -shared -lperl -lm -lcrypt '
+ldflags='-Wl,-E -pthread -lperl -lm -lcrypt '
 less='less'
 lib_ext='.a'
 libc=''

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001007012502.CBDB85445>