Skip to content
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

build: fix shared installing target #15148

Closed
wants to merge 3 commits into from

Conversation

yorkie
Copy link
Contributor

@yorkie yorkie commented Sep 2, 2017

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

This patch fixes the target location with --shared flag, we should install the lib under $node_prefix/lib

@yorkie yorkie requested a review from stefanmb September 2, 2017 12:33
@nodejs-github-bot nodejs-github-bot added the build Issues and PRs related to build files or the CI. label Sep 2, 2017
tools/install.py Outdated
@@ -132,8 +133,7 @@ def files(action):
# in its source - see the _InstallableTargetInstallPath function.
if sys.platform != 'darwin':
output_prefix += 'lib.target/'

action([output_prefix + output_file], 'bin/' + output_file)
action([output_prefix + output_file], 'bin/' + output_file)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about:

action([output_prefix + output_file], ('bin/' if 'false' == variables.get('node_shared') else 'lib/) + output_file)

that only affect one line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice suggestion! Merged to one statement but still 2 lines because of the 80 chars per line rule :)

tools/install.py Outdated
@@ -133,7 +133,8 @@ def files(action):
if sys.platform != 'darwin':
output_prefix += 'lib.target/'

action([output_prefix + output_file], 'bin/' + output_file)
action([output_prefix + output_file], (
'bin/' if 'false' == variables.get('node_shared') else 'lib/') + output_file)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be easier on the eyes when written as an if/else statement. That's also the commonest style in this file and will also let you keep it <= 80 columns.

Copy link
Contributor Author

@yorkie yorkie Sep 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this?

if 'false' == variables.get('node_shared'):
  action([output_prefix + output_file], 'bin/' + output_file)
else:
  action([output_prefix + output_file], 'lib/' + output_file)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yorkie that looks like what Ben was suggesting, could you update this branch with that code?

@yorkie
Copy link
Contributor Author

yorkie commented Sep 7, 2017

Could someone take a look at this? This is a little patch to fix the vital issue!

@BridgeAR
Copy link
Member

BridgeAR commented Sep 7, 2017

@nodejs/build PTAL

@yorkie
Copy link
Contributor Author

yorkie commented Sep 10, 2017

Still Ping @bnoordhuis :(

@BridgeAR
Copy link
Member

Ping @nodejs/build again

@BridgeAR
Copy link
Member

Ping @nodejs/tsc

@yorkie
Copy link
Contributor Author

yorkie commented Sep 24, 2017

@yorkie that looks like what Ben was suggesting, could you update this branch with that code?

Ok, @gibfahn @bnoordhuis Updated :)

@gibfahn
Copy link
Member

gibfahn commented Sep 24, 2017

cc/ @nodejs/python

@yorkie
Copy link
Contributor Author

yorkie commented Sep 26, 2017

Ping @XadillaX LGTY now?

@gibfahn
Copy link
Member

gibfahn commented Sep 26, 2017

I think this is good to land if CI is green.

CI: https://ci.nodejs.org/job/node-test-commit/12619/

@BridgeAR
Copy link
Member

Landed in 6975c49

@BridgeAR BridgeAR closed this Sep 28, 2017
BridgeAR pushed a commit that referenced this pull request Sep 28, 2017
PR-URL: #15148
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@yorkie yorkie deleted the fix/shared-install branch September 28, 2017 06:52
MylesBorins pushed a commit to MylesBorins/node that referenced this pull request Sep 28, 2017
PR-URL: nodejs#15148
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 29, 2017
PR-URL: #15148
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit to addaleax/ayo that referenced this pull request Sep 30, 2017
PR-URL: nodejs/node#15148
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 3, 2017
PR-URL: #15148
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Oct 3, 2017
MylesBorins pushed a commit that referenced this pull request Oct 3, 2017
PR-URL: #15148
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 17, 2017
PR-URL: #15148
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Oct 17, 2017
bnoordhuis added a commit to bnoordhuis/io.js that referenced this pull request Oct 24, 2017
The npm install rules had a hidden dependency on the `node` binary
install rule creating the `$PREFIX/bin` directory.

Because with `./configure --shared` no binary is created, the rule
subsequently failed.  Fix that by creating the directory before
creating the symlinks to the npm and npx scripts.

(Whether it makes sense to install npm without a `node` binary is
a separate question.  This commit is not taking positions. :-))

Regression introduced in commit ed8c89a ("build: fix shared installing
target") which, as the commit log indicates, was itself a bug fix for
the `./configure --shared` install.

Fixes: nodejs#16437
Refs: nodejs#15148
MylesBorins pushed a commit that referenced this pull request Oct 25, 2017
PR-URL: #15148
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
mhdawson pushed a commit that referenced this pull request Oct 25, 2017
The npm install rules had a hidden dependency on the `node` binary
install rule creating the `$PREFIX/bin` directory.

Because with `./configure --shared` no binary is created, the rule
subsequently failed.  Fix that by creating the directory before
creating the symlinks to the npm and npx scripts.

(Whether it makes sense to install npm without a `node` binary is
a separate question.  This commit is not taking positions. :-))

