lkml.org 
[lkml]   [2001]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] Re: [PATCH] new bug report script
    From
    Date
    Matthias Juchem <matthias@gandalf.math.uni-mannheim.de> writes:

    > # c library 5
    > - if ( -e "/lib/libc.so.5" ) {
    > - ( $v_libc5 = `/lib/libc.so.5`) =~ m/GNU C Library .+ version (\S+),/;
    > - $v_libc5 = $1;
    > - } else {
    > - $v_libc5 = "not found";
    > + opendir LIBDIR, "/lib" or die "/lib/ not found, very strange";
    > + my @allfiles = readdir LIBDIR;
    > + closedir LIBDIR;
    > + $v_libc5 = 'not found';
    > + foreach (sort @allfiles) {
    > + m/libc.so.(5\S+)/ and $v_libc5 = $1;
    > }
    > + closedir LIBDIR;

    This won't work everywhere either. Red Hat systems (maybe others)
    have libc5 out of the way in a separate subdir. Your best bet is to
    use ldconfig:

    /sbin/ldconfig -p|grep libc.so.5

    which produces something like

    libc.so.5 (libc5) => /usr/i486-linux-libc5/lib/libc.so.5

    and then look in that directory (/usr/i486-linux-libc5/lib).

    --
    ---------------. ,-. 1325 Chesapeake Terrace
    Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
    Red Hat `--' drepper at redhat.com `------------------------
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 12:52    [W:0.022 / U:30.856 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site