laf
laf copied to clipboard
cmake error in linux
Hi there, currently I am having a problem compiling laf at the cmake command
cmake -G Ninja
-DLAF_BACKEND=skia
-DSKIA_DIR=/skiadir
-DSKIA_LIBRARY_DIR=/skiadir/out/Release-x64 \
when I put that on the terminal it throws me a cmake error:
~/laf/build$ cmake -G Ninja -DLAF_BACKEND=skia -DSKIA_DIR=/skiadir -DSKIA_LIBRARY_DIR=skiadir/out/Release-x64 ..
CMake Error at third_party/CMakeLists.txt:10 (add_subdirectory):
The source directory
/home/m/laf/third_party/googletest
does not contain a CMakeLists.txt file.
-- laf backend: skia
-- laf zlib: zlib
-- laf pixman:
-- laf freetype: FREETYPE_LIBRARY-NOTFOUND
-- laf harfbuzz: HARFBUZZ_LIBRARY-NOTFOUND
-- skia dir: /skiadir
-- skia library: SKIA_LIBRARY-NOTFOUND
-- skia library dir: /home/m/laf/build/skiadir/out/Release-x64
CMake Error at CMakeLists.txt:89 (message):
set SKIA_DIR/SKIA_LIBRARY/SKIA_LIBRARY_DIR to compile w/skia backend
So I dont know exactly what to do after this. I have the skia library m102 and everything else but this is giving me problems and I dont know if it is important to not have problems later when I use the ninja aseprite command.
Im on Linux Mint Vera 21.1.(newbie in linux btw)
Id be very glad If someone could help me to compile it :)
Hi @Picar0r, it looks like you don't have skia compiled in /skiadir
Probably you should use something like:
cmake -G Ninja \
-DLAF_BACKEND=skia \
-DSKIA_DIR=/home/m/laf/build/skiadir \
-DSKIA_LIBRARY_DIR=/home/m/laf/build/skiadir/out/Release-x64
@dacap
It didnt work, It said:
CMake Error: The source directory "/home/m/laf/build/ " does not exist. Specify --help for usage, or press the help button on the CMake GUI. -DLAF_BACKEND=skia: command not found
Do I need to manually create a folder called skiadir and put the skia library there or something? Because there isnt one in that path. (/home/m/laf/build/skiadir)
Edit: also I think the command that you gave me is bad written.
cmake -G Ninja \
-DLAF_BACKEND=skia
-DSKIA_DIR=/home/m/laf/build/skiadir
-DSKIA_LIBRARY_DIR=/home/m/laf/build/skiadir/out/Release-x64
..
*
Edit 2: I tried the above and It didnt work either, same error. weird, because the directory does exist.
Edit 3: ok I was a dumbass, the laf was already in the aseprite folder so I did all the things from laf dependencies there. but anyways at the end when I use ninja to compile laf It says that SkRegion.h, SkPaint.h and ft2build.h doesnt exist (no such file or directory) but again It does exist in the deps/skia/ I saw an issue similar to mine but that person was trying to compile the aseprite binary. Also this is not related to laf but to the aseprite binary, so when I use the ninja aseprite command It throws this error:
ninja: error: '/home/m/deps/skia/out/Release-x64/libskia.a', needed by 'bin/aseprite', missing and no known rule to make it
it is related to the skia lib (the m96 one, but with the m102 I got the same error) and yes the libskia.a is there too so idk why ninja isnt using it. Anyways time to sleep.
Sorry, as you had skia library dir: /home/m/laf/build/skiadir/out/Release-x64
in your output I thought you have a copy of the compiled Skia library in that directory.
Some points:
- Please check the Aseprite INSTALL guide, mainly the Dependencies section, you need to compile Skia first (more details in Skia README)
- After that follow the Aseprite INSTALL instructions for Linux, as you are trying to compile Aseprite (not laf)
- In the future, please create issues about Aseprite on the Aseprite repository (the laf repository is for specific issues about this library)
Ok, I did that but when I tried to compile the binary It said that the bin/aseprite failed:
FAILED: bin/aseprite : && /usr/bin/ccache /usr/bin/clang++ -stdlib=libc++ -Wall -Wno-switch -Wimplicit-fallthrough -O2 -g -DNDEBUG -stdlib=libc++ src/CMakeFiles/aseprite.dir/main/main.cpp.o -o bin/aseprite lib/libapp-lib.a lib/libcfg-lib.a lib/libclip.a -lxcb 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/libcityhash.a lib/libui-lib.a lib/liblaf-os.a lib/liblaf-gfx.a lib/liblaf-ft.a /home/m/deps/skia/out/Release-x64/libfreetype2.a /home/m/deps/skia/out/Release-x64/libharfbuzz.a /home/m/deps/skia/out/Release-x64/libskia.a /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libfontconfig.so /usr/lib/x86_64-linux-gnu/libSM.so /usr/lib/x86_64-linux-gnu/libICE.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 /home/m/deps/skia/out/Release-x64/libskshaper.a lib/libobs.a lib/libundo.a lib/libcmark.a lib/libjpeg.a lib/libgiflib.a lib/libpng16.a -lm /home/m/deps/skia/out/Release-x64/libwebp.a lib/libjson11.a lib/libarchive.a /usr/lib/x86_64-linux-gnu/libcrypto.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/libixwebsocket.a lib/libz.a lib/libupdater-lib.a lib/libver-lib.a lib/libtinyxml.a lib/libnet-lib.a lib/liblaf-base.a -lpthread /usr/lib/x86_64-linux-gnu/libdl.a lib/libcurl.a -ldl
the Output is very long so I just took that part. at the end It says something about a clang error and then ninja stopped building: clang: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed
This wasnt the first time that this happened anyways, but idk what to do now.(I compiled the m102 skia lib this time).
A saw another issue similar to this in here but that was something related to the libwebp.a, libwebpdemux.a and libwebpmux.a libraries (and it is supposed to be fixed) if that helps in something.
sorry about doing the issue here. this is the first ever I did.
The output doesn't include the specific error. Probably you can include some extra lines of the output (or use some pastebin-like service to paste the full console output).
ok there here is:
(the name of the personal folder is different but you can ignore that. Also some parts are in spanish)