Problem with final compilation using ninja

Hi, I’ve been slowly working my way through problem after problem compiling Aseprite. I thought I had finally gotten it right when the last command refused to work. This is what the command prompt window says:

D:\Program Files\Aseprite-v1.2.17-Source\build>ninja aseprite
[9/641] Building CXX object laf\os\CMakeFiles\laf-os.dir\skia\skia_color_space.cpp.obj
FAILED: laf/os/CMakeFiles/laf-os.dir/skia/skia_color_space.cpp.obj
C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\cl.exe  /nologo /TP -DCMARK_STATIC_DEFINE -DGR_GL_FUNCTION_TYPE=__stdcall -DHAVE_CONFIG_H -DLAF_FREETYPE -DLAF_SKIA -DLAF_WITH_REGION -DNDEBUG -DPNG_NO_MMX_CODE -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=1 -DSK_BUILD_FOR_WIN32 -DSK_FORCE_DISTANCE_FIELD_TEXT=0 -DSK_GAMMA_APPLY_TO_A8 -DSK_GAMMA_SRGB -DSK_INTERNAL -DSK_SCALAR_TO_FLOAT_EXCLUDED -DSK_SUPPORT_GPU=0 -DSK_SUPPORT_OPENCL=0 -DUNICODE -DWINVER=0x0A00 -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -D_WIN32_WINNT=0x0A00 -I..\third_party\zlib -Ithird_party\zlib -I..\third_party\libpng -Ithird_party\libpng -I..\third_party\libwebp\src -I..\third_party\tinyxml -I..\third_party\pixman\pixman -I. -I..\third_party\freetype2\include -I..\third_party\harfbuzz\src -I..\third_party\giflib\lib -I..\third_party\jpeg -Ithird_party\cmark -I..\third_party\curl\include -I..\third_party\simpleini -I..\src -I..\laf -Ilaf -I..\laf\third_party\stringencoders\src -IC:\deps\skia -IC:\deps\skia\include\config -IC:\deps\skia\include\core -IC:\deps\skia\include\utils -IC:\deps\skia\include\codec -IC:\deps\skia\include\gpu -IC:\deps\skia\src\gpu -IC:\deps\skia\third_party\skcms -IC:\deps\skia\third_party\externals\angle2\include -Ithird_party\freetype2\include /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MT /Zi /O2 /Ob1 /D NDEBUG /showIncludes /Folaf\os\CMakeFiles\laf-os.dir\skia\skia_color_space.cpp.obj /Fdlaf\os\CMakeFiles\laf-os.dir\laf-os.pdb /FS -c ..\laf\os\skia\skia_color_space.cpp
..\laf\os\skia\skia_color_space.cpp(17): fatal error C1083: Cannot open include file: 'skcms.h': No such file or directory
[22/641] Building CXX object src\filters\CMakeFiles\filters-lib.dir\convolution_matrix_filter.cpp.obj
ninja: build stopped: subcommand failed.

I have been searching everywhere for solutions but nothing I do seems to work, I’m new to compiling so I am really lost, any help would be appreciated!

I’m sorry but there’s very little anyone can do with the error logs when compiling. There are many steps where anything could have gone wrong.

The things I can see from this are:

  1. Your folder is named “Aseprite-v1.2.17-Source” which leads me to believe you didn’t use the git clone command to download the source, and instead used the download button on github, which doesn’t work.

  2. Your source folder is in Program Files which makes me wonder if the dependencies are in folders named differently from in the install instructions, in which case it would also fail without you redirecting the cmake to the proper folders.

All I can say is that I recommend simply starting over from the beginning and doing everything by the letter. Don’t assume anything even if it might seem obvious, because those small things is usually where peoples compilations break. Like forgetting to call vsdevcmd.bat for example, or not using git clone to grab the repository.

Good luck!

I have been getting similar errors, and I would like to just confirm some things:
This command is a reliable way of getting functional source code: git clone --recursive https://github.com/aseprite/aseprite.git
I put the ninja.exe file into the cmake bin folder because I didn’t know where else to put it.

What could any other possible fail points in the compilation?

I ran it again with the git command to download the source files, but when running the ninja aseprite I get this error:
[66/1514] Generating pnglibconf.c
FAILED: third_party/libpng/pnglibconf.c
cmd.exe /C “cd /D C:\aseprite\build\third_party\libpng && “C:\Program Files\CMake\bin\cmake.exe” -DOUTPUT=pnglibconf.c -P C:/aseprite/build/third_party/libpng/scripts/gensrc.cmake”
options.awk: bad line (10): com
CMake Error at scripts/gensrc.cmake:68 (message):
Failed to generate pnglibconf.tf5

[67/1514] Generating scripts/pnglibconf.c
FAILED: third_party/libpng/scripts/pnglibconf.c
cmd.exe /C “cd /D C:\aseprite\build\third_party\libpng && “C:\Program Files\CMake\bin\cmake.exe” -DOUTPUT=scripts/pnglibconf.c -P C:/aseprite/build/third_party/libpng/scripts/gensrc.cmake”
options.awk: bad line (11): com
CMake Error at scripts/gensrc.cmake:41 (message):
Failed to generate pnglibconf.tf7

[68/1514] Building C object third_party/giflib/CMakeFiles/giflib.dir/lib/gif_font.c.obj
…/third_party/giflib/lib/gif_font.c: In function ‘GifDrawBoxedText8x8’:
…/third_party/giflib/lib/gif_font.c:245:7: warning: implicit declaration of function ‘strtok_r’ [-Wimplicit-function-declaration]
cp = strtok_r(dup, “\r\n”, &lasts);
^~~~~~~~
…/third_party/giflib/lib/gif_font.c:245:5: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
cp = strtok_r(dup, “\r\n”, &lasts);
^
…/third_party/giflib/lib/gif_font.c:254:9: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
cp = strtok_r(NULL, “\r\n”, &lasts);
^
[71/1514] Building C object third_party/giflib/CMakeFiles/giflib.dir/lib/dgif_lib.c.obj
ninja: build stopped: subcommand failed.