Regression introduced in commit ed8c89a ("build: fix shared installing
target") which, as the commit log indicates, was itself a bug fix for
the `./configure --shared` install.

PR-URL: #16438
Fixes: #16437
Ref: #15148
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 26, 2017
The npm install rules had a hidden dependency on the `node` binary
install rule creating the `$PREFIX/bin` directory.

Because with `./configure --shared` no binary is created, the rule
subsequently failed.  Fix that by creating the directory before
creating the symlinks to the npm and npx scripts.

(Whether it makes sense to install npm without a `node` binary is
a separate question.  This commit is not taking positions. :-))

Regression introduced in commit ed8c89a ("build: fix shared installing
target") which, as the commit log indicates, was itself a bug fix for
the `./configure --shared` install.

PR-URL: nodejs/node#16438
Fixes: nodejs/node#16437
Ref: nodejs/node#15148
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
gibfahn pushed a commit that referenced this pull request Oct 30, 2017
The npm install rules had a hidden dependency on the `node` binary
install rule creating the `$PREFIX/bin` directory.

Because with `./configure --shared` no binary is created, the rule
subsequently failed.  Fix that by creating the directory before
creating the symlinks to the npm and npx scripts.

(Whether it makes sense to install npm without a `node` binary is
a separate question.  This commit is not taking positions. :-))

Regression introduced in commit ed8c89a ("build: fix shared installing
target") which, as the commit log indicates, was itself a bug fix for
the `./configure --shared` install.

PR-URL: #16438
Fixes: #16437
Ref: #15148
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
gibfahn pushed a commit that referenced this pull request Oct 30, 2017
The npm install rules had a hidden dependency on the `node` binary
install rule creating the `$PREFIX/bin` directory.

Because with `./configure --shared` no binary is created, the rule
subsequently failed.  Fix that by creating the directory before
creating the symlinks to the npm and npx scripts.

(Whether it makes sense to install npm without a `node` binary is
a separate question.  This commit is not taking positions. :-))

Regression introduced in commit ed8c89a ("build: fix shared installing
target") which, as the commit log indicates, was itself a bug fix for
the `./configure --shared` install.

PR-URL: #16438
Fixes: #16437
Ref: #15148
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
gibfahn pushed a commit that referenced this pull request Oct 31, 2017
The npm install rules had a hidden dependency on the `node` binary
install rule creating the `$PREFIX/bin` directory.

Because with `./configure --shared` no binary is created, the rule
subsequently failed.  Fix that by creating the directory before
creating the symlinks to the npm and npx scripts.

(Whether it makes sense to install npm without a `node` binary is
a separate question.  This commit is not taking positions. :-))

Regression introduced in commit ed8c89a ("build: fix shared installing
target") which, as the commit log indicates, was itself a bug fix for
the `./configure --shared` install.

PR-URL: #16438
Fixes: #16437
Ref: #15148
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Nov 3, 2017
MylesBorins pushed a commit that referenced this pull request Nov 16, 2017
The npm install rules had a hidden dependency on the `node` binary
install rule creating the `$PREFIX/bin` directory.

Because with `./configure --shared` no binary is created, the rule
subsequently failed.  Fix that by creating the directory before
creating the symlinks to the npm and npx scripts.

(Whether it makes sense to install npm without a `node` binary is
a separate question.  This commit is not taking positions. :-))

Regression introduced in commit ed8c89a ("build: fix shared installing
target") which, as the commit log indicates, was itself a bug fix for
the `./configure --shared` install.

PR-URL: #16438
Fixes: #16437
Ref: #15148
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 21, 2017
The npm install rules had a hidden dependency on the `node` binary
install rule creating the `$PREFIX/bin` directory.

Because with `./configure --shared` no binary is created, the rule
subsequently failed.  Fix that by creating the directory before
creating the symlinks to the npm and npx scripts.

(Whether it makes sense to install npm without a `node` binary is
a separate question.  This commit is not taking positions. :-))

Regression introduced in commit ed8c89a ("build: fix shared installing
target") which, as the commit log indicates, was itself a bug fix for
the `./configure --shared` install.

PR-URL: #16438
Fixes: #16437
Ref: #15148
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 28, 2017
The npm install rules had a hidden dependency on the `node` binary
install rule creating the `$PREFIX/bin` directory.

Because with `./configure --shared` no binary is created, the rule
subsequently failed.  Fix that by creating the directory before
creating the symlinks to the npm and npx scripts.

(Whether it makes sense to install npm without a `node` binary is
a separate question.  This commit is not taking positions. :-))

Regression introduced in commit ed8c89a ("build: fix shared installing
target") which, as the commit log indicates, was itself a bug fix for
the `./configure --shared` install.

PR-URL: #16438
Fixes: #16437
Ref: #15148
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
The npm install rules had a hidden dependency on the `node` binary
install rule creating the `$PREFIX/bin` directory.

Because with `./configure --shared` no binary is created, the rule
subsequently failed.  Fix that by creating the directory before
creating the symlinks to the npm and npx scripts.

(Whether it makes sense to install npm without a `node` binary is
a separate question.  This commit is not taking positions. :-))

Regression introduced in commit ed8c89a ("build: fix shared installing
target") which, as the commit log indicates, was itself a bug fix for
the `./configure --shared` install.

PR-URL: nodejs/node#16438
Fixes: nodejs/node#16437
Ref: nodejs/node#15148
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
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.

8 participants