runner icon indicating copy to clipboard operation
runner copied to clipboard

Inexplicable issues with Windows runner

Open mcallegari opened this issue 2 years ago • 6 comments

Hi, already posted this in community discussions with no feedback at all.

I maintain a Qt application and recently started to adopt GitHub actions. On Linux runners all good, however on Windows I've got a couple of issues I'm not able to figure out. The project builds fine on a MSYS2 environment (either a PC or Appveyor CI) On Actions I've got these:

cannot install files during make install with an inexplicable error https://github.com/mcallegari/qlcplus/actions/runs/4357415918/jobs/7616702516#step:12:100 cannot find a library (libusb-1.0) via pkg-config even though the library is there https://github.com/mcallegari/qlcplus/actions/runs/4215656744/jobs/7316954943#step:10:1555 The libusb-1.0 package provides the correct files: https://packages.msys2.org/package/mingw-w64-i686-libusb?repo=mingw32 GH actions YAML file here: https://github.com/mcallegari/qlcplus/blob/winbuild/.github/workflows/build.yml

Any help would be really appreciated. Thanks!

mcallegari avatar Apr 19 '23 17:04 mcallegari

Hi

It seems that you have an error in your Makefile. According to workflow output:

image

There's a C:/C:/...... Check your Makefile on Windows

AF250329 avatar May 02 '23 19:05 AF250329

Thanks for the reply, but as I mentioned before, mine is a Qt project, so Makefiles are generated by qmake. Unless the installed Qt version is buggy, Makefiles are generated correctly. Also, if you notice, the "double C:" is present a few lines before and it seems perfectly fine: https://github.com/mcallegari/qlcplus/actions/runs/4357415918/jobs/7616702516#step:12:94

Again, this project builds correctly on vanilla MSYS2 and with AppVeyor CI so I ended up thinking there might be something not right on Actions. I admit I never built with Chocolatey before. Is there a way to use an alternative Windows runner, like a plain MSYS2 installation?

How about my other report about libusb1? Thanks!

EDIT: for completeness, this is what I get on MSYS2:

make[1]: Entering directory '/c/projects/qlcplus/webaccess/res'
C:/msys64/mingw32/bin/qmake.exe -install qinstall C:/projects/qlcplus/webaccess/res/common.css C:/qlcplus/Web/common.css
C:/msys64/mingw32/bin/qmake.exe -install qinstall C:/projects/qlcplus/webaccess/res/keypad.html C:/qlcplus/Web/keypad.html
C:/msys64/mingw32/bin/qmake.exe -install qinstall C:/projects/qlcplus/webaccess/res/networkconfig.js C:/qlcplus/Web/networkconfig.js
C:/msys64/mingw32/bin/qmake.exe -install qinstall C:/projects/qlcplus/webaccess/res/simpledesk.css C:/qlcplus/Web/simpledesk.css
C:/msys64/mingw32/bin/qmake.exe -install qinstall C:/projects/qlcplus/webaccess/res/simpledesk.js C:/qlcplus/Web/simpledesk.js
C:/msys64/mingw32/bin/qmake.exe -install qinstall C:/projects/qlcplus/webaccess/res/virtualconsole.css C:/qlcplus/Web/virtualconsole.css
C:/msys64/mingw32/bin/qmake.exe -install qinstall C:/projects/qlcplus/webaccess/res/virtualconsole.js C:/qlcplus/Web/virtualconsole.js
C:/msys64/mingw32/bin/qmake.exe -install qinstall C:/projects/qlcplus/webaccess/res/configuration.js C:/qlcplus/Web/configuration.js
C:/msys64/mingw32/bin/qmake.exe -install qinstall C:/projects/qlcplus/webaccess/res/websocket.js C:/qlcplus/Web/websocket.js

mcallegari avatar May 02 '23 19:05 mcallegari

The error that I highlighted in my answer does not come from Github Action. I don't know how Makefile works or what could be wrong with it. I personally think that Makefiles belong to Linux and just insisting to run pure Linux oriented code on Windows with some hacky compilers is wrong - but anyway - I think you should check the error and try to debug it by adding some output to script. This will give you some hints what wrong when running the same code on your computer and Github Action. Good luck

AF250329 avatar May 03 '23 06:05 AF250329

So basically, you don't know how Makefile works and you think building a Qt application on Windows is hacky and wrong. Then why did you reply to my report in the first place? We're both wasting time here.

Is there anybody else more open minded and more competent that can please give an insight to this? Thanks

mcallegari avatar May 03 '23 07:05 mcallegari

Mmmm.. I know enough about Makefiles to know that only old versions of C++ was actually used it in build process according to Microsoft and even that one was not 1-to-1 as GNU Makefile implementation. Then MS leave it altogether for MSBuild scripts engine.

I personally think that using hacky MinGW when Microsoft already rolled out 'Linux subsystem for Windows' is hacky. MinGW trying to bend POSIX thread implementation to whatever Microsoft think is CreateRemoteThread should be. MS changing it undelaying implementation almost every release of C++ libraries and most (?) of inner working details is un-documented. So what MinGW implementation think on creating new thread on Windows ? (and it should also support Linux ot at least align to it behavior ) <- it is very hackishly way to compile application that Linux oriented in it nature and may be use quirks from Linux word. Again Microsoft already released Linux Subsystem for Window - so it makes MinGW and other similar system obsolete. So yes - using them today is just insisting to use old/outdated tools. Does MinGW still supported and actively developed ? I don't think so.. Nobody could beat MS in it own field of Windows....

I am still insist that error is not coming from Github Action - I am not sure what you still keep coming to it ? I see that Github Action do run you script and even resend output from script/app to the screen of workflow.

Please try to debug around this error let us all know what the error was

AF250329 avatar May 03 '23 07:05 AF250329

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 15 days.

github-actions[bot] avatar May 06 '24 00:05 github-actions[bot]

This issue was closed because it has been stalled for 15 days with no activity.

github-actions[bot] avatar Jun 10 '24 00:06 github-actions[bot]