Open LigH-de opened 4 years ago
Please advise how to make progress here. I tried mentioning this in #msys2 IRC but got no reply at that time.
I'm not sure atm as I haven't had time to test and debug anything, one thing you might want to do if you have time and will power to look at qt stuff is find any mention of qmlcache under the qt folders or under the local folder and look for a file that ends or begins with pf, it's been a while since I looked for it to fix the same error for another qml* program
I guess you might mean: local32/mkspecs/features/qmlcache.prf
You can find this issue reported for MSYS2 in several locations, one is "monero".
We weren’t able to properly fix this yet. The workaround does not work in all cases.
based on my guesses, the main reason why this occurs is that upstream qt does not consider msys2+mingw-w64 a supported configuration, so they hardcode assumptions for the windows platform
Rather they even mislabeled mingw-w64 as MinGW, which can be considered an offense to both projects.
https://doc.qt.io/qt-5/windows.html#supported-configurations
We mostly had this problem with Windows CI. As a workaround we disabled qtquickcompiler: https://github.com/monero-project/monero-gui/pull/2921/
Now I wonder if we can do that with qt5 and vlc
There may be some other workarounds. I'll share what I tried so far and works in other project where I use Qt and I have the same error message
One way: Standalone build of the loader with command below and then re-running the build process
cd build && make -f Makefile.Release compiler_qmlcache_loader_make_all && cd ..
Another way: Add a small delay before calling qmlcachegen
Find in the build\Makefile.Release
release/qmlcache_loader.cpp: ../qml.qrc
Replace:
/C/msys64/mingw64/bin/qmlcachegen.exe
With:
sleep .5 && /C/msys64/mingw64/bin/qmlcachegen.exe
Are the makefiles that bad?
Do they not have the target dependencies properly set?
Seems to be an issue with Qt running on MSYS.
Also as an update, the sleep
hack isn't working sometimes either. What I've seen working is either running the failing command manually or doing it through the compiler_qmlcache_loader_make_all task.
Maybe some background task in Windows (e.g. Defender or an Explorer extension) blocks access to files just long enough to annoy an MSYS2 task.
I think I might have a fix for this, by making qt5 build those tools as static as mentioned https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW
I think it might be that those tools were loading the wrong dlls
similar error here: https://github.com/msys2/MINGW-packages/issues/7528#issuecomment-751473282 so likely a msys2 runtime bug
export MSYS2_ARG_CONV_EXCL='--resource-file-mapping='
might work around it
Sometimes when compiling a Qt5 project for the first time, one of the projects fails creating cache files. One example:
logs.zip
You can find this issue reported for MSYS2 in several locations, one is "monero". They made an interesting discovery and created a workaround by including a shell script as source. One suspects the reason in the MinGW version of make.