Problems, using libgetcwd.so.0.21

Marcus Sundberg mackan at stacken.kth.se
Fri Feb 19 18:58:01 CET 1999


Herbert Huber wrote:
> 
> Hello!
> 
> I´m using arla 0.21 on my Linux 2.2.1 dual Pentium machine. Trying to
> get rid of the disturbing messages any time when calling tcsh or
> /bin/pwd in my AFS $HOME, I performed the steps as described in the
> INSTALL document:
> 
> 1. Copied /usr/arla/lib/libgetcwd.so.X (where X is the arla
> version)      to /lib.
> 2. Ran "/sbin/ldconfig".
> 3. Ran "LD_PRELOAD=/lib/libgetcwd.so.0 /bin/pwd".
> 4. Added line to /etc/ld.so.preload:
> /lib/libgetcwd.so.0
> 
> After that /bin/pwd and also tcsh worked fine, but other programs like
> lpr, lpq, xosview, tokens.krb, ... had problems resolving the function
> __getcwd. For example:
> 
> tokens.krb: can't resolve symbol '__getcwd'
> 
> Have anybody solved this problem? Thanks in advance

The __getcwd symbol only exists in glibc 2.0, not in libc5 or glibc 2.1.
If you have a mixed glibc/libc5 system you will get the avove error when
running libc5 apps.

If you only intend to use the libgetcwd.so on Linux 2.2.x systems you
can easily fix the problem by applying this diff:

--- xfs/linux/getcwd.c.orig     Fri Feb 19 18:45:51 1999
+++ xfs/linux/getcwd.c  Fri Feb 19 18:46:12 1999
@@ -59,8 +59,6 @@
     retval = sys_getcwd(buf, size);
     if (retval >= 0)
        return buf;
-    if (errno == ENOSYS)
-       return __getcwd(buf, size);
     else
        return NULL;
 }

//Marcus
-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan/
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: mackan at stacken.kth.se





More information about the Arla-drinkers mailing list