From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8473 invoked by alias); 9 Dec 2001 15:26:39 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Received: (qmail 8452 invoked from network); 9 Dec 2001 15:26:38 -0000 Received: from unknown (HELO mailout01.sul.t-online.de) (194.25.134.80) by sources.redhat.com with SMTP; 9 Dec 2001 15:26:38 -0000 Received: from fwd03.sul.t-online.de by mailout01.sul.t-online.de with smtp id 16D5qU-0006No-05; Sun, 09 Dec 2001 16:26:26 +0100 Received: from loreley.haase.dynu.com (320081107336-0001@[62.227.232.14]) by fmrl03.sul.t-online.com with esmtp id 16D5qG-0CHQQKC; Sun, 9 Dec 2001 16:26:12 +0100 Received: from haase.dynu.com ([192.168.1.1] helo=LORELEY) by loreley.haase.dynu.com with esmtp (Exim 3.33 #4) id 16D5tC-00006R-00; Sun, 09 Dec 2001 16:29:14 +0100 Date: Sun, 09 Dec 2001 07:27:00 -0000 From: "Gerrit P. Haase @ cygwin" X-Mailer: The Bat! (v1.53t) Business Reply-To: cygwin@cygwin.com Organization: Esse keine toten Tiere X-Priority: 3 (Normal) Message-ID: <18164870789.20011209162856@familiehaase.de> To: "Pierre A. Humblet" CC: cygwin@cygwin.com Subject: Re: Problem with "perl -MExtUtils::Embed -e ldopts" In-Reply-To: <3.0.5.32.20011208162816.0082ea00@pop.ne.mediaone.net> References: <3.0.5.32.20011208162816.0082ea00@pop.ne.mediaone.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----------B014FECF478938" X-Sender: 320081107336-0001@t-dialin.net X-SW-Source: 2001-12/txt/msg00499.txt.bz2 ------------B014FECF478938 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-length: 2634 Hallo Pierre, Am 2001-12-08 um 22:28 schriebst du: > I have a package that uses perl itself to configure a makefile to > use perl libraries. The command and its output are >> perl -MExtUtils::Embed -e ldopts > Note (probably harmless): No library found for -lperl > -s -s -L/usr/local/lib > /usr/lib/perl5/5.6.1/cygwin-multi/auto/DynaLoader/DynaLoader.a > -L/usr/lib/perl5/5.6.1/cygwin-multi/CORE -lcrypt > 3 observations: > 1) The "harmless note" suggests that the perl library is not where expected. > Should it be -lperl5_6_1 or is there a missing link? > 2) The -s causes the linker to drop the symbol table [when the command > output is blindly used in a makefile]. Not nice while debugging! > 3) why list /usr/local/lib? > While not a show stopper, can this be fixed in future releases? > Thanks. 1. This is from ExtUtils::Embed::ldopts: my $libperl; if ($^O eq 'MSWin32') { $libperl = $Config{libperl}; } else { $libperl = (grep(/^-l\w*perl\w*$/, @link_args))[0] || "-lperl"; } It seems that it doesn't work as it should. I have patched this for now (attached), I'll look to get this in perl included if it is still broken in bleadperl. $ perl -MExtUtils::Embed -e ldopts -s -s -L/usr/local/lib /usr/lib/perl5/5.6.1/cygwin-multi/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/5.6.1/cygwin-multi/CORE -lperl5_6_1 -lcrypt Alternative: create a symlink libperl.a -> libperl5_6_1.a 2. Cygwin Perl is built with -s flag, that strips the binaries, if you want to have symbols in your module you will need symbols in perl, that means you will have to rebuild perl yourself with symbols, that is: change nothing at the source and do: ./Configure -Doptimize='-g' which turns on DEBUGGING. (Note that Cygwin Perl is also build with '-Dmultiplicity'). I really don'y know why the '-s' flag is passed twice here. Probable because there are several flags involved (ldflags & ccdlflags) 3. I didn't add /usr/local/lib to the linkline, it is done somewhere automagically. You may change the values in Config.pm. ldflags='' then you get: $ perl -MExtUtils::Embed -e ldopts -s /usr/lib/perl5/5.6.1/cygwin-multi/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/5.6.1/cygwin-multi/CORE -lperl5_6_1 -lcrypt ccdlflags='' $ perl -MExtUtils::Embed -e ldopts /usr/lib/perl5/5.6.1/cygwin-multi/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/5.6.1/cygwin-multi/CORE -lperl5_6_1 -lcrypt but as stated above I don't know if it is sufficient, maybe you need to rebuild perl to get the symbols. Ciao, Gerrit P. Haase mailto:gp@familiehaase.de -- =^..^= ------------B014FECF478938 Content-Type: application/octet-stream; name="Embed.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="Embed.patch" Content-length: 1192 LS0tIHBlcmw1LzUuNi4xL0V4dFV0aWxzL0VtYmVkLnBtLm9yaWcJU3VuIERl YyAgOSAxNToyMzoyMiAyMDAxCisrKyBwZXJsNS81LjYuMS9FeHRVdGlscy9F bWJlZC5wbQlTdW4gRGVjICA5IDE1OjIyOjQxIDIwMDEKQEAgLTIwNyw5ICsy MDcsMTMgQEAKICAgICBpZiAoJF5PIGVxICdNU1dpbjMyJykgewogCSRsaWJw ZXJsID0gJENvbmZpZ3tsaWJwZXJsfTsKICAgICB9CisgICAgZWxzaWYgKCRe TyBlcSAnY3lnd2luJykgeworCSRsaWJwZXJsID0gIi1scGVybDVfNl8xIjsg ICAgIAorICAgIH0KICAgICBlbHNlIHsKIAkkbGlicGVybCA9IChncmVwKC9e LWxcdypwZXJsXHcqJC8sIEBsaW5rX2FyZ3MpKVswXSB8fCAiLWxwZXJsIjsK ICAgICB9CisKIAogICAgIG15ICRscGF0aCA9IEZpbGU6OlNwZWMtPmNhdGRp cigkQ29uZmlne2FyY2hsaWJleHB9LCAnQ09SRScpOwogICAgICRscGF0aCA9 IHFxWyIkbHBhdGgiXSBpZiAkXk8gZXEgJ01TV2luMzInOwotLS0gcGVybDUv NS42LjEvY3lnd2luLW11bHRpL0V4dFV0aWxzL0VtYmVkLnBtLm9yaWcJU3Vu IERlYyAgOSAxNToyMzoxMCAyMDAxCisrKyBwZXJsNS81LjYuMS9jeWd3aW4t bXVsdGkvRXh0VXRpbHMvRW1iZWQucG0JU3VuIERlYyAgOSAxNToyMjo0NyAy MDAxCkBAIC0yMDcsNiArMjA3LDkgQEAKICAgICBpZiAoJF5PIGVxICdNU1dp bjMyJykgewogCSRsaWJwZXJsID0gJENvbmZpZ3tsaWJwZXJsfTsKICAgICB9 CisgICAgZWxzaWYgKCReTyBlcSAnY3lnd2luJykgeworCSRsaWJwZXJsID0g Ii1scGVybDVfNl8xIjsgICAgIAorICAgIH0KICAgICBlbHNlIHsKIAkkbGli cGVybCA9IChncmVwKC9eLWxcdypwZXJsXHcqJC8sIEBsaW5rX2FyZ3MpKVsw XSB8fCAiLWxwZXJsIjsKICAgICB9Cg== ------------B014FECF478938 Content-Type: text/plain; charset=us-ascii Content-length: 214 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ ------------B014FECF478938--