# C'ant compile aseprite with Cmake and ninja and skia

**URL:** https://discourse.cmake.org/t/cant-compile-aseprite-with-cmake-and-ninja-and-skia/3264
**Category:** Usage
**Tags:** os:windows, gen:ninja
**Created:** [May 4, 2021, 6:39pm UTC](https://discourse.cmake.org/t/cant-compile-aseprite-with-cmake-and-ninja-and-skia/3264 "2021-05-04T18:39:06Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Rogue\_taleteller](https://discourse.cmake.org/user_avatar/discourse.cmake.org/rogue_taleteller/32/1428_2.png) [@Rogue\_taleteller](https://discourse.cmake.org/u/Rogue_taleteller)
#### Post date: [May 4, 2021, 6:39pm UTC](https://discourse.cmake.org/t/cant-compile-aseprite-with-cmake-and-ninja-and-skia/3264/1 "2021-05-04T18:39:07Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 4, 2021, 8:52pm UTC](https://discourse.cmake.org/t/cant-compile-aseprite-with-cmake-and-ninja-and-skia/3264/2 "2021-05-04T20:52:28Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Rogue\_taleteller](https://discourse.cmake.org/user_avatar/discourse.cmake.org/rogue_taleteller/32/1428_2.png) [@Rogue\_taleteller](https://discourse.cmake.org/u/Rogue_taleteller)
#### Post date: [May 4, 2021, 9:24pm UTC](https://discourse.cmake.org/t/cant-compile-aseprite-with-cmake-and-ninja-and-skia/3264/3 "2021-05-04T21:24:23Z")

</div>

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

```auto

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

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 4, 2021, 9:34pm UTC](https://discourse.cmake.org/t/cant-compile-aseprite-with-cmake-and-ninja-and-skia/3264/4 "2021-05-04T21:34:54Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Rogue\_taleteller](https://discourse.cmake.org/user_avatar/discourse.cmake.org/rogue_taleteller/32/1428_2.png) [@Rogue\_taleteller](https://discourse.cmake.org/u/Rogue_taleteller)
#### Post date: [May 4, 2021, 10:08pm UTC](https://discourse.cmake.org/t/cant-compile-aseprite-with-cmake-and-ninja-and-skia/3264/5 "2021-05-04T22:08:30Z")

</div>

what would be the best way to do that?

---

<div class="post-metadata">

### Author: ![Rogue\_taleteller](https://discourse.cmake.org/user_avatar/discourse.cmake.org/rogue_taleteller/32/1428_2.png) [@Rogue\_taleteller](https://discourse.cmake.org/u/Rogue_taleteller)
#### Post date: [May 4, 2021, 10:26pm UTC](https://discourse.cmake.org/t/cant-compile-aseprite-with-cmake-and-ninja-and-skia/3264/6 "2021-05-04T22:26:27Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 5, 2021, 10:16am UTC](https://discourse.cmake.org/t/cant-compile-aseprite-with-cmake-and-ninja-and-skia/3264/7 "2021-05-05T10:16:40Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Rogue\_taleteller](https://discourse.cmake.org/user_avatar/discourse.cmake.org/rogue_taleteller/32/1428_2.png) [@Rogue\_taleteller](https://discourse.cmake.org/u/Rogue_taleteller)
#### Post date: [May 5, 2021, 12:35pm UTC](https://discourse.cmake.org/t/cant-compile-aseprite-with-cmake-and-ninja-and-skia/3264/8 "2021-05-05T12:35:02Z")

</div>

latest did not work the one before worked

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 5, 2021, 1:51pm UTC](https://discourse.cmake.org/t/cant-compile-aseprite-with-cmake-and-ninja-and-skia/3264/9 "2021-05-05T13:51:37Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Rogue\_taleteller](https://discourse.cmake.org/user_avatar/discourse.cmake.org/rogue_taleteller/32/1428_2.png) [@Rogue\_taleteller](https://discourse.cmake.org/u/Rogue_taleteller)
#### Post date: [May 5, 2021, 2:13pm UTC](https://discourse.cmake.org/t/cant-compile-aseprite-with-cmake-and-ninja-and-skia/3264/10 "2021-05-05T14:13:20Z")

</div>

if I remember I changed to 1.10.1 and it worked

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 5, 2021, 4:28pm UTC](https://discourse.cmake.org/t/cant-compile-aseprite-with-cmake-and-ninja-and-skia/3264/11 "2021-05-05T16:28:53Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Rogue\_taleteller](https://discourse.cmake.org/user_avatar/discourse.cmake.org/rogue_taleteller/32/1428_2.png) [@Rogue\_taleteller](https://discourse.cmake.org/u/Rogue_taleteller)
#### Post date: [May 5, 2021, 7:56pm UTC](https://discourse.cmake.org/t/cant-compile-aseprite-with-cmake-and-ninja-and-skia/3264/12 "2021-05-05T19:56:54Z")

</div>

yea sorry I don’t realy have more detail
