Building on WSL: How can I track down why "ninja: build stopped: subcommand failed." happened?

Ask your support questions in here

Moderator: Moderator Team

Post Reply
justincase
Posts: 431
Joined: Sat Nov 15, 2008 4:13 pm

Building on WSL: How can I track down why "ninja: build stopped: subcommand failed." happened?

Post by justincase » Wed Jan 16, 2019 10:42 am

I experimentally installed the Linux version of RosBE in Windows 10's "Windows Subsystem for Linux", and when I try to build ReactOS with it, I get the following error:

Code: Select all

ninja: build stopped: subcommand failed.
How can I track down what exactly is failing, and why?

Note: If I repeatedly run the build command, eventually it seems to complete and creates an ISO, and I am able to install ReactOS from that ISO, but it seems like it's buggier than it would have been if I'd built the same version with GCC or MSVC.

I'd like to try to figure out what exactly is failing so I can report the issue(s) to the appropriate people and/or fix it.
I reserve the right to ignore any portion of any post if I deem it not constructive or likely to cause the discussion to degenerate.

hbelusca
Developer
Posts: 1119
Joined: Sat Dec 26, 2009 10:36 pm
Location: Zagreb, Croatia

Re: Building on WSL: How can I track down why "ninja: build stopped: subcommand failed." happened?

Post by hbelusca » Wed Jan 16, 2019 1:10 pm

Try: ninja -v
This enables verbose mode and allows you to see which command failed.

gonzoMD
Posts: 1008
Joined: Fri Oct 20, 2006 7:49 am
Location: Germany
Contact:

Re: Building on WSL: How can I track down why "ninja: build stopped: subcommand failed." happened?

Post by gonzoMD » Wed Jan 16, 2019 6:12 pm

I usually build it under Ubuntu and I have to disable precompiled headers. Iirc the complete command was ./configure.sh -DPCH=0 (someone correct me if I am wrong)
You should do a ninja clean before reconfiguring.

justincase
Posts: 431
Joined: Sat Nov 15, 2008 4:13 pm

Re: Building on WSL: How can I track down why "ninja: build stopped: subcommand failed." happened?

Post by justincase » Thu Jan 17, 2019 8:07 pm

Thank you both.
I tried running it after configuring with -DPCH, -DPCH=0 and -DPCH:BOOL=0, and none of them appeared to make any difference.
I also tried running ninja -v bootcd, and there was so much output that (knowing that it runs in parallel) I wasn't certain that I could tell which part of the output was from the failing process, and which part was other stuff still running for a moment before ninja stopped everything, so I deleted my build output, configured without trying to disable PCH, and tried ninja -j 1 -v bootcd (thinking I would be able to be more certain about what the log output meant), and ... it built without errors...

So..., now I'm guessing that it's some form of parallelization issue either with ninja that gets triggered when running on wsl, or with wsl which ninja triggers. Perhaps whatever variety of interprocess communication ninja uses isn't reliable on wsl? IDK.

Anyway, I don't think this is really a ReactOS issue, so I'm hesitant to open a JIRA report here, but perhaps you guys could weigh in on whether this should this be reported to the ninja-build project, or on Microsoft's WSL issue tracker... or both?
I reserve the right to ignore any portion of any post if I deem it not constructive or likely to cause the discussion to degenerate.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest