Skip to content

build: support out of tree build #10751

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

Closed
wants to merge 1 commit into from
Closed

build: support out of tree build #10751

wants to merge 1 commit into from

Conversation

nmschulte
Copy link

@nmschulte nmschulte commented Jan 12, 2017

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 build files or the CI. lts-watch-v6.x labels Jan 12, 2017
@sam-github
Copy link
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
Copy link
Author

nmschulte commented Jan 12, 2017

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
Copy link
Member

targos commented Jan 12, 2017

@bnoordhuis
Copy link
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
Copy link
Author

nmschulte commented Jan 13, 2017

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
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
Copy link
Author

nmschulte commented Jan 13, 2017 via email

@bnoordhuis
Copy link
Member

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

@jasnell
Copy link
Member

jasnell commented Mar 24, 2017

Any updates on this one?

@nmschulte
Copy link
Author

nmschulte commented Apr 2, 2017

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
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
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
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
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 build files or the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants