bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Shell function and LD_LIBRARY_PATH


From: Mohammad Akhlaghi
Subject: Shell function and LD_LIBRARY_PATH
Date: Sun, 20 Jan 2019 19:32:23 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]