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

Cannot cross-compile with ninja #46690

Closed
rossburton opened this issue Feb 16, 2023 · 4 comments
Closed

Cannot cross-compile with ninja #46690

rossburton opened this issue Feb 16, 2023 · 4 comments
Labels
build Issues and PRs related to build files or the CI. duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@rossburton
Copy link

Version

19.6.0 (actually git 1b87cb6)

Platform

Linux oss-tx204 5.15.0-41-generic #44-Ubuntu SMP Thu Jun 23 11:20:13 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

Configure node to use the cross-compile rules with ninja, then try building it:

$ ./configure --cross-compiling --ninja && make
Node.js configure: Found Python 3.10.6...
INFO: configure completed successfully
ninja -C out/Release
ninja: Entering directory `out/Release'
ninja: error: obj.host/tools/v8_gypfiles/run_torque.ninja:1451: multiple rules generate gen/torque-generated/bit-fields.h [-w dupbuild=err]

This doesn't happen if using ninja but not cross-compiling, or if cross-compiling without ninja.

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

No response

What do you see instead?

ninja: error: obj.host/tools/v8_gypfiles/run_torque.ninja:1451: multiple rules generate gen/torque-generated/bit-fields.h [-w dupbuild=err]

Additional information

No response

@moto-timo
Copy link

The exact same behavior also occurs on v16.x branch.

@bnoordhuis
Copy link
Member

I don't think cross-compiling with ninja has ever worked. For anyone wanting to work on this, it probably requires applying fixes to https://github.com/nodejs/gyp-next/blob/main/pylib/gyp/generator/ninja.py

@bnoordhuis bnoordhuis added the build Issues and PRs related to build files or the CI. label Feb 17, 2023
@thunder-coding
Copy link
Contributor

Seems like a duplicate of #37441.

Also if you scroll down you can see that a fix (or workaround) is available in a fork minrk@5e533cb, which is in use by buildroot

@bnoordhuis
Copy link
Member

Oh, indeed it is. I'll close it as such then.

@bnoordhuis bnoordhuis closed this as not planned Won't fix, can't repro, duplicate, stale Feb 18, 2023
@bnoordhuis bnoordhuis added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Feb 18, 2023
moto-timo pushed a commit to moto-timo/gyp-next that referenced this issue Feb 18, 2023
avoids duplicate ninja rules for v8 used in host and target

From: minrk/node@5e533cb
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Reported in nodejs/node#46690
and nodejs/node#37441

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
moto-timo pushed a commit to moto-timo/gyp-next that referenced this issue Feb 20, 2023
avoids duplicate ninja rules for v8 used in host and target

From: minrk/node@5e533cb
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Reported in nodejs/node#46690
and nodejs/node#37441

Minor refactoring as recommended by Christian Clauss.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
moto-timo pushed a commit to moto-timo/gyp-next that referenced this issue Feb 20, 2023
avoids duplicate ninja rules for v8 used in host and target

From: minrk/node@5e533cb
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Reported in nodejs/node#46690
and nodejs/node#37441

Minor refactoring as recommended by Christian Clauss.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
moto-timo pushed a commit to moto-timo/gyp-next that referenced this issue Feb 20, 2023
avoids duplicate ninja rules for v8 used in host and target

From: minrk/node@5e533cb
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Reported in nodejs/node#46690
and nodejs/node#37441

Minor refactoring as recommended by Christian Clauss.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
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. duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

4 participants