aseprite icon indicating copy to clipboard operation
aseprite copied to clipboard

Building error on Windows 11 with automatic script

Open ValorZard opened this issue 8 months ago • 5 comments

Casepritebuild.cmd.txt

Main issue seems to be:


We are going to run cmake and then build the project.
This will take some minutes.

Press Enter to continue.
Configuring Aseprite...
CMake Error: U/aseprite-release/CMakeFiles/pkgRedirectscts directory:
This may be caused by not having read/write access to the build directory.
Try specifying a location with read/write access like:
  cmake -B build
If using a CMake presets file, ensure that preset parameter
'binaryDir' expands to a writable directory.

===================/aseprite-release is not a directory===============
================================ DONE ================================
Run Aseprite with the following command:
  /aseprite-release/bin/aseprite.exe

Press any key to continue . . .```

ValorZard avatar May 02 '25 04:05 ValorZard

The full build output was too long so i put it in as a txt file, hope that helps

ValorZard avatar May 02 '25 04:05 ValorZard

Deleted the repo and cloned again, this time fresh, and I got a brand new error

[1547/1547] Linking CXX executable bin\aseprite.exe
FAILED: bin/aseprite.exe
C:\Windows\system32\cmd.exe /C "cd . && C:\Users\sraya\scoop\apps\cmake\current\bin\cmake.exe -E vs_link_exe --msvc-ver=1938 --intdir=src\CMakeFiles\aseprite.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\mt.exe --manifests C:\github\aseprite\src\main\settings.manifest -- C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1438~1.331\bin\Hostx64\x64\link.exe /nologo src\CMakeFiles\aseprite.dir\main\main.cpp.obj src\CMakeFiles\aseprite.dir\main\resources_win32.rc.res  /out:bin\aseprite.exe /implib:lib\aseprite.lib /pdb:bin\aseprite.pdb /version:0.0 /machine:x64 /LTCG /debug /INCREMENTAL /subsystem:windows -LINK wsetargv.obj -ENTRY:"wWinMainCRTStartup"  lib\app-lib.lib  lib\lauxlib.lib  lib\lualib.lib  lib\lua.lib  lib\ixwebsocket.lib  wsock32.lib  lib\cfg-lib.lib  lib\view-lib.lib  lib\dio-lib.lib  lib\filters-lib.lib  lib\flic-lib.lib  lib\tga-lib.lib  lib\render-lib.lib  lib\doc-lib.lib  lib\fixmath-lib.lib  lib\cityhash.lib  lib\laf-dlgs.lib  lib\ui-lib.lib  lib\laf-text.lib  lib\laf-os.lib  lib\clip.lib  lib\laf-gfx.lib  kernel32.lib  user32.lib  gdi32.lib  comdlg32.lib  ole32.lib  psapi.lib  wininet.lib  comctl32.lib  dwmapi.lib  msimg32.lib  C:\github\aseprite\.deps\skia-m124\out\Release-x64\skia.lib  "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.26100.0\um\x64\OpenGL32.Lib"  lib\laf-ft.lib  C:\github\aseprite\.deps\skia-m124\out\Release-x64\freetype2.lib  C:\github\aseprite\.deps\skia-m124\out\Release-x64\harfbuzz.lib  C:\github\aseprite\.deps\skia-m124\out\Release-x64\skshaper.lib  C:\github\aseprite\.deps\skia-m124\out\Release-x64\skunicode.lib  lib\obs.lib  lib\updater-lib.lib  lib\ver-lib.lib  lib\undo.lib  lib\cmark.lib  lib\TinyEXIF.lib  lib\tinyxml2.lib  lib\giflib.lib  lib\libpng16_static.lib  C:\github\aseprite\.deps\skia-m124\out\Release-x64\libjpeg.lib  lib\json11.lib  lib\archive.lib  lib\zlibstatic.lib  lib\fmt.lib  lib\tinyexpr.lib  C:\github\aseprite\.deps\skia-m124\out\Release-x64\libwebp.lib  lib\net-lib.lib  lib\laf-base.lib  shlwapi.lib  dbghelp.lib  version.lib  lib\libcurl.lib  wldap32.lib  ws2_32.lib  winmm.lib  advapi32.lib  crypt32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1438~1.331\bin\Hostx64\x64\link.exe /nologo src\CMakeFiles\aseprite.dir\main\main.cpp.obj src\CMakeFiles\aseprite.dir\main\resources_win32.rc.res /out:bin\aseprite.exe /implib:lib\aseprite.lib /pdb:bin\aseprite.pdb /version:0.0 /machine:x64 /LTCG /debug /INCREMENTAL /subsystem:windows -LINK wsetargv.obj -ENTRY:wWinMainCRTStartup lib\app-lib.lib lib\lauxlib.lib lib\lualib.lib lib\lua.lib lib\ixwebsocket.lib wsock32.lib lib\cfg-lib.lib lib\view-lib.lib lib\dio-lib.lib lib\filters-lib.lib lib\flic-lib.lib lib\tga-lib.lib lib\render-lib.lib lib\doc-lib.lib lib\fixmath-lib.lib lib\cityhash.lib lib\laf-dlgs.lib lib\ui-lib.lib lib\laf-text.lib lib\laf-os.lib lib\clip.lib lib\laf-gfx.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib psapi.lib wininet.lib comctl32.lib dwmapi.lib msimg32.lib C:\github\aseprite\.deps\skia-m124\out\Release-x64\skia.lib C:\Program Files (x86)\Windows Kits\10\Lib\10.0.26100.0\um\x64\OpenGL32.Lib lib\laf-ft.lib C:\github\aseprite\.deps\skia-m124\out\Release-x64\freetype2.lib C:\github\aseprite\.deps\skia-m124\out\Release-x64\harfbuzz.lib C:\github\aseprite\.deps\skia-m124\out\Release-x64\skshaper.lib C:\github\aseprite\.deps\skia-m124\out\Release-x64\skunicode.lib lib\obs.lib lib\updater-lib.lib lib\ver-lib.lib lib\undo.lib lib\cmark.lib lib\TinyEXIF.lib lib\tinyxml2.lib lib\giflib.lib lib\libpng16_static.lib C:\github\aseprite\.deps\skia-m124\out\Release-x64\libjpeg.lib lib\json11.lib lib\archive.lib lib\zlibstatic.lib lib\fmt.lib lib\tinyexpr.lib C:\github\aseprite\.deps\skia-m124\out\Release-x64\libwebp.lib lib\net-lib.lib lib\laf-base.lib shlwapi.lib dbghelp.lib version.lib lib\libcurl.lib wldap32.lib ws2_32.lib winmm.lib advapi32.lib crypt32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:src\CMakeFiles\aseprite.dir/intermediate.manifest src\CMakeFiles\aseprite.dir/manifest.res" failed (exit code 1120) with the following output:
LINK : warning LNK4044: unrecognized option '/LINK'; ignored
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
skia.lib(skia.SkGlyph.obj) : error LNK2001: unresolved external symbol __std_minmax_f
skia.lib(skia.SkGradientBaseShader.obj) : error LNK2001: unresolved external symbol __std_max_f
skia.lib(skia.SkGradientBaseShader.obj) : error LNK2001: unresolved external symbol __std_min_f
bin\aseprite.exe : fatal error LNK1120: 3 unresolved externals
ninja: build stopped: subcommand failed.
================================ DONE ================================
Run Aseprite with the following command:

  /c/github/aseprite/build/bin/aseprite.exe

Press any key to continue . . .

C:\github\aseprite>^A

ValorZard avatar May 02 '25 04:05 ValorZard

I get the same error when doing manual and automatic compilation, so I'll share it here, it's quite huge but overall it's the same.

g:\tools\aseprite\build>ninja aseprite

[1534/1534] Linking CXX executable bin\aseprite.exe
FAILED: bin/aseprite.exe
C:\WINDOWS\system32\cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --msvc-ver=1936 --intdir=src\CMakeFiles\aseprite.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100203~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100203~1.0\x64\mt.exe --manifests G:\tools\aseprite\src\main\settings.manifest -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\link.exe /nologo src\CMakeFiles\aseprite.dir\main\main.cpp.obj src\CMakeFiles\aseprite.dir\main\resources_win32.rc.res  /out:bin\aseprite.exe /implib:lib\aseprite.lib /pdb:bin\aseprite.pdb /version:0.0 /machine:x64 /LTCG /debug /INCREMENTAL /subsystem:windows -LINK wsetargv.obj -ENTRY:"wWinMainCRTStartup"  lib\app-lib.lib  lib\lauxlib.lib  lib\lualib.lib  lib\lua.lib  lib\ixwebsocket.lib  wsock32.lib  lib\cfg-lib.lib  lib\view-lib.lib  lib\dio-lib.lib  lib\filters-lib.lib  lib\flic-lib.lib  lib\tga-lib.lib  lib\render-lib.lib  lib\doc-lib.lib  lib\fixmath-lib.lib  lib\cityhash.lib  lib\laf-dlgs.lib  lib\ui-lib.lib  lib\laf-text.lib  lib\laf-os.lib  lib\clip.lib  lib\laf-gfx.lib  kernel32.lib  user32.lib  gdi32.lib  comdlg32.lib  ole32.lib  psapi.lib  wininet.lib  comctl32.lib  dwmapi.lib  msimg32.lib  C:\deps\skia-m124\out\Release-x64\skia.lib  "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.20348.0\um\x64\OpenGL32.Lib"  lib\laf-ft.lib  C:\deps\skia-m124\out\Release-x64\freetype2.lib  C:\deps\skia-m124\out\Release-x64\harfbuzz.lib  C:\deps\skia-m124\out\Release-x64\skshaper.lib  C:\deps\skia-m124\out\Release-x64\skunicode.lib  lib\obs.lib  lib\updater-lib.lib  lib\ver-lib.lib  lib\undo.lib  lib\cmark.lib  lib\TinyEXIF.lib  lib\tinyxml2.lib  lib\giflib.lib  lib\libpng16_static.lib  C:\deps\skia-m124\out\Release-x64\libjpeg.lib  lib\json11.lib  lib\archive.lib  lib\zlibstatic.lib  lib\fmt.lib  lib\tinyexpr.lib  C:\deps\skia-m124\out\Release-x64\libwebp.lib  lib\net-lib.lib  lib\laf-base.lib  shlwapi.lib  dbghelp.lib  version.lib  lib\libcurl.lib  wldap32.lib  ws2_32.lib  winmm.lib  advapi32.lib  crypt32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\link.exe /nologo src\CMakeFiles\aseprite.dir\main\main.cpp.obj src\CMakeFiles\aseprite.dir\main\resources_win32.rc.res /out:bin\aseprite.exe /implib:lib\aseprite.lib /pdb:bin\aseprite.pdb /version:0.0 /machine:x64 /LTCG /debug /INCREMENTAL /subsystem:windows -LINK wsetargv.obj -ENTRY:wWinMainCRTStartup lib\app-lib.lib lib\lauxlib.lib lib\lualib.lib lib\lua.lib lib\ixwebsocket.lib wsock32.lib lib\cfg-lib.lib lib\view-lib.lib lib\dio-lib.lib lib\filters-lib.lib lib\flic-lib.lib lib\tga-lib.lib lib\render-lib.lib lib\doc-lib.lib lib\fixmath-lib.lib lib\cityhash.lib lib\laf-dlgs.lib lib\ui-lib.lib lib\laf-text.lib lib\laf-os.lib lib\clip.lib lib\laf-gfx.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib psapi.lib wininet.lib comctl32.lib dwmapi.lib msimg32.lib C:\deps\skia-m124\out\Release-x64\skia.lib C:\Program Files (x86)\Windows Kits\10\Lib\10.0.20348.0\um\x64\OpenGL32.Lib lib\laf-ft.lib C:\deps\skia-m124\out\Release-x64\freetype2.lib C:\deps\skia-m124\out\Release-x64\harfbuzz.lib C:\deps\skia-m124\out\Release-x64\skshaper.lib C:\deps\skia-m124\out\Release-x64\skunicode.lib lib\obs.lib lib\updater-lib.lib lib\ver-lib.lib lib\undo.lib lib\cmark.lib lib\TinyEXIF.lib lib\tinyxml2.lib lib\giflib.lib lib\libpng16_static.lib C:\deps\skia-m124\out\Release-x64\libjpeg.lib lib\json11.lib lib\archive.lib lib\zlibstatic.lib lib\fmt.lib lib\tinyexpr.lib C:\deps\skia-m124\out\Release-x64\libwebp.lib lib\net-lib.lib lib\laf-base.lib shlwapi.lib dbghelp.lib version.lib lib\libcurl.lib wldap32.lib ws2_32.lib winmm.lib advapi32.lib crypt32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:src\CMakeFiles\aseprite.dir/intermediate.manifest src\CMakeFiles\aseprite.dir/manifest.res" failed (exit code 1120) with the following output:

LINK : warning LNK4044: unrecognized option '/LINK'; ignored
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
skia.lib(skia.SkGlyph.obj) : error LNK2001: unresolved external symbol __std_minmax_f
skia.lib(skia.SkGradientBaseShader.obj) : error LNK2001: unresolved external symbol __std_max_f
skia.lib(skia.SkGradientBaseShader.obj) : error LNK2001: unresolved external symbol __std_min_f
bin\aseprite.exe : fatal error LNK1120: 3 unresolved externals

ninja: build stopped: subcommand failed.

FineCurry avatar May 04 '25 21:05 FineCurry

Probably this is related to some incompatible version between Visual Studio Community, and the one used to compile Skia on GitHub runners (Visual Studio Enterprise 2022, v17.13.35825.156).

What specific Visual Studio are you using to compile? If it's old, I'd try to update it to the latest version.

dacap avatar May 05 '25 13:05 dacap

@dacap updated both the git repo and my visual studio to latest, and it still fails

Image

my console output: message.txt

ValorZard avatar May 07 '25 18:05 ValorZard

any update on this? am getting the same error and idk how to fix it on windows 10

rktvr avatar Jun 30 '25 16:06 rktvr

Also getting the same error on Windows 11. VSC 2022, 17.14.7. Tried using an older version of the skia executable (m81) as recommended on a reddit post, but that gave even more errors. Tried wiping and recloning everything multiple times. Even got to the point of running Windows Update. No change.

gena-snow avatar Jul 05 '25 00:07 gena-snow

Updating Visual Studio from 17.8 to the latest 17.14.9 solved it for me. These are the tool versions that worked for me (for Aseprite v1.3.14.4):

  • Visual Studio Community 2022 17.14.9
  • ninja v1.12.1
  • cmake 3.31.8

pixeysl avatar Jul 21 '25 12:07 pixeysl

Ran into this as well, fix was to make sure you have MSVC 14.43 installed in the visual studio installer and it's used by cmake.

You can verify this when you run the cmake build command, the first few lines should contain something like:

-- The C compiler identification is MSVC 19.43.34810.0
-- The CXX compiler identification is MSVC 19.43.34810.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/cl.exe - skipped

Annoyingly MS uses multiple different version numbers depending on what component it refers to. Visual Studio 17.13 uses MSVC 14.43 which is identified by MSC version 19.43 (more info here).

Keep in mind this will eventually be outdated as its dependent on what version skia was compiled with. As @dcap mentioned, was Visual Studio Enterprise 2022, v17.13.35825.156 at time of this post.

Korkd avatar Aug 07 '25 23:08 Korkd

In my case I had an older version of MSVC installed in addition to the latest version. After uninstalling the older version, restarting the terminal and updating the Visual Studio version via build.cmd -> U, the build has worked for me.

SanjoSolutions avatar Sep 15 '25 13:09 SanjoSolutions

  1. Open Visual Studio Installer
  2. Modify
  3. Go to Individual Components
  4. Filter "msvc 14.43."
  5. Choose the one shown on the screenshot Image
  6. Download

That way you can downgrade your MSVC compiler as @Korkd suggested.

Erzis900 avatar Sep 19 '25 16:09 Erzis900