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,tools: fix cmd_regen_makefile #34255

Closed
wants to merge 2 commits into from

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Jul 8, 2020

Currently, after having configured and built node and then updating a
dependent target the following error is produced when trying to rebuild
the project:

$ ./configure && make -j8
$ touch node.gypi
$ make -j8
configure: error: no such option: -f
make[1]: *** [Makefile:685: Makefile] Error 2

The reason for this is that the target cmd_regen_makefile is using the
command configure instead of gyp_node.py in out/Makefile:

cmd_regen_makefile = cd $(srcdir); /work/nodejs/node/configure -fmake

As far as I can tell gyp is using sys.argv[0] as the gyp_binary in
__init__.py:

params = {'options': options,
              ...
              'gyp_binary': sys.argv[0],

But when called via 'configure' sys.argv[0] is 'configure' instead of gyp_node.py
leading to the above error.

This commit suggests setting the program name explicitly in
gyp_node.py. Alternatively perhaps this could be done in configure.py
instead but I was not sure what would be best.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Currently, after having configured and built node and then updating a
dependent target the following error is produced when trying to rebuild
the project:

$ ./configure && make -j8
$ touch node.gypi
$ make -j8
configure: error: no such option: -f
make[1]: *** [Makefile:685: Makefile] Error 2

The reason for this is that the target 'cmd_regen_makefile' is using the
command 'configure' instead of 'gyp_node.py' in out/Makefile:
cmd_regen_makefile = cd $(srcdir); /work/nodejs/node/configure -fmake

As far as I can tell gyp is using sys.argv[0] as the 'gyp_binary' in
__init__.py:
params = {'options': options,
              ...
              'gyp_binary': sys.argv[0],

But when called via 'configure' sys.argv[0] is 'configure' instead of
gyp_node.py leading to the above error.

This commit suggests setting the program name explicitly in
gyp_node.py. Alternatively perhaps this could be done in configure.py
instead but I was not sure what would be best.
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. tools Issues and PRs related to the tools directory. labels Jul 8, 2020
@nodejs-github-bot
Copy link
Collaborator

tools/gyp_node.py Outdated Show resolved Hide resolved
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@danbev danbev added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 13, 2020
danbev added a commit that referenced this pull request Jul 14, 2020
Currently, after having configured and built node and then updating a
dependent target the following error is produced when trying to rebuild
the project:

$ ./configure && make -j8
$ touch node.gypi
$ make -j8
configure: error: no such option: -f
make[1]: *** [Makefile:685: Makefile] Error 2

The reason for this is that the target 'cmd_regen_makefile' is using the
command 'configure' instead of 'gyp_node.py' in out/Makefile:
cmd_regen_makefile = cd $(srcdir); /work/nodejs/node/configure -fmake

As far as I can tell gyp is using sys.argv[0] as the 'gyp_binary' in
__init__.py:
params = {'options': options,
              ...
              'gyp_binary': sys.argv[0],

But when called via 'configure' sys.argv[0] is 'configure' instead of
gyp_node.py leading to the above error.

This commit suggests setting the program name explicitly in
gyp_node.py. Alternatively perhaps this could be done in configure.py
instead but I was not sure what would be best.

PR-URL: #34255
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
@danbev
Copy link
Contributor Author

danbev commented Jul 14, 2020

Landed in 8da0ae2.

@danbev danbev closed this Jul 14, 2020
@danbev danbev deleted the build_regen_make branch July 14, 2020 04:33
MylesBorins pushed a commit that referenced this pull request Jul 14, 2020
Currently, after having configured and built node and then updating a
dependent target the following error is produced when trying to rebuild
the project:

$ ./configure && make -j8
$ touch node.gypi
$ make -j8
configure: error: no such option: -f
make[1]: *** [Makefile:685: Makefile] Error 2

The reason for this is that the target 'cmd_regen_makefile' is using the
command 'configure' instead of 'gyp_node.py' in out/Makefile:
cmd_regen_makefile = cd $(srcdir); /work/nodejs/node/configure -fmake

As far as I can tell gyp is using sys.argv[0] as the 'gyp_binary' in
__init__.py:
params = {'options': options,
              ...
              'gyp_binary': sys.argv[0],

But when called via 'configure' sys.argv[0] is 'configure' instead of
gyp_node.py leading to the above error.

This commit suggests setting the program name explicitly in
gyp_node.py. Alternatively perhaps this could be done in configure.py
instead but I was not sure what would be best.

PR-URL: #34255
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Jul 14, 2020
MylesBorins pushed a commit that referenced this pull request Jul 16, 2020
Currently, after having configured and built node and then updating a
dependent target the following error is produced when trying to rebuild
the project:

$ ./configure && make -j8
$ touch node.gypi
$ make -j8
configure: error: no such option: -f
make[1]: *** [Makefile:685: Makefile] Error 2

The reason for this is that the target 'cmd_regen_makefile' is using the
command 'configure' instead of 'gyp_node.py' in out/Makefile:
cmd_regen_makefile = cd $(srcdir); /work/nodejs/node/configure -fmake

As far as I can tell gyp is using sys.argv[0] as the 'gyp_binary' in
__init__.py:
params = {'options': options,
              ...
              'gyp_binary': sys.argv[0],

But when called via 'configure' sys.argv[0] is 'configure' instead of
gyp_node.py leading to the above error.

This commit suggests setting the program name explicitly in
gyp_node.py. Alternatively perhaps this could be done in configure.py
instead but I was not sure what would be best.

PR-URL: #34255
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
cjihrig pushed a commit that referenced this pull request Jul 23, 2020
Currently, after having configured and built node and then updating a
dependent target the following error is produced when trying to rebuild
the project:

$ ./configure && make -j8
$ touch node.gypi
$ make -j8
configure: error: no such option: -f
make[1]: *** [Makefile:685: Makefile] Error 2

The reason for this is that the target 'cmd_regen_makefile' is using the
command 'configure' instead of 'gyp_node.py' in out/Makefile:
cmd_regen_makefile = cd $(srcdir); /work/nodejs/node/configure -fmake

As far as I can tell gyp is using sys.argv[0] as the 'gyp_binary' in
__init__.py:
params = {'options': options,
              ...
              'gyp_binary': sys.argv[0],

But when called via 'configure' sys.argv[0] is 'configure' instead of
gyp_node.py leading to the above error.

This commit suggests setting the program name explicitly in
gyp_node.py. Alternatively perhaps this could be done in configure.py
instead but I was not sure what would be best.

PR-URL: #34255
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
Currently, after having configured and built node and then updating a
dependent target the following error is produced when trying to rebuild
the project:

$ ./configure && make -j8
$ touch node.gypi
$ make -j8
configure: error: no such option: -f
make[1]: *** [Makefile:685: Makefile] Error 2

The reason for this is that the target 'cmd_regen_makefile' is using the
command 'configure' instead of 'gyp_node.py' in out/Makefile:
cmd_regen_makefile = cd $(srcdir); /work/nodejs/node/configure -fmake

As far as I can tell gyp is using sys.argv[0] as the 'gyp_binary' in
__init__.py:
params = {'options': options,
              ...
              'gyp_binary': sys.argv[0],

But when called via 'configure' sys.argv[0] is 'configure' instead of
gyp_node.py leading to the above error.

This commit suggests setting the program name explicitly in
gyp_node.py. Alternatively perhaps this could be done in configure.py
instead but I was not sure what would be best.

PR-URL: #34255
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
Currently, after having configured and built node and then updating a
dependent target the following error is produced when trying to rebuild
the project:

$ ./configure && make -j8
$ touch node.gypi
$ make -j8
configure: error: no such option: -f
make[1]: *** [Makefile:685: Makefile] Error 2

The reason for this is that the target 'cmd_regen_makefile' is using the
command 'configure' instead of 'gyp_node.py' in out/Makefile:
cmd_regen_makefile = cd $(srcdir); /work/nodejs/node/configure -fmake

As far as I can tell gyp is using sys.argv[0] as the 'gyp_binary' in
__init__.py:
params = {'options': options,
              ...
              'gyp_binary': sys.argv[0],

But when called via 'configure' sys.argv[0] is 'configure' instead of
gyp_node.py leading to the above error.

This commit suggests setting the program name explicitly in
gyp_node.py. Alternatively perhaps this could be done in configure.py
instead but I was not sure what would be best.

PR-URL: #34255
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
@codebytere codebytere mentioned this pull request Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. build Issues and PRs related to build files or the CI. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants