[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: ksh bug on Tru64 UNIX causes current libtool failure

From: Ralf Wildenhues
Subject: FYI: ksh bug on Tru64 UNIX causes current libtool failure
Date: Sun, 28 Aug 2005 17:34:34 +0200
User-agent: Mutt/1.5.9i

This is the ancient bug report about the Tru64 shell.

* Nicolas Joly wrote on Tue, Jun 07, 2005 at 12:10:47PM CEST:
> In the mean time, i tested the solution where `print -r' and `ksh'
> tests are swapped (attached patch). It seems to go a little further
> (no more `print' error messages), but seems to fail in another ksh
> problem/bug :

> libtool: compile:  cc "-DHAVE_CONFIG_H=<config.h>" -DLTDL -I. -I. -I.. -I. 
> -I. -I./libltdl -g -c -MD loaders/dlopen.c -o dlopen.o >/dev/null 2>&1
> /bin/ksh ../libtool --tag=CC   --mode=link cc  -g -module -avoid-version  -o 
>  dlopen.lo  
> ../libtool[24]: invalid multibyte character
> ../libtool[6]: invalid multibyte character
> ../libtool[2312]: invalid multibyte character

The Tru64 shell does not like us to close stdin.  It will corrupt its
memory which will become apparent when FD operations are done the next

I've applied the patch below to HEAD to finally fix this issue.
Gary helped me analyze it -- many thanks to everyone that provided
input to this!


2005-08-28  Ralf Wildenhues  <address@hidden>,
            Gary V. Vaughan  <address@hidden>

        * libltdl/config/ltmain.m4sh (func_lalib_unsafe_p) [osf]:
        Save file descriptor to original STDIN, and restore after
        redirection.  Fixes memory corruption with Tru64 and OSF sh.
        Reported by Nicolas Joly <address@hidden>.

Index: libltdl/config/ltmain.m4sh
RCS file: /cvsroot/libtool/libtool/libltdl/config/ltmain.m4sh,v
retrieving revision 1.4
diff -u -r1.4 ltmain.m4sh
--- libltdl/config/ltmain.m4sh  24 Aug 2005 15:57:32 -0000      1.4
+++ libltdl/config/ltmain.m4sh  28 Aug 2005 15:28:37 -0000
@@ -603,7 +603,7 @@
 func_lalib_unsafe_p ()
-    if test -r "$1" && exec <"$1"; then
+    if test -r "$1" && exec 5<&1 <"$1"; then
        for lalib_p_l in 1 2 3 4
            read lalib_p_line
@@ -611,7 +611,7 @@
                \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
-       exec <&-
+       exec 1<&5 5<&-
     test "$lalib_p" = yes

reply via email to

[Prev in Thread] Current Thread [Next in Thread]