skip to Main Content

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


  1. 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:

    cd aseprite/build
    cmake -DSKIA_OPENGL_LIBRARY="" ..
    ninja aseprite
    

    I have tested it on Windows, but I’m not entirely sure if it will work on Linux…

    Login or Signup to reply.
  2. For anyone still looking for an answer to this. I got it to build on Ubuntu 20.04.

    1. Follow the instructions to build skia over at the skia git repository. Make a note of which folder you cloned the repository into, you will need it later. I tried using the pre-built binaries but I must have been doing something wrong and could just never get it work.
    2. When the build is complete you will see a note about 32-byte alignment, and if you check the outRelease-x64 folder you will see a libskia.a file. Now you know that skia was built succesfully.
    3. Install the aseprite linux build dependencies with 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.
    4. Follow the instruction further down that page for the linux install but pay attention to the parameters you need to change regarding the location of that libskia.a file mentioned in point 2.
    5. Before you start building (and why you’re here) you need to enter @Ben_’s command given above to unlink the dependency to OPENGL (cmake -DSKIA_OPENGL_LIBRARY="" ..)
    6. Now proceed to build aseprite with as the rest of the build instructions given on its repo page with ninja aseprite
    7. Now go to aseprite/build/bin and find the aseprite executable.
    8. You can copy this bin folder to another folder, and run aseprite from there. You can then delete all of the sources you downloaded.
    9. There will be a bunch of errors during the python step, and you’ll notice it complains about not being able to find some repositories, I think common.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).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search