From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3066 invoked from network); 22 Jul 2001 15:43:59 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Jul 2001 15:43:59 -0000 Received: (qmail 29636 invoked by alias); 22 Jul 2001 15:43:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15449 Received: (qmail 29625 invoked from network); 22 Jul 2001 15:43:51 -0000 X-Authentication-Warning: freebie.phydeaux.org: fletch set sender to fletch@phydeaux.org using -f Sender: fletch@freebie.phydeaux.org To: Andrej Borsenkow Cc: Subject: Re: Where to add extra libraries for modules References: From: Fletch Organization: Very Little Date: 22 Jul 2001 11:43:43 -0400 In-Reply-To: Andrej Borsenkow's message of "Sun, 22 Jul 2001 09:08:25 +0400 (MSD)" Message-ID: User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>>>> "Andrej" == Andrej Borsenkow writes: [...] Andrej> It would be trivial, but ... Andrej> on most systems perl lib is installed into own directory Andrej> not in standard libpath. That means that you have to link Andrej> your program with some variant of Andrej> LD_RUN_PATH=/usr/lib/perl/5.6.0/... $(LD) Andrej> ... -L$... -lperl ... Right, that's what the `perl -MExtUtils::Embed -e ldopts` does. For example, on FreeBSD it produces: -Wl,-E -L/usr/local/lib/usr/lib/perl5/5.6.1/i386-freebsd/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/5.6.1/i386-freebsd/CORE -lperl -lm -lc -lcrypt -liconv -lutil As long as perl's been installed correctly you just let the ExtUtils::Embed module give what's apropriate for the platform\ Andrej> Now, the problem is - I do now that it works when linking Andrej> main program. I do not know if it works when linking Andrej> shared object. It seems to work on FreeBSD and (I believe) Linux. Then again its been linking against a static libperl.a rather than a shared version. [...] Andrej> Note, that there is no prolem with static perl library. I'm fairly sure that perl defaults to building a static libperl.a unless you tell it otherwise. And if it does, I'm pretty sure that it adds the apropriate -R... flags to set the ld.so search path. -- Fletch | "If you find my answers frightening, __`'/| fletch@phydeaux.org | Vincent, you should cease askin' \ o.O' 770 933-0600 x211(w) | scary questions." -- Jules =(___)= | U