Dear GNU Make developers,

I recently installed the newly released Bash 5.0 (accompanied by a new libreadline library) in a user-specific directory. The host operating system (on a server, where I don't have root access) uses an older version of Bash.

Through Make's `SHELL' variable, I have asked Make to use the updated version of Bash. In Make, I have also exported `LD_LIBRARY_PATH', so my Bash can find the proper version of libreadline to link with. This exportation of LD_LIBRARY_PATH is done very early in the Makefile and is set with `:=':

export LD_LIBRARY_PATH := /home/user/.local/lib

This works nicely for all the shell calls within recipes. However, when I use the $(shell ...) function, I get a linking error (shown below) by my new Bash for every use of the $(shell ...) function.

/home/user/.local/bin/bash: error while loading shared libraries: libreadline.so.8: cannot open shared object file: No such file or directory

Reverting back to the system's Bash, I tried $(shell printenv) as well as a call to `printenv' in a recipe. I noticed that while the other important environment variables like `PATH', `LDFLAGS' and etc are in both, LD_LIBRARY_PATH is not present in value of $(shell printenv).

Since I couldn't find any mention of this in in the manual, I wanted to see if this removal of LD_LIBRARY_PATH from the $(shell) function is intentional or if its a bug?

I am using Make 4.2.90 (recently bootstrapped https://git.savannah.gnu.org/cgit/make.git ).

Cheers,
Mohammad

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to