Hi!
----
I am getting the following error when running the "builtins.sh" test
with our dynamically linked version of ksh93:
-- snip --
## Running ksh test: LANG='C' script='builtins.sh'
ld.so.1: ksh: fatal: libshell.so.1: open failed: No such file or
directory
../../../lib/libshell/common/tests/builtins.sh: line 313: 17611: Killed
builtins.sh[314]: "name=value exec -c ..." not working
-- snip --
The problem is that the underlying build system does not have
libshell.so.1 installed which is needed by the "ksh" binary.
First I tried the following patch (which was designed to pass ALL env
vars related to the dynamic linker through, covering LD_LIBRARY_PATH in
all variants, stuff like LD_PRELOAD and even the LD_*DYNLIB* vars used
in MacOSX) ...
-- snip ..
Index: src/lib/libshell/common/tests/builtins.sh
===================================================================
--- src/lib/libshell/common/tests/builtins.sh (revision 326)
+++ src/lib/libshell/common/tests/builtins.sh (working copy)
@@ -310,7 +310,10 @@
(( $? == 1 )) || err_exit "wait not saving exit value"
wait $pid2
(( $? == 127 )) || err_exit "subshell job known to parent"
-if [[ $(foo=bar;foo=$foo exec -c $SHELL -c 'print $foo') != bar ]]
+# $(export | grep "^LD_") should pass dynamic linker flags such
+# as LD_LIBRARY_PATH($|_32$|_64$) or LD_PRELOAD "through"
+# to get dynamically linked versions of ksh working.
+if [[ $(foo=bar;foo=$foo $(export | grep "^LD_") exec -c $SHELL -c
'print $foo') != bar ]]
then err_exit '"name=value exec -c ..." not working'
fi
$SHELL -c 'OPTIND=-1000000; getopts a opt -a' 2> /dev/null
-- snip --
... but somehow it fails to execute
"LD_LIBRARY_PATH=/built_path_comes_here" which is simply wrong. I don't
know what's wrong here so I reverted to a simpler patch (attached as
"ksh93_tests_builtins_sh_LD_LIBRARY_PATH_fix001.diff.txt") which "only"
covers Solaris and Linux (both 32bit and 64bit), but IMO this is enougth
coverage for now... :-)
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)
-------------- next part --------------
Index: src/lib/libshell/common/tests/builtins.sh
===================================================================
--- src/lib/libshell/common/tests/builtins.sh (revision 326)
+++ src/lib/libshell/common/tests/builtins.sh (working copy)
@@ -310,7 +310,7 @@
(( $? == 1 )) || err_exit "wait not saving exit value"
wait $pid2
(( $? == 127 )) || err_exit "subshell job known to parent"
-if [[ $(foo=bar;foo=$foo exec -c $SHELL -c 'print $foo') != bar ]]
+if [[ $(foo=bar;foo=$foo LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
LD_LIBRARY_PATH_64="$LD_LIBRARY_PATH_64" exec -c $SHELL -c 'print $foo') != bar
]]
then err_exit '"name=value exec -c ..." not working'
fi
$SHELL -c 'OPTIND=-1000000; getopts a opt -a' 2> /dev/null