[ksh93-integration-discuss] Re: "builtins.sh[341]: "name=value exec -c ..." not working" strikes again (my fault, but...) ...

Glenn Fowler gsf at research.att.com
Wed Dec 20 11:05:26 PST 2006


On Wed, 20 Dec 2006 08:07:59 +0100 Roland Mainz wrote:

> 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

> Ok... the test does everything as expected but I do not set
> LD_LIBRARY_PATH_(32|64) as the test run would expect it.

the test doesn't expect any specific var to be there or not
its simply trying to preserve the env magic that is required to
find -lshell in the event that $SHELL is dynamically linked

it may be a problem exporting empty vars, so change the test from
	env="$env $2=\"\$$2\""
to
	eval [[ \$$2 ]] && env="$env $2=\"\$$2\""

> But why doesn't this happen on Solaris/i386 ?
> ./src/lib/libast/features/libpath.sh
> .. 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/).

this is one of those places in sw that changes as external reports filter in
we'd need a full time staff to keep track of just LD_* vs ld.so
variants on all of the architectures we support
heaven forbid *any* vendor did something with a discernable exception-free pattern

getconf LIBPATH is of the form

	DIR:VAR[:HOSTTYPE-PATTERN][,...]

where
	DIR	trailing components of dir for runtime dlls/shared-libs
		/DIR and/or /usr/DIR should exist
	VAR	env var that must have ROOT/DIR as one of the : separated components
		in its value
	HOSTTYPE-PATTERN
		optional ast $HOSTTYPE ksh pattern

if either DIR exists in one of the expected roots { / /usr } or $HOSTTYPE matches
HOSTTYPE-PATTERN (if specified) then VAR should be exported with ROOT/DIR as one of
the : separated components in its value

I'll gladly roll in known and verified
	DIR:VAR
pairs into the libast iffe

the solaris LIBPATH will be

	"lib/64:LD_LIBRARY_PATH_64:sol.*64*,lib/32:LD_LIBRARY_PATH_32,lib:LD_LIBRARY_PATH"

if /lib/64 and/or lib/32 exist on the machine on which iffe runs

-- Glenn Fowler -- AT&T Research, Florham Park NJ --




More information about the ksh93-integration-discuss mailing list