-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
test: Node 8.9.0 cannot 'make test' when building from source code #16650
Comments
@joyeecheung, is it test doc related? |
In my company we run tests using |
@BobCochran I've tried it on Ubuntu and looks like if you run I'll investigate why this fails on the first attempt..Also this works on Mac so I think there are probably some differences in gnu make. |
diff --git a/Makefile b/Makefile
index c2f872daed..f7fc5b676d 100644
--- a/Makefile
+++ b/Makefile
@@ -544,7 +544,8 @@ apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
-doc-only: $(apidocs_html) $(apidocs_json)
+doc-targets: $(apidocs_html) $(apidocs_json)
+doc-only: | install-yaml doc-targets
doc: $(NODE_EXE) doc-only
$(apidoc_dirs):
@@ -561,15 +562,16 @@ gen-json = tools/doc/generate.js --format=json $< > $@
gen-html = tools/doc/generate.js --node-version=$(FULLVERSION) --format=html \
--template=doc/template.html --analytics=$(DOCS_ANALYTICS) $< > $@
-gen-doc = \
+install-yaml:
[ -e tools/doc/node_modules/js-yaml/package.json ] || \
[ -e tools/eslint/node_modules/js-yaml/package.json ] || \
if [ -x $(NODE) ]; then \
cd tools/doc && ../../$(NODE) ../../$(NPM) install; \
else \
cd tools/doc && node ../../$(NPM) install; \
- fi;\
- [ -x $(NODE) ] && $(NODE) $(1) || node $(1)
+ fi;
+
+gen-doc = [ -x $(NODE) ] && $(NODE) $(1) || node $(1)
out/doc/api/%.json: doc/api/%.md
@$(call gen-doc, $(gen-json)) There is probably some problems in order of dependencies, this patch seems to work for me on Ubuntu, I will open a PR shortly |
By the way, |
@joyeecheung here is the build sequence I followed:
./configure —prefix=$MY_NODE_PREFIX
make
make test
MY_NODE_PREFIX resolves to my home directory $HOME/local
I vaguely recall seeing a ‘make doc-only’ that was emitted by the Makefile as part of the ‘make test’ output. I will try both ‘make doc-only’ and ‘make test’ and report back. All I really wanted to do was to execute ‘make test ‘ and see normal test completion.
Thanks!
Bob
… On Oct 31, 2017, at 11:41 PM, Joyee Cheung ***@***.***> wrote:
@BobCochran I've tried it on Ubuntu and looks like if you run make doc-only, it will fail on the first attempt but will work the second time. Can you try running it again?
I'll investigate why this fails on the first attempt..
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@joyeecheung I tried your suggestion by running 'make test' a second time, and it worked fine. My first execution of 'make test' ended in an error, at which point I created this issue to report it in. Then following your advice I ran 'make test' a second time. That worked fine. This is the output I received at the console. If you would like me to assist in resolving this issue in any way (such as to test a patch) please let me know. Thank you for telling me that I can run |
Running
After running I suggest an update to https://github.com/nodejs/node/blob/master/BUILDING.md#building-nodejs-on-supported-platforms to clarify that docs need to be built prior to running |
For a long time — until now — ‘make test ‘ has just worked without requiring the user to run ‘make doc’ as a prerequisite step.
… On Nov 17, 2017, at 6:09 AM, Brett Sheffield ***@***.***> wrote:
Running make test prior to running make doc results in this error:
added 3 packages and updated 1 package in 1.717s
/bin/sh: out/doc/api/console.html: No such file or directory
Makefile:579: recipe for target 'out/doc/api/console.html' failed
make[1]: *** [out/doc/api/console.html] Error 1
Makefile:213: recipe for target 'test' failed
make: *** [test] Error 2
After running make doc, make test succeeds.
I suggest an update to https://github.com/nodejs/node/blob/master/BUILDING.md#building-nodejs-on-supported-platforms to clarify that docs need to be built prior to running make test
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@BobCochran @brettsheffield Yes, and it's supposed to work without running Also this seems specific to GNU make v4.x, I suspect it's the conditionals in |
BTW, |
hmm..I think I understand why this failed with GNU make 4.x now, in 3.x
takes precedence over
while in 4.x, the latter will be called first. So in 3.x, make would not even try to generate the docs because they are already in |
I just checked my version of make on the host I'm using for node builds --
Fedora 26 Workstation with all the latest updates.
$ make --version
GNU Make 4.2.1
Built for x86_64-redhat-linux-gnu
…On Fri, Nov 17, 2017 at 9:56 AM, Joyee Cheung ***@***.***> wrote:
hmm..I think I understand why this failed with GNU make 4.x now, in 3.x
out/doc/%: doc/%
@cp -r $< $@
takes precedence over
out/doc/api/%.json: doc/api/%.md
@$(call gen-doc, $(gen-json))
# check if ./node is actually set, else use user pre-installed binary
out/doc/api/%.html: doc/api/%.md
@$(call gen-doc, $(gen-html))
while in 4.x, the latter will be called first. So in 3.x, make would not
even try to generate the docs because they are already in doc/api and can
just be copied over. We need to somehow fix the dependency chain to get
make 4.x run the former first again.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16650 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACWJySSDxBUC-i5KnlEeNncs4j8awOLMks5s3Z6qgaJpZM4QNYz2>
.
|
PR-URL: #17100 Fixes: #16650 Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: #16661 Fixes: #16650 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]>
PR-URL: #17100 Fixes: #16650 Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: #16661 Fixes: #16650 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]>
PR-URL: #17100 Fixes: #16650 Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: #16661 Fixes: #16650 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]>
PR-URL: #17100 Fixes: #16650 Reviewed-By: Refael Ackermann <[email protected]>
I downloaded the source code tarball node-v8.9.0.tar.gz to build node on a Fedora 26 workstation. 'make test' fails at this point:
`Building addon /home/bcochranc/Downloads/node-v8.9.0/test/addons-napi/test_warning/
make[2]: Entering directory '/home/bcochranc/Downloads/node-v8.9.0/test/addons-napi/test_warning/build'
CC(target) Release/obj.target/test_warning/test_warning.o
SOLINK_MODULE(target) Release/obj.target/test_warning.node
COPY Release/test_warning.node
CC(target) Release/obj.target/test_warning2/test_warning2.o
SOLINK_MODULE(target) Release/obj.target/test_warning2.node
COPY Release/test_warning2.node
make[2]: Leaving directory '/home/bcochranc/Downloads/node-v8.9.0/test/addons-napi/test_warning/build'
touch test/addons-napi/.buildstamp
make doc-only
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
added 3 packages and updated 1 package in 0.872s
/bin/sh: out/doc/api/debugger.html: No such file or directory
make[1]: *** [Makefile:579: out/doc/api/debugger.html] Error 1
make: *** [Makefile:215: test] Error 2
`
I was last able to
make test
successfully with version 8.7.0. Node releases since then have failed when attempting tomake test
.The text was updated successfully, but these errors were encountered: