Cannot compile - Windows 10

Hello, I am getting a weird compilation error that I did not get before after running ninja asperite. I am using the latest main branch and got the latest pre-built binaries for Skia.

[2/1350] Building RC object third_party\curl\lib\CMakeFiles\libcurl.dir\libcurl.rc.res
FAILED: third_party/curl/lib/CMakeFiles/libcurl.dir/libcurl.rc.res
C:/Users/Path\to
k/.choosenim/toolchains/mingw64/bin/ccache.exe C:/PROGRA~1/CMake/bin/cmcldeps.exe RC C:\Path\to\aseprite\third_party\curl\lib\libcurl.rc third_party\curl\lib\CMakeFiles\libcurl.dir\libcurl.rc.res.d third_party\curl\lib\CMakeFiles\libcurl.dir\libcurl.rc.res "Note: including file: " "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe" C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x86\rc.exe -DBUILDING_LIBCURL -DCMARK_STATIC_DEFINE -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -DNDEBUG -DPNG_NO_MMX_CODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_USRDLL -D_WIN32_WINNT=0x0600 -I C:\Path\to\aseprite\third_party\zlib -I C:\Path\to\aseprite\build\third_party\zlib -I C:\Path\to\aseprite\third_party\libpng -I C:\Path\to\aseprite\build\third_party\libpng -I C:\Path\to\aseprite\third_party\libwebp\src -I C:\Path\to\aseprite\third_party\tinyxml -I C:\Path\to\aseprite\third_party\pixman\pixman -I C:\Path\to\aseprite\build -I C:\Path\to\aseprite\third_party\giflib -I C:\Path\to\aseprite\third_party\jpeg -I C:\Path\to\aseprite\third_party\curl\include -I C:\Path\to\aseprite\third_party\simpleini -I C:\Path\to\aseprite\third_party\. -I C:\Path\to\aseprite\build\third_party\curl\lib\..\include -I C:\Path\to\aseprite\third_party\curl\lib\.. -I C:\Path\to\aseprite\third_party\curl\lib\..\include -I C:\Path\to\aseprite\build\third_party\curl\lib\.. -I C:\Path\to\aseprite\third_party\curl\lib -I C:\Path\to\aseprite\build\third_party\curl\lib -DWIN32 -DCURL_EMBED_MANIFEST /fo third_party\curl\lib\CMakeFiles\libcurl.dir\libcurl.rc.res C:\Path\to\aseprite\third_party\curl\lib\libcurl.rc
cl : Command line warning D9002 : ignoring unknown option '/fo'
c1: fatal error C1083: Cannot open source file: 'third_party\curl\lib\CMakeFiles\libcurl.dir\libcurl.rc.res.dep.obj ': No such file or directory
libcurl.rc
[11/1350] Building C object third_party\libpng\CMakeFiles\png_static.dir\pngrtran.c.obj
ninja: build stopped: subcommand failed.

This was after also from making a fresh build folder and running the following cmake command successfully:

>cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLAF_BACKEND=skia -DSKIA_DIR=C:\deps\skia -DSKIA_LIBRARY_DIR=C:\deps\skia\out\Release-x64 -DSKIA_LIBRARY=C:\deps\skia\out\Release-x64\skia.lib -G Ninja ..

Any help would be greatly appreciated as I was able to compile just fine in the past before.

I managed to solve this issue.

TLDR: add -DENABLE_CCACHE=NO to your cmake call.

The problem is that ccache works incorrectly with .rc files and calls cl instead of rc for them.

Thank you so much for the suggestion … I do not get that error anymore, unfortunately though I am getting a linking error:

It fails at the very end of the compilation process :confused:

I got it to compile. I used your idea @gwisp and also on a command line used this:

call “C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat” -arch=x64

This seemed to work then. Thank you so much!