-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Comments
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. |
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: Did work: That got me down to just testInstanceOf failing, which I will investigate separately. |
If you are running tests from a tarball it might be #13344. |
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! |
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 <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
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
%
The text was updated successfully, but these errors were encountered: