Help: undefined symbol: strlcpy

Discussion in 'Perl Misc' started by Amy Lee, Jan 17, 2008.

  1. Amy Lee

    Amy Lee Guest

    I am running into the error "undefined symbol: strlcpy" when trying to
    install several Perl modules (YAML, XML:parser, XML::Simple, etc.) on a RHEL 3.

    From what I have read, it seems that strlcpy is a function that is included with BSD, Solaris, and OSX, but is not in the GNU C Library.

    However, I was able to compile these applications on my old Red Hat Linux 8.0 system without any problems, so the strlcpy function must be available in some library. I just can figure out what it is or how to make it available on my new Fedora system. Any ideas?

    [edit: Actually, it appears that the modules that I compiled successfully on my old system were older versions that used strcpy instead of strlcpy. Apparently the newer versions use strlcpy instead, so they might not compile on my old system. Also I wanted to add that at least in a couple of places, the file that refers to strlcpy is /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Cwd/Cwd.so]


    Amy Lee
     
    Amy Lee, Jan 17, 2008
    #1
    1. Advertising

  2. Amy Lee

    Amy Lee Guest

    On Thu, 17 Jan 2008 22:28:27 +0800, Amy Lee wrote:

    > I am running into the error "undefined symbol: strlcpy" when trying to
    > install several Perl modules (YAML, XML:parser, XML::Simple, etc.) on a RHEL 3.
    >
    > From what I have read, it seems that strlcpy is a function that is included with BSD, Solaris, and OSX, but is not in the GNU C Library.
    >
    > However, I was able to compile these applications on my old Red Hat Linux 8.0 system without any problems, so the strlcpy function must be available in some library. I just can figure out what it is or how to make it available on my new Fedora system. Any ideas?
    >
    > [edit: Actually, it appears that the modules that I compiled successfully on my old system were older versions that used strcpy instead of strlcpy. Apparently the newer versions use strlcpy instead, so they might not compile on my old system. Also I wanted to add that at least in a couple of places, the file that refers to strlcpy is /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Cwd/Cwd.so]
    >
    >
    > Amy Lee

    I've solved this problem. Someone who have the same problem please do
    follows:

    Go to http://search.cpan.org/~kwilliams/PathTools-3.27/, download the
    PathTools and make && make install.

    Regards,

    Amy Lee
     
    Amy Lee, Jan 17, 2008
    #2
    1. Advertising

  3. Amy Lee

    Ben Morrow Guest

    Quoth Amy Lee <>:
    > I am running into the error "undefined symbol: strlcpy" when trying to
    > install several Perl modules (YAML, XML:parser, XML::Simple, etc.) on
    > a RHEL 3.


    None of the modules named use strlcpy, so the problem is elsewhere.

    > From what I have read, it seems that strlcpy is a function that is
    > included with BSD, Solaris, and OSX, but is not in the GNU C Library.


    What is the output of

    perl -V:d_strlcpy

    ? Do you know for certain you don't have strlcpy in your libc? (Try nm
    -D /lib/libc.so.* | grep strlcpy, or sosmething equivalent.)

    > However, I was able to compile these applications on my old Red Hat
    > Linux 8.0 system without any problems, so the strlcpy function must be
    > available in some library. I just can figure out what it is or how to
    > make it available on my new Fedora system. Any ideas?
    >
    > [edit: Actually, it appears that the modules that I compiled
    > successfully on my old system were older versions that used strcpy
    > instead of strlcpy. Apparently the newer versions use strlcpy instead,
    > so they might not compile on my old system. Also I wanted to add that at
    > least in a couple of places, the file that refers to strlcpy is
    > /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Cwd/Cwd.so]


    Cwd.xs as distributed with 5.8.8 does not use strlcpy. Are you using a
    version of perl that has been patched by RedHat? Are you perhaps using a
    version of perl that was built for a different Red Hat distribution, or
    a copy of Cwd.so that doesn't go with your perl? 5.10 includes an
    implementation of strlcpy in the perl source, and it's possible that Red
    Hat ported that change back into their 5.8.8.

    Ben
     
    Ben Morrow, Jan 17, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RoSsIaCrIiLoIA

    Do you like my strlcpy strlcat etc?

    RoSsIaCrIiLoIA, Feb 4, 2005, in forum: C Programming
    Replies:
    13
    Views:
    575
    CBFalconer
    Feb 6, 2005
  2. baumann@pan
    Replies:
    1
    Views:
    772
    Richard Bos
    Apr 15, 2005
  3. strlcpy and strlcat

    , Dec 6, 2007, in forum: C Programming
    Replies:
    15
    Views:
    1,567
    CBFalconer
    Dec 11, 2007
  4. Song Ma
    Replies:
    2
    Views:
    261
    Charles Oliver Nutter
    Jul 20, 2008
  5. kj
    Replies:
    0
    Views:
    111
Loading...

Share This Page