Hi!
----
Testing ast-ksh.20061207 on Solaris/SPARC hits one single error:
-- snip --
+
/home/test001/ksh93/ksh93_20061207/build32/arch/sol11.sun4/src/cmd/ksh93/ksh
./src/cmd/ksh93/tests/shtests
LD_LIBRARY_PATH=/home/test001/ksh93/ksh93_20061207/build32/arch/sol11.sun4/lib:
LANG=C LC_ALL=C ./src/cmd/ksh93/tests/builtins.sh
test ./src/cmd/ksh93/tests/builtins.sh begins at 2006-12-20+07:45:14
ld.so.1: ksh: fatal: libshell.so: open failed: No such file or directory
./src/cmd/ksh93/tests/builtins.sh: line 340: 10058: Killed
builtins.sh[341]: "name=value exec -c ..." not working
test ./src/cmd/ksh93/tests/builtins.sh failed at 2006-12-20+07:45:22
with exit code 1 [ 106 tests 1 error ]
-- snip --
This happens on SPARC only.
A quick look at the test shows that "getconf LIBPATH" somehow generates
longer output than on Solaris/i386 output. The values returned are:
# Solaris/SPARC 32bit:
-- snip --
$ ./build32/arch/sol11.sun4/bin/ksh -c 'getconf LIBPATH'
lib/sparcv9:LD_LIBRARY_PATH_64:sol.*64*,lib:LD_LIBRARY_PATH,lib:LD_LIBRARY_PATH_32
-- snip --
# Solaris/SPARC 64bit:
-- snip --
$ ./build64/arch/sol11.sun4/bin/ksh -c 'getconf LIBPATH'
lib/sparcv9:LD_LIBRARY_PATH_64:sol.*64*,lib:LD_LIBRARY_PATH,lib:LD_LIBRARY_PATH_32
-- snip --
Ok... why doesn't this happen for Solaris/i386 ?
A quick look shows that Solaris/i386 only outputs one item:
-- snip --
lib:LD_LIBARRY_PATH
-- snip --
A further look via running the test with "ksh93 -x -e" shows that the
problem is my script
-- snip --
+ set --noglob
+ ifs=$' \t\n'
+ IFS=,
+ getconf LIBPATH
+ set -- 'lib/sparcv9:LD_LIBRARY_PATH_64:sol.*64*' lib:LD_LIBRARY_PATH
lib:LD_LIBRARY_PATH_32
+ IFS=$' \t\n'
+ env=''
+ IFS=:
+ set -- lib/sparcv9 LD_LIBRARY_PATH_64 'sol.*64*'
+ IFS=$' \t\n'
+ env=' LD_LIBRARY_PATH_64="$LD_LIBRARY_PATH_64"'
+ IFS=:
+ set -- lib LD_LIBRARY_PATH
+ IFS=$' \t\n'
+ env=' LD_LIBRARY_PATH_64="$LD_LIBRARY_PATH_64"
LD_LIBRARY_PATH="$LD_LIBRARY_PATH"'
+ IFS=:
+ set -- lib LD_LIBRARY_PATH_32
+ IFS=$' \t\n'
+ env=' LD_LIBRARY_PATH_64="$LD_LIBRARY_PATH_64"
LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
LD_LIBRARY_PATH_32="$LD_LIBRARY_PATH_32"'
-- snip --
Ok... the test does everything as expected but I do not set
LD_LIBRARY_PATH_(32|64) as the test run would expect it.
But why doesn't this happen on Solaris/i386 ?
The matching probe in the AST sources looks like this:
-- snip --
./src/lib/libast/features/libpath.sh
if test "0" != "$ok"
then libpath=lib:LD_LIBRARY_PATH
case `package` in
sgi.*) if test -d /lib32
then
libpath="lib32:LD_LIBRARYN32_PATH:sgi.mips3|sgi.*-n32,$libpath"
fi
if test -d /lib64
then
libpath="lib64:LD_LIBRARY64_PATH:sgi.mips[4-9]|sgi.*-64,$libpath"
fi
;;
sol*.sun*|sol*.sparc*)
if test -d /lib/sparcv9
then
libpath="lib/sparcv9:LD_LIBRARY_PATH_64:sol.*64*,$libpath"
fi
libpath="$libpath,lib:LD_LIBRARY_PATH_32"
;;
esac
elif test -x /lib/dld.sl
-- snip --
.. which is AFAIK not 100% correct since there is 64bit support on
Solaris/AMD64, too (and Solaris/PPC will have 32bit+64bit support, too).
Therefore it would be nice to replace "test -d /lib/sparcv9" with "test
-d /lib/64" and
'libpath="lib/sparcv9:LD_LIBRARY_PATH_64:sol.*64*,$libpath' with
'libpath="lib/64:LD_LIBRARY_PATH_64:sol.*64*,$libpath' (the /lib/64/
directory is more portable across various Solaris platforms than
/lib/sparcv9/, /lib/amd64/, or /lib/ppc64/).
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)