Unverified Commit f882f8c2 authored by Chen Zheng's avatar Chen Zheng Committed by GitHub
Browse files

[AIX] use LIBPATH on AIX instead of LD_LIBRARY_PATH (#94602)



LD_LIBRARY_PATH will become invalid when LIBPATH is also set on AIX.

See below example on AIX:
```
$ldd a.out
a.out needs:
	 /usr/lib/libc.a(shr.o)
Cannot find libtest.a
	 /unix
	 /usr/lib/libcrypt.a(shr.o)

$./a.out
Could not load program ./a.out:
	Dependent module libtest.a could not be loaded.
Could not load module libtest.a.
System error: No such file or directory

$export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp
$./a.out ; echo $?
10

$export LIBPATH=./
$./a.out ; echo $?  >>>>>> Now LD_LIBRARY_PATH is not used by system loader
Could not load program ./a.out:
	Dependent module libtest.a could not be loaded.
Could not load module libtest.a.
System error: No such file or directory
```

This breaks many AIX LIT cases on our downstream buildbots which sets
LIBPATH.

---------

Co-authored-by: default avatarAnh Tuyen Tran <34661776+anhtuyenibm@users.noreply.github.com>
Co-authored-by: default avatarDavid Tenty <daltenty.dev@gmail.com>
parent e9174ba7
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment