C'ant compile aseprite with Cmake and ninja and skia

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe
Build flags:
Id flags:

The output was:
2
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29914 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

CMakeCCompilerId.c
Microsoft (R) Incremental Linker Version 14.28.29914.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:CMakeCCompilerId.exe
CMakeCCompilerId.obj
LINK : fatal error LNK1104: cannot open file ‘kernel32.lib’

Compiling the CXX compiler identification source file “CMakeCXXCompilerId.cpp” failed.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe
Build flags:
Id flags:

The output was:
2
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29914 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

CMakeCXXCompilerId.cpp
Microsoft (R) Incremental Linker Version 14.28.29914.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:CMakeCXXCompilerId.exe
CMakeCXXCompilerId.obj
LINK : fatal error LNK1104: cannot open file ‘kernel32.lib’

Detecting C compiler ABI info failed to compile with the following output:
Change Dir: C:/aseprite/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/PROGRA~1/CMake/bin/ninja.exe cmTC_9b7b4 && [1/2] Building C object CMakeFiles\cmTC_9b7b4.dir\CMakeCCompilerABI.c.obj

[2/2] Linking C executable cmTC_9b7b4.exe

FAILED: cmTC_9b7b4.exe

cmd.exe /C “cd . && “C:\Program Files\CMake\bin\cmake.exe” -E vs_link_exe --intdir=CMakeFiles\cmTC_9b7b4.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests – C:\PROGRA~2\MICROS~2\2019\Community\VC\Tools\MSVC\14.28.29910\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_9b7b4.dir\CMakeCCompilerABI.c.obj /out:cmTC_9b7b4.exe /implib:cmTC_9b7b4.lib /pdb:cmTC_9b7b4.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd .”

RC Pass 1: command “rc /fo CMakeFiles\cmTC_9b7b4.dir/manifest.res CMakeFiles\cmTC_9b7b4.dir/manifest.rc” failed (exit code 0) with the following output:
The system cannot find the file specified

ninja: build stopped: subcommand failed.

Determining if the C compiler works failed with the following output:
Change Dir: C:/aseprite/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/PROGRA~1/CMake/bin/ninja.exe cmTC_300d6 && [1/2] Building C object CMakeFiles\cmTC_300d6.dir\testCCompiler.c.obj

[2/2] Linking C executable cmTC_300d6.exe

FAILED: cmTC_300d6.exe

cmd.exe /C “cd . && “C:\Program Files\CMake\bin\cmake.exe” -E vs_link_exe --intdir=CMakeFiles\cmTC_300d6.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests – C:\PROGRA~2\MICROS~2\2019\Community\VC\Tools\MSVC\14.28.29910\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_300d6.dir\testCCompiler.c.obj /out:cmTC_300d6.exe /implib:cmTC_300d6.lib /pdb:cmTC_300d6.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd .”

RC Pass 1: command “rc /fo CMakeFiles\cmTC_300d6.dir/manifest.res CMakeFiles\cmTC_300d6.dir/manifest.rc” failed (exit code 0) with the following output:
The system cannot find the file specified

ninja: build stopped: subcommand failed.

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe
Build flags: /DWIN32;/D_WINDOWS;/W3
Id flags:

The output was:
2
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29914 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

CMakeCCompilerId.c
Microsoft (R) Incremental Linker Version 14.28.29914.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:CMakeCCompilerId.exe
CMakeCCompilerId.obj
LINK : fatal error LNK1104: cannot open file ‘kernel32.lib’

Compiling the CXX compiler identification source file “CMakeCXXCompilerId.cpp” failed.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe
Build flags:
Id flags:

The output was:
2
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29914 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

CMakeCXXCompilerId.cpp
Microsoft (R) Incremental Linker Version 14.28.29914.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:CMakeCXXCompilerId.exe
CMakeCXXCompilerId.obj
LINK : fatal error LNK1104: cannot open file ‘kernel32.lib’

Detecting C compiler ABI info failed to compile with the following output:
Change Dir: C:/aseprite/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/PROGRA~1/CMake/bin/ninja.exe cmTC_76de3 && [1/2] Building C object CMakeFiles\cmTC_76de3.dir\CMakeCCompilerABI.c.obj

[2/2] Linking C executable cmTC_76de3.exe

FAILED: cmTC_76de3.exe

cmd.exe /C “cd . && “C:\Program Files\CMake\bin\cmake.exe” -E vs_link_exe --intdir=CMakeFiles\cmTC_76de3.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests – C:\PROGRA~2\MICROS~2\2019\Community\VC\Tools\MSVC\14.28.29910\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_76de3.dir\CMakeCCompilerABI.c.obj /out:cmTC_76de3.exe /implib:cmTC_76de3.lib /pdb:cmTC_76de3.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd .”

RC Pass 1: command “rc /fo CMakeFiles\cmTC_76de3.dir/manifest.res CMakeFiles\cmTC_76de3.dir/manifest.rc” failed (exit code 0) with the following output:
The system cannot find the file specified

ninja: build stopped: subcommand failed.

