Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Where to add extra libraries for modules



>>>>> "Andrej" == Andrej Borsenkow <Andrej.Borsenkow@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxx   |  Vincent, you should cease askin'          \ o.O'
770 933-0600 x211(w)  |  scary questions." -- Jules                =(___)=
                      |                                               U



Messages sorted by: Reverse Date, Date, Thread, Author