镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

build: support out of tree build - #10751

Closed
nmschulte wants to merge 1 commit into
nodejs:masterfrom
nmschulte:out-of-tree-build
Closed

nmschulte wants to merge 1 commit into
nodejs:masterfrom
nmschulte:out-of-tree-build

Conversation

@nmschulte

@nmschulte nmschulte commented Jan 12, 2017 •

Copy link
Copy Markdown

Beginnings of #10748.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

build; none?

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to Node.js builds or CI infrastructure. lts-watch-v6.x labels Jan 12, 2017
@sam-github

Copy link
Copy Markdown
Contributor

Please re-add the check-list from the PR template, particularly the "follows standard commit message format"

Use standard commit format https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#step-3-commit

I've no idea what "d." means.

@nmschulte

nmschulte commented Jan 12, 2017 •

Copy link
Copy Markdown
Author

I assume build is the subsystem, given the label here? d. is short for differentiate

Note: it's rather difficult to find the PR template: I had to start creating a new PR, and that took a long time when trying to compare some of the available branches to allow me to see the template.

updates the configure script to differentiate between the src (project;
previously 'root_dir') and the build directories, which may be
different
@nmschulte nmschulte changed the title d. between src and build w/root_dir in configure build: support out of tree build Jan 12, 2017
@targos

targos commented Jan 12, 2017

Copy link
Copy Markdown
Member

@bnoordhuis

Copy link
Copy Markdown
Member

This should be tested on the CI, otherwise it's going to be broken again a few months from now.

I don't really see a compelling reason to support out-of-tree builds, though. Just copy the source tree, no build system changes required.

@nmschulte

nmschulte commented Jan 13, 2017 •

Copy link
Copy Markdown
Author

I don't really see a compelling reason to support out-of-tree builds, though. Just copy the source tree, no build system changes required.

nmschulte@desmas-l:~$ du -hcs ~/src/node*
3.8G	/home/nmschulte/src/node
5.1G	/home/nmschulte/src/node.6.3.1
8.8G	total

The tree is ~4 GB+.

@bnoordhuis

Copy link
Copy Markdown
Member

Not really an issue though, is it? Storage is cheap and plentiful nowadays. I have about 50 GB worth of checkouts and that's 2.5% of total disk space.

@nmschulte

nmschulte commented Jan 13, 2017 via email

Copy link
Copy Markdown
Author

@bnoordhuis

Copy link
Copy Markdown
Member

They are generated by gyp, from tools/gyp. Only the top-level Makefile is handwritten.

@jasnell

jasnell commented Mar 24, 2017

Copy link
Copy Markdown
Member

Any updates on this one?

@nmschulte

nmschulte commented Apr 2, 2017 •

Copy link
Copy Markdown
Author

I haven't needed to build node (npm, really) since making this request. It seems the team doesn't wish to support this, so I've stopped.

The impetus for this issue was that npm link behavior is thoroughly broken in any non-trivial scenario. This likely means I'll be moving away from npm in the future, as the issue is very long standing.

The next steps here are to look at how gyp generates the Makefiles. I'm not familiar with gyp, but one should be able to follow the rabbit hole by looking for root_dir and the related variables that my first commit changes.

It's possible that the one line change to gyp_args is all that is needed here, but as I'm unfamiliar with gyp, I cannot really comment on that. 4f5b746#diff-e2d5a00791bce9a01f99bc6fd613a39dR1343

@bnoordhuis

Copy link
Copy Markdown
Member

The impetus for this issue was that npm link behavior is thoroughly broken in any non-trivial scenario.

I'm not following. How do npm link and out-of-tree builds relate?

@nmschulte

Copy link
Copy Markdown
Author

I'm not following. How do npm link and out-of-tree builds relate?

They relate like so: I needed to perform many builds of Node, while preferring to retain the compilations and build configurations, while searching a solution to the longstanding npm link bug that is ultimately hindering my progress.
npm/npm#10343

A build supporting out-of-source-tree building does this very nicely, and is the typical solution; hence this PR.

I've stopped using npm link the way it's documented, allowing me to stop building nodejs/npm, and to stop running into the npm link bug.

@BridgeAR

Copy link
Copy Markdown
Member

I do not have a strong opinion on this but would it not be best to try to solve the issue on npm?
And would you want to continue working on this here @nmschulte?

@nmschulte

Copy link
Copy Markdown
Author

I don't build Node.js/npm very often, so I won't be continuing with this effort here.

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 Node.js builds or CI infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants