node-gyp icon indicating copy to clipboard operation
node-gyp copied to clipboard

Set default value for LD_LIBRARY_PATH in makefile

Open hverlin opened this issue 2 years ago • 0 comments

If set -u was set (i.e., nounset in SHELLOPTS), then the installation will fail if LD_LIBRARY_PATH is unset.

One will get the following error:

LD_LIBRARY_PATH: unbound variable

You can reproduce with SHELLOPTS=nounset <your script>.

I see that LD_LIBRARY_PATH is used in two places:

  • https://github.com/nodejs/node-gyp/blob/ed9a9ed653a17c84afa3c327161992d0da7d0cea/gyp/pylib/gyp/generator/make.py#L985
  • https://github.com/nodejs/node-gyp/blob/ed9a9ed653a17c84afa3c327161992d0da7d0cea/gyp/pylib/gyp/generator/make.py#L1148

Would it make sense to set a default value for LD_LIBRARY_PATH?

hverlin avatar Mar 22 '22 09:03 hverlin