While trying to build Aseprite on Debian 10 (amd64) virtualbox VM, after building Skia, the ninja aseprite
command returns the error:
/usr/bin/ld: cannot find -lSKIA_OPENGL_LIBRARY-NOTFOUND
[1/1] Linking CXX executable bin/aseprite
FAILED: bin/aseprite
: && /usr/bin/c++ -Wall -Wno-switch -O2 -g -DNDEBUG src/CMakeFiles/aseprite.dir/main/main.cpp.o -o bin/aseprite lib/libapp-lib.a lib/libclip.a -lxcb -lpthread lib/libdio-lib.a lib/libfilters-lib.a lib/libflic-lib.a lib/libtga-lib.a lib/librender-lib.a lib/libdoc-lib.a lib/libfixmath-lib.a lib/libui-lib.a lib/liblaf-os.a lib/liblaf-gfx.a lib/liblaf-ft.a /root/deps/skia/out/Release-x64/libskia.a -lSKIA_OPENGL_LIBRARY-NOTFOUND /usr/lib/x86_64-linux-gnu/libfontconfig.so /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libXext.so /usr/lib/x86_64-linux-gnu/libXcursor.so /root/deps/skia/out/Release-x64/libskshaper.a lib/libobs.a lib/libundo.a lib/libcmark.a lib/libjpeg.a lib/libgiflib.a lib/libwebpdemux.a lib/libwebpmux.a lib/libwebp.a -lpthread -lm lib/libfreetype.a lib/libharfbuzz.a lib/libfreetype.a lib/libharfbuzz.a lib/libpng16.a -lm lib/libjson11.a lib/libarchive.a /usr/lib/x86_64-linux-gnu/libcrypto.so /usr/lib/x86_64-linux-gnu/libexpat.so /usr/lib/x86_64-linux-gnu/libssl.so lib/libfmt.a lib/libtinyexpr.a lib/liblauxlib.a lib/liblua.a lib/liblualib.a lib/libupdater-lib.a lib/libcfg-lib.a lib/libver-lib.a lib/libtinyxml.a lib/libnet-lib.a lib/liblaf-base.a lib/libmodpbase64.a /usr/lib/x86_64-linux-gnu/libdl.so lib/libcurl.a lib/libz.a -ldl && :
/usr/bin/ld: cannot find -lSKIA_OPENGL_LIBRARY-NOTFOUND
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
How may I solve this?
2
Answers
It appears that CMake is looking for OpenGL and failing… Aseprite doesn’t seem to use OpenGL anyway, so disabling that altogether by clearing the cache variable
SKIA_OPENGL_LIBRARY
should work:I have tested it on Windows, but I’m not entirely sure if it will work on Linux…
For anyone still looking for an answer to this. I got it to build on Ubuntu 20.04.
outRelease-x64
folder you will see alibskia.a
file. Now you know that skia was built succesfully.sudo apt-get install -y g++ cmake ninja-build libx11-dev libxcursor-dev libxi-dev libgl1-mesa-dev libfontconfig1-dev
. You will find these instructions at the aseprite git repository.libskia.a
file mentioned in point 2.cmake -DSKIA_OPENGL_LIBRARY="" ..
)ninja aseprite
aseprite/build/bin
and find theaseprite
executable.bin
folder to another folder, and runaseprite
from there. You can then delete all of the sources you downloaded.python
step, and you’ll notice it complains about not being able to find some repositories, I thinkcommon.git
is one of them. You may safely ignore this warning.If you want to keep supporting development of the application I do recommend you spend whatever it costs for a license (but it’s totally legal to build your own copy like this).