Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

build: fix make install and out/doc/api%.html in BUILDTYPE=Debug #2615

Closed
wants to merge 1 commit into from

Conversation

shigeki
Copy link

@shigeki shigeki commented Jan 26, 2012

It is reported in Japanese NodeJS ML that installing of 0.7.1 with nave is failed.
This is because nave builds and installs node with "./configure --debug ; make; make install" and GYP in 0.7.x only build out/Debug while WAF in 0.6.x build both out/Debug and out/Release.

It might be an issue of nave but I think it is worth to fix this in the node side to be compatible with the build behaviors between 0.6.x and 0.7.x

Before applying this patch, it fails to make install after configure --debug as below

# ./configure --debug ; make ; make install
(snip)
make[1]: Entering directory `/home/ohtsu/tmp/github/node/out'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/ohtsu/tmp/github/node/out'
ln -fs out/Debug/node node_g
out/Release/node tools/installer.js ./config.gypi install
make: out/Release/node: Command not found
make: *** [install] Error 127

Bfter applying this patch, the Release build is checked before make install and install was completed fine.

# ./configure --debug ; make ; make install
(snip)
mkdir -p /usr/local/lib/node/
cp -rf tools/wafadmin /usr/local/lib/node/
cp -rf tools/node-waf /usr/local/bin/node-waf
mkdir -p /usr/local/lib/node_modules/
cp -rf deps/npm /usr/local/lib/node_modules/npm
ln -sf ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
#

@bnoordhuis
Copy link
Member

Shigeki, thanks for the report. Isn't the patch below all that you need? It's in line with the v0.6 system in that it builds both debug and release builds if --debug is given.

diff --git a/Makefile b/Makefile
index 33c9e18..54199ee 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ PYTHON ?= python
 ifeq ($(BUILDTYPE),Release)
 all: out/Makefile node
 else
-all: out/Makefile node_g
+all: out/Makefile node node_g
 endif

 # The .PHONY is needed to ensure that we recursively use the out/Makefile

@shigeki
Copy link
Author

shigeki commented Jan 26, 2012

Ben, yes your patch is right.
I just assumed that you had changed the policy of "make all" not to build both ones in the Debug for saving time because GYP needs longer time than that of WAF and it seems to be rare for someone to type just "make install" only in configured as debug build.
Your patch makes Node behave completely in the same manner between WAF and GYP. Please apply it.

@bnoordhuis
Copy link
Member

Thanks Shigeki, it's fixed in f89beaf.

@shigeki
Copy link
Author

shigeki commented Jan 27, 2012

Ben, thank for your fix. nave will work well in the next 0.7.2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants