Open artifex-enim opened 6 years ago
It looks like you are using the x86 compiler on a x64 machine. You should start the command line with the proper compiler (for a host 64 bit). I'm not in a Windows machine right now. Some info:
https://docs.microsoft.com/en-us/cpp/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line#developer_command_prompt_shortcuts
@dacap Thanks for responding. I tried compiling using the x64 native developer console for VS 2017, but I'm still getting the same errors. (LNK1104: cannot open 'kernel32.lib'.
CMakeError.log
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.12.25827/bin/Hostx64/x64/cl.exe
Build flags:
Id flags:
The output was:
2
Microsoft (R) C/C++ Optimizing Compiler Version 19.12.25831 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
CMakeCCompilerId.c
Microsoft (R) Incremental Linker Version 14.12.25831.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/2017/Community/VC/Tools/MSVC/14.12.25827/bin/Hostx64/x64/cl.exe
Build flags:
Id flags:
The output was:
2
Microsoft (R) C/C++ Optimizing Compiler Version 19.12.25831 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
CMakeCXXCompilerId.cpp
Microsoft (R) Incremental Linker Version 14.12.25831.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:CMakeCXXCompilerId.exe
CMakeCXXCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
Determining if the C compiler works failed with the following output:
Change Dir: C:/Users/Rn Avacado/Desktop/aseprite/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/deps/depot_tools/ninja.exe" "cmTC_f5635"
[1/2] Building C object CMakeFiles\cmTC_f5635.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTC_f5635.exe
FAILED: cmTC_f5635.exe
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_f5635.dir --manifests -- C:\PROGRA~2\MICROS~3\2017\COMMUN~1\VC\Tools\MSVC\1412~1.258\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_f5635.dir\testCCompiler.c.obj /out:cmTC_f5635.exe /implib:cmTC_f5635.lib /pdb:cmTC_f5635.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 /foCMakeFiles\cmTC_f5635.dir/manifest.res CMakeFiles\cmTC_f5635.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/2017/Community/VC/Tools/MSVC/14.12.25827/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.12.25831 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
CMakeCCompilerId.c
Microsoft (R) Incremental Linker Version 14.12.25831.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:CMakeCCompilerId.exe
CMakeCCompilerId.obj
LINK : error LNK2001: unresolved external symbol mainCRTStartup
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\lib\x86\LIBCMT.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
CMakeCCompilerId.exe : fatal error LNK1120: 1 unresolved externals
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.12.25827/bin/Hostx64/x64/cl.exe
Build flags:
Id flags:
The output was:
2
Microsoft (R) C/C++ Optimizing Compiler Version 19.12.25831 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
CMakeCXXCompilerId.cpp
Microsoft (R) Incremental Linker Version 14.12.25831.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:CMakeCXXCompilerId.exe
CMakeCXXCompilerId.obj
LINK : error LNK2001: unresolved external symbol mainCRTStartup
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\lib\x86\LIBCMT.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
CMakeCXXCompilerId.exe : fatal error LNK1120: 1 unresolved externals
Determining if the C compiler works failed with the following output:
Change Dir: C:/Users/Rn Avacado/Desktop/aseprite/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/deps/depot_tools/ninja.exe" "cmTC_bbd07"
[1/2] Building C object CMakeFiles\cmTC_bbd07.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTC_bbd07.exe
FAILED: cmTC_bbd07.exe
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_bbd07.dir --manifests -- C:\PROGRA~2\MICROS~3\2017\COMMUN~1\VC\Tools\MSVC\1412~1.258\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_bbd07.dir\testCCompiler.c.obj /out:cmTC_bbd07.exe /implib:cmTC_bbd07.lib /pdb:cmTC_bbd07.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 /foCMakeFiles\cmTC_bbd07.dir/manifest.res CMakeFiles\cmTC_bbd07.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/2017/Community/VC/Tools/MSVC/14.12.25827/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.12.25831 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
CMakeCCompilerId.c
Microsoft (R) Incremental Linker Version 14.12.25831.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/2017/Community/VC/Tools/MSVC/14.12.25827/bin/Hostx64/x64/cl.exe
Build flags:
Id flags:
The output was:
2
Microsoft (R) C/C++ Optimizing Compiler Version 19.12.25831 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
CMakeCXXCompilerId.cpp
Microsoft (R) Incremental Linker Version 14.12.25831.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:CMakeCXXCompilerId.exe
CMakeCXXCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
Determining if the C compiler works failed with the following output:
Change Dir: C:/Users/Rn Avacado/Desktop/aseprite/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/deps/depot_tools/ninja.exe" "cmTC_c3791"
[1/2] Building C object CMakeFiles\cmTC_c3791.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTC_c3791.exe
FAILED: cmTC_c3791.exe
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_c3791.dir --manifests -- C:\PROGRA~2\MICROS~3\2017\COMMUN~1\VC\Tools\MSVC\1412~1.258\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_c3791.dir\testCCompiler.c.obj /out:cmTC_c3791.exe /implib:cmTC_c3791.lib /pdb:cmTC_c3791.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 /foCMakeFiles\cmTC_c3791.dir/manifest.res CMakeFiles\cmTC_c3791.dir/manifest.rc" failed (exit code 0) with the following output:
The system cannot find the file specified
ninja: build stopped: subcommand failed.
Hello,
I've been having this issue for hours where when I try to compile Aseprite after successfully compiling skia and adding depot_tools, it tells me it cannot open kernel32.lib.
I have (I will also include this information in the convenient location at the end of the post) Visual Studio Community 2017 version 15.5.2 with SDK 10.0.16299.0 for desktop development and 10.0.15063 for universal development.
With that being said, I am running windows 10: 64-bit on an Intel i5-7200U, I have installed CMake's latest version, and I think I have set all my environment variables correctly.
This is all for the latest version of Aseprite as of December 24th, 2017 (which I believe is v1.2.6).
Below should be all the information needed for debugging. I have tried checking environment variables, searching for kernel32.lib elsewhere and putting it in the specified directory, trying to find rc.exe with its corresponding dll file and putting it in the x86 directory within the VC dir. I may have done other stuff that I cannot remember. It's been a long frustrating journey that I'm probably goofing up by overlooking something simple.
CMakeError.log:
CMakeOutput.log:
Environment PATH and Path variables:
Thanks in advance for any help. I'd really love to figure this out.
Aseprite and System version
Aseprite version: v1.2.6, compilation with skia backend using VS2017 V15.5.2 developer console with SDK 10.0.16299.0 for desktop development and 10.0.15063 for universal development.
System: Windows 10, 64-bit OS.