Cygwin build with waf is successful but never completes

As the title suggests, the waf configure step is successful and completes, and then when I execute the build command this happens

$ ./waf copter
Waf: Entering directory `/home/camer/ardupilot/build/sitl'
Embedding file locations.txt:Tools/autotest/locations.txt
Embedding file models/Callisto.json:Tools/autotest/models/Callisto.json
Embedding file models/plane-3d.parm:Tools/autotest/models/plane-3d.parm
Embedding file models/plane.parm:Tools/autotest/models/plane.parm
Embedding file models/xplane_heli.json:Tools/autotest/models/xplane_heli.json
Embedding file models/xplane_plane.json:Tools/autotest/models/xplane_plane.json
[3/6] Compiling libraries/AP_Scripting/generator/src/main.c
[6/6] Processing /home/camer/ardupilot/build/sitl/libraries/AP_Scripting/lua_generated_bindings.cpp,/home/camer/ardupilot/build/sitl/libraries/AP_Scripting/lua_generated_bindings.h: libraries/AP_Scripting/generator/description/bindings.desc build/sitl/gen-bindings -> build/sitl/libraries/AP_Scripting/lua_generated_bindings.cpp build/sitl/libraries/AP_Scripting/lua_generated_bindings.h
Waf: Leaving directory `/home/camer/ardupilot/build/sitl'

BUILD SUMMARY
Build directory: /home/camer/ardupilot/build/sitl
Target          Text (B)  Data (B)  BSS (B)  Total Flash Used (B)  Free Flash (B)
---------------------------------------------------------------------------------
bin/arducopter   3982025    219352      416               4201377  Not Applicable

Build commands will be stored in build/sitl/compile_commands.json
'copter' finished successfully (24.709s)

and it ends there, it never goes to the next terminal line. I have to manually “Ctrl + C” to get it to move to the next terminal line. And f I run “sim_vehicle.py” afterwards I get the same thing, so I think this needs to be resolved before I can run the SITL.

Are you in wsl ? if yes and if you use ubuntu you can check that the build was succesfull in :

C:\Users\username\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc\LocalState\rootfs\home\camer\ardupilot\build\sitl\ArduCopter

If the build was succesfull, then you should be able to run the next command.

About sim_vehicle.py I think it builds the firmware automatically so you’ll see immediatly if mavproxy starts and connects or if the program interrupts here.

So I have both Cygwin and WSL2 (ubuntu 18.04). On WSL2 I can successfully run the build just fine and here is the output


The only issue with WSL2 is when I try to run the SITL, but that’s in my other post that you responded to.

On cygwin however it looks like this when I run the build. The confgure step complets just fine, but then the build looks like this

You can see how in the first picture we get the next terminal line with $, but in the second picture it just stops and I get black space. Super weird.

okey now if you do :

$ cd ardupilot/ArduCopter
you launch vcxsrv the way I told you
$ export DISPLAY=0:0
$ …/Tools/autotest/sim_vehicle.py -w --no-mavproxy
Then open Mission Planner and try autoconnect or tcp 127.0.0.1:5760

I don’t think that’s exactly related to this particular question, this question is about an issue with cygwin successfully building, but then never exiting the process to the next terminal line. It’s just a really weird issue.

In WSL2 though, I did try your suggestion to cd to ArduCopter and launch vcxsrv according to your instructions, and still nothing. I did try to run “xeyes” and that didn’t work either. I haven’t tried it with no mavproxy and opening mission planning separately, so that could work.

Quit goofing with Cygwin (it probably ought to just be deprecated!) and use WSL. You’re almost there. Just need to properly configure Vcxsrv and be sure to export the display environment variable within WSL.

Well I had cygwin working at one point and then I decided to uninstall it (should’ve left well enough alone lol) and then just focus on WSL. I don’t know what else I can do for WSL, I’ve tried every suggestion I can find, but I’ll keep giving it another go.

Yeah man I’m so close I can taste it! But horshoes and hand grenades. It’s killing me, all of these little issues which fall outside my perview.

Here’s the output of my cygwin terminal when I “Ctrl + C” to manually exit though

This says there’s an issue with “atexit._run_exitfuncs” which makes sense because it’s not exiting the process