Problems I Had While Compiling Aseprite
Aseprite Compilation is Hard
So I had once made a video about how to compile Aseprite for yourself in Chinese on Bilibili, two actually, but the comment section is almost filled with people struggling and today I decided to reinvestigate the compiling process.
To be fair, Aseprite’s compiling instructions will and would work on a fresh Windows environment with minimum software installed, but it’s often not the case, or never the case.
Problems I Had
So I faced some problems while compiling Aseprite, though this may not be applicable for everyone but if you have these softwares installed on you Windows, you may want to check this out:
- Cygwin (or any other awk for Windows)
- MinGW
Cygwin
So every problems I had while compiling Aseprite happened at the last step of ninja aseprite
, and this output reads a bad line read of option.awk by libpng.
This was caused by me putting Cygwin’s bin folder into my PATH environment variable and cmake uses Cygwin’s gawk which isn’t compatible. Although I do not know if this was done by the installer by default or I did it manually for whatever reason, it is a good reason to change the gawk.exe in your PATH to something like from git installation.
And that is how I fixed the problem, by adding a new PATH line of [Git Installation]\usr\bin
. I don’t think this is recommended but it is a fix nevertheless.
MinGW
It isn’t something unrecorded that Aseprite does not support compilation with MinGW, but what surprised me was that even if I put the flag -DCMAKE_IGNORE_PATH=D:\Tools\MinGW\bin
in the cmake command when in ninja, it still used MinGW.
The problem can be identified when an error occurred and there is any MinGW written in the output.
The solution was simple enough, just remove MinGW from PATH, and since I already put the ignore flag when running cmake I can just rerun the ninja command with the new environment in a restarted terminal session (remember to call vsdevcmd.bat).
Memory Running Out
To my surprise, the RAM on my laptop actually ran out during ninja and the raw output was:
fatal error C1002: 在第 2 遍中编译器的堆空间不足
Sorry that this is in Chinese but what it says is that the stack memory is running out.
And after closing my hundred-tab-chrome from when I was googling the problems, I rerun the command and everything worked fine (not really, I had to restart my laptop once to make the memory usage low as it was on idle and 80% of RAM was used from my 8GB ram).
Commands I used
Below are the commands I used just for reference
1 | call D:\VS2019\Common7\Tools\VsDevCmd.bat -arch=x64 |
Conclusion
So that was all I had as of the problems I faced while compiling Aseprite, I think that the key to a successful compilation is to read the output and most importantly, search up it online. The program is not impossible to compile, it’s just that it is prone to strange environmental issues.
Anyways this is the blog for today.
Tianyu Qi
Good Luck