[all-commits] [llvm/llvm-project] f882f8: [AIX] use LIBPATH on AIX instead of LD_LIBRARY_PAT...

Chen Zheng via All-commits all-commits at lists.llvm.org
Thu Jun 6 08:50:20 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f882f8c293d2064619f7eb3dc716dcaf3e2da875
      https://github.com/llvm/llvm-project/commit/f882f8c293d2064619f7eb3dc716dcaf3e2da875
  Author: Chen Zheng <czhengsz at cn.ibm.com>
  Date:   2024-06-06 (Thu, 06 Jun 2024)

  Changed paths:
    M llvm/utils/lit/lit/llvm/config.py

  Log Message:
  -----------
  [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: Anh Tuyen Tran <34661776+anhtuyenibm at users.noreply.github.com>
Co-authored-by: David Tenty <daltenty.dev at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list