Determining if the C compiler works failed with the following output:
Change Dir: C:/aseprite/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/PROGRA~1/CMake/bin/ninja.exe cmTC_754d5 && [1/2] Building C object CMakeFiles\cmTC_754d5.dir\testCCompiler.c.obj

[2/2] Linking C executable cmTC_754d5.exe

FAILED: cmTC_754d5.exe

cmd.exe /C “cd . && “C:\Program Files\CMake\bin\cmake.exe” -E vs_link_exe --intdir=CMakeFiles\cmTC_754d5.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests – C:\PROGRA~2\MICROS~2\2019\Community\VC\Tools\MSVC\14.28.29910\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_754d5.dir\testCCompiler.c.obj /out:cmTC_754d5.exe /implib:cmTC_754d5.lib /pdb:cmTC_754d5.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd .”

RC Pass 1: command “rc /fo CMakeFiles\cmTC_754d5.dir/manifest.res CMakeFiles\cmTC_754d5.dir/manifest.rc” failed (exit code 0) with the following output:
The system cannot find the file specified

ninja: build stopped: subcommand failed.

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe
Build flags: /DWIN32;/D_WINDOWS;/W3
Id flags:

The output was:
2
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29914 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

CMakeCCompilerId.c
Microsoft (R) Incremental Linker Version 14.28.29914.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:CMakeCCompilerId.exe
CMakeCCompilerId.obj
LINK : fatal error LNK1104: cannot open file ‘kernel32.lib’

Compiling the CXX compiler identification source file “CMakeCXXCompilerId.cpp” failed.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe
Build flags:
Id flags:

The output was:
2
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29914 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

CMakeCXXCompilerId.cpp
Microsoft (R) Incremental Linker Version 14.28.29914.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:CMakeCXXCompilerId.exe
CMakeCXXCompilerId.obj
LINK : fatal error LNK1104: cannot open file ‘kernel32.lib’

Detecting C compiler ABI info failed to compile with the following output:
Change Dir: C:/aseprite/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/PROGRA~1/CMake/bin/ninja.exe cmTC_4aa99 && [1/2] Building C object CMakeFiles\cmTC_4aa99.dir\CMakeCCompilerABI.c.obj

[2/2] Linking C executable cmTC_4aa99.exe

FAILED: cmTC_4aa99.exe

cmd.exe /C “cd . && “C:\Program Files\CMake\bin\cmake.exe” -E vs_link_exe --intdir=CMakeFiles\cmTC_4aa99.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests – C:\PROGRA~2\MICROS~2\2019\Community\VC\Tools\MSVC\14.28.29910\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_4aa99.dir\CMakeCCompilerABI.c.obj /out:cmTC_4aa99.exe /implib:cmTC_4aa99.lib /pdb:cmTC_4aa99.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd .”

RC Pass 1: command “rc /fo CMakeFiles\cmTC_4aa99.dir/manifest.res CMakeFiles\cmTC_4aa99.dir/manifest.rc” failed (exit code 0) with the following output:
The system cannot find the file specified

ninja: build stopped: subcommand failed.

Determining if the C compiler works failed with the following output:
Change Dir: C:/aseprite/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/PROGRA~1/CMake/bin/ninja.exe cmTC_11c81 && [1/2] Building C object CMakeFiles\cmTC_11c81.dir\testCCompiler.c.obj

[2/2] Linking C executable cmTC_11c81.exe

FAILED: cmTC_11c81.exe

cmd.exe /C “cd . && “C:\Program Files\CMake\bin\cmake.exe” -E vs_link_exe --intdir=CMakeFiles\cmTC_11c81.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests – C:\PROGRA~2\MICROS~2\2019\Community\VC\Tools\MSVC\14.28.29910\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_11c81.dir\testCCompiler.c.obj /out:cmTC_11c81.exe /implib:cmTC_11c81.lib /pdb:cmTC_11c81.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd .”

RC Pass 1: command “rc /fo CMakeFiles\cmTC_11c81.dir/manifest.res CMakeFiles\cmTC_11c81.dir/manifest.rc” failed (exit code 0) with the following output:
The system cannot find the file specified

ninja: build stopped: subcommand failed.

I would guess that you’re trying to use the Ninja generator in a plain cmd.exe window or something. You need to load the Visual Studio toolchain into the environment first. This can be done either through the Developer Prompts in the start menu or by loading vcvarsall.bat in an existing shell environment.

I called that ```
call “C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat” -arch=x64


then 

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 ..

Does a simple CMake project work with the Ninja generator at least? If a simple one doesn’t work, something else is still out of whack before trying it on a full project.

what would be the best way to do that?

fixed I dowgraded my Ninja version and it worked fine probably a ninja bug(go down one ver from latest)

Out of curiosity, what versions of ninja weren’t working and ended up working?

latest did not work the one before worked

Do you have version numbers? Was it 1.10.2 and 1.10.1 or 1.9.x?

if I remember I changed to 1.10.1 and it worked

Thanks.

@brad.king It looks like there might be some problem with ninja 1.10.2 on Windows here, though more details will likely be needed.

yea sorry I don’t realy have more detail