Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node.js version 8.1.3 'make test' does not obey LD_LIBRARY_PATH #14113

Closed
sauergeek opened this issue Jul 6, 2017 · 4 comments
Closed

Node.js version 8.1.3 'make test' does not obey LD_LIBRARY_PATH #14113

sauergeek opened this issue Jul 6, 2017 · 4 comments
Labels
build Issues and PRs related to build files or the CI. test Issues and PRs related to the tests.

Comments

@sauergeek
Copy link

  • Version: 8.1.3
  • Platform: Linux pc-16l9rd2 3.10.0-514.26.2.el7.x86_64 deps: update openssl to 1.0.1j #1 SMP Fri Jun 30 05:26:04 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem: n/a

In case the specific Linux variant matters, the platform is Red Hat Enterprise Linux 7.3 with a fair bit of newer custom software living in /usr/sup.

The Node.js build instructions say configure, make, make test. In my case, make test fails, and it fails in a way that suggests it's ignoring LD_LIBRARY_PATH. See below for my results. In particular, several tests fail because they are using /lib64/libstdc++.so.6 rather than the newer /usr/sup/lib64/libstdc++.so.6 that Node.js was compiled with. How do I get make test to obey LD_LIBRARY_PATH?

The tests which look like they're ignoring LD_LIBRARY_PATH are:
test-benchmark-crypto
test-benchmark-timers
test-cli-node-options
test-inspector-open
test-process-redirect-warnings-env
test-tls-env-extra-ca
test-inspector-port-cluster
test-benchmark-child-process
test-benchmark-http
test-benchmark-net

Several other tests also fail. With LD_LIBRARY_PATH being obviously ignored in the above tests, I can't tell if the other failures are merely being less obvious about ignoring LD_LIBRARY_PATH or if they're actually failing for another reason.

The tests failing for reasons that aren't obviously getting the wrong version of libstdc++ are:
test-env-var-no-warnings
test-icu-data-dir
test-pending-deprecation
testInstanceOf

Pertinent commands and relevant output:

% gcc --version
gcc (GCC) 5.4.0
...
% which gcc
/usr/sup/bin/gcc
% printenv LD_LIBRARY_PATH
/usr/sup/lib64:/usr/sup/lib
% ./configure --prefix=/usr/sup/node-8.1.3
...output elided...
% make
...make succeeds...
% make test
...lots of test output elided...
[several instances of variations on the following]
=== release test-benchmark-net ===
Path: sequential/test-benchmark-net
/var/tmp/node-v8.1.3/out/Release/node: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by /var/tmp/node-v8.1.3/out/Release/node) /var/tmp/node-v8.1.3/out/Release/node: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by /var/tmp/node-v8.1.3/out/Release/node)
assert.js:60
throw new errors.AssertionError({
^

AssertionError [ERR_ASSERTION]: 1 === 0
at ChildProcess.child.on (/var/tmp/node-v8.1.3/test/sequential/test-benchmark-net.js:21:10)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
Command: out/Release/node /var/tmp/node-v8.1.3/test/sequential/test-benchmark-net.js
...
% strings /lib64/libstdc++.so.6 | grep '^GLIBCXX_3.4.[12].' | sort -u
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
% strings /usr/sup/lib64/libstdc++.so.6 | grep '^GLIBCXX_3.4.[12].' | sort -u
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
%

@bnoordhuis bnoordhuis added build Issues and PRs related to build files or the CI. test Issues and PRs related to the tests. labels Jul 6, 2017
@bnoordhuis
Copy link
Member

How do I get make test to obey LD_LIBRARY_PATH?

The short answer is "you don't."

Quite a few tests spawn child processes with intentionally empty or custom environments. If you want node to use a newer libstdc++, you'll have to directly link against it.

@sauergeek
Copy link
Author

Setting LDFLAGS does not solve this problem, which surprises me: I get exactly the same set of errors. I ended up having to set LD_RUN_PATH instead.

Did not work:
% setenv LDFLAGS "-L/usr/sup/lib64 -L/usr/sup/lib"

Did work:
% setenv LD_RUN_PATH "/usr/sup/lib64:/usr/sup/lib"

That got me down to just testInstanceOf failing, which I will investigate separately.

@bnoordhuis
Copy link
Member

If you are running tests from a tarball it might be #13344.

@sauergeek
Copy link
Author

I am building and testing from tarball, and that's the failure I'm seeing. Rather than clone off the repository, I'm just ignoring the error and will install what I have built. Thanks for the followup!

cjihrig added a commit to cjihrig/node that referenced this issue Jul 13, 2017
The N-API test testInstanceOf.js relies on several V8 test files
which may not exist in downloadable archives. If the files are
missing, this commit causes a warning to be emitted rather than
failing the test.

Refs: nodejs#14113
Fixes: nodejs#13344
PR-URL: nodejs#14123
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax pushed a commit that referenced this issue Jul 18, 2017
The N-API test testInstanceOf.js relies on several V8 test files
which may not exist in downloadable archives. If the files are
missing, this commit causes a warning to be emitted rather than
failing the test.

Refs: #14113
Fixes: #13344
PR-URL: #14123
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fishrock123 pushed a commit that referenced this issue Jul 19, 2017
The N-API test testInstanceOf.js relies on several V8 test files
which may not exist in downloadable archives. If the files are
missing, this commit causes a warning to be emitted rather than
failing the test.

Refs: #14113
Fixes: #13344
PR-URL: #14123
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
gabrielschulhof pushed a commit to gabrielschulhof/node that referenced this issue Apr 10, 2018
The N-API test testInstanceOf.js relies on several V8 test files
which may not exist in downloadable archives. If the files are
missing, this commit causes a warning to be emitted rather than
failing the test.

Refs: nodejs#14113
Fixes: nodejs#13344
PR-URL: nodejs#14123
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Apr 16, 2018
The N-API test testInstanceOf.js relies on several V8 test files
which may not exist in downloadable archives. If the files are
missing, this commit causes a warning to be emitted rather than
failing the test.

Refs: #14113
Fixes: #13344
Backport-PR-URL: #19447
PR-URL: #14123
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. test Issues and PRs related to the tests.
Projects
None yet
Development

No branches or pull requests

2 participants