Closed alexeymorozov closed 3 years ago
It looks like a well known issue, at least for boost and qt5 builds )
There are multiply discussion threads: https://github.com/microsoft/vcpkg/issues/8272 https://gitmemory.com/issue/microsoft/vcpkg/8272/533767341 https://sourceforge.net/p/slam6d/discussion/939032/thread/6170824484/?limit=25 and many more
As far as I understood three solutions were offered:
I can probably implement approach number 1. It may take 3-4 days. Not sure if ruby can be configured to use file pathes shortened by subst. Number 3 means self-hosted runner which we do not want as far as I understand.
Correction I can move vcpkg to C:\vcpkg for GHA runners. However it won't work for 'ordinary' workstation since C:\ is normally write protected. So this approach is not good either.
Yes.. :(
It may work with subst paths since Ruby only runs cmake commands and passes the paths there:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake '-GVisual Studio 16 2019' -DCMAKE_INSTALL_PREFIX=D:/a/emf2svg-ruby/emf2svg-ruby/ports/x86_64-w64-mingw32/libemf2svg/1.3.0 .
cmake --build D:/a/emf2svg-ruby/emf2svg-ruby/tmp/x86_64-w64-mingw32/ports/libemf2svg/1.3.0/libemf2svg --config Release --target emf2svg
And it worked if the build directory (UPD: with source) is moved to the C:\
root.
Also seems that it works if the build directory is moved to the temporary directory ($TMPDIR, %TEMP%). May be it would be suitable for us, will test.
The issue is currently resolved by placing a source/build folder in the OS default temporary directory.
Thank for help @maxirmx !
Github Actions compiles a gem in a pretty long path:
Which leads to an error in vcpkg:
https://github.com/metanorma/emf2svg-ruby/pull/2/checks?check_run_id=3454567981
@maxirmx May be there is some workaround which allows to avoid making a short path in every case?