#13 libperl.so under Debian

closed-fixed
nobody
None
5
2008-04-07
2008-01-21
Slaven Rezic
No

libperl.so is installed in /usr/lib on Debian systems. The attached patch (against trunk in the subversion repository) fixes the Smolder::Platform module to look also in the "normal" lib search path for libperl.

Regards,
Slaven

Discussion

  • Slaven Rezic
    Slaven Rezic
    2008-01-21

     
    Attachments
  • Michael Peters
    Michael Peters
    2008-03-08

    Logged In: YES
    user_id=1387047
    Originator: NO

    I used the same idea as your patch, but moved the use of $Config{libpth} into the check_libs() sub so it's used for each library we're looking for. Fixed in svn r715 and will appear in 1.21. Thanks.

     
  • Michael Peters
    Michael Peters
    2008-03-08

    • status: open --> closed-fixed
     
  • Slaven Rezic
    Slaven Rezic
    2008-03-19

    Logged In: YES
    user_id=54935
    Originator: YES

    It seems to be broken (again? I did not check right after r715):

    $ bin/smolder_build

    libperl is missing from your system.
    This library is required by Smolder.

    This is with a fresh svn checkout.

    The location of libperl on this system is:

    $ ls -al /usr/lib/libperl.so*
    lrwxrwxrwx 1 root root 16 2008-02-21 15:14 /usr/lib/libperl.so.5.8 -> libperl.so.5.8.8
    -rw-r--r-- 1 root root 1163344 2007-11-12 07:31 /usr/lib/libperl.so.5.8.8

    Note that there's no libperl.so -> libperl.so.5.8 symlink. Maybe this is confusing Devel::CheckLib (if this is involved here). Note also that the full name of libperl is available in Config.pm: $Config{libperl}.

    Regards,
    Slaven

     
  • Slaven Rezic
    Slaven Rezic
    2008-03-19

    • status: closed-fixed --> open-fixed
     
  • Logged In: NO

    So if the file is libperl-5.8.8.so what is the combination of stuff you need to compile another module to link against that? When it's just libperl.so (or symlinked to it):

    gcc my_code.c -o my_code -lperl

    If I can translate the $Config{libperl} into something I can pass to gcc to tell it to link against then that fixes the problem.

     
  • Slaven Rezic
    Slaven Rezic
    2008-04-07

    Logged In: YES
    user_id=54935
    Originator: YES

    Specifying the full path seems to work:

    gcc -o bla bla.c /usr/lib/libperl.so.5.8.8

    This would be the combination of the last part in $Config{libpth} and $Config{libperl}.

    Anyway, do you really need the path to libperl? Normally it is not needed, unless you do some perl embedding or so.

     
  • Logged In: NO

    > Anyway, do you really need the path to libperl? Normally it is not needed,
    > unless you do some perl embedding or so.

    We do some embedding because we are using our own apache and mod_perl. Eventually this will be replaced by allowing packagers to separate this out and use the system apache/mod_perl, but for right now we need to be able to link to libperl. But we don't necessarily need the fullpath to libperl.

    The idea behind using Devel::CheckLib for these checks is that we don't have to worry about where the libs are, just that the machine's compiler and linker can find it.

    A debian guy I'm talking to right now says that he thinks (doesn't have a machine handy) that the libperl.so symlink is part of another package in debian. Could this be the reason?

     
  • Slaven Rezic
    Slaven Rezic
    2008-04-07

    Logged In: YES
    user_id=54935
    Originator: YES

    Yes, it is. After installing the libperl-dev package both libperl.a and a libperl.so symlink are available.

     
  • Michael Peters
    Michael Peters
    2008-04-07

    Logged In: YES
    user_id=1387047
    Originator: NO

    good to hear! Thanks for digging into this for me.

     
  • Michael Peters
    Michael Peters
    2008-04-07

    • status: open-fixed --> closed-fixed