Faild ninja build: `FAILED: gfx/packing_rects_tests`
- Dominant language
- C++
- Stars
- 349
- Forks
- 97
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 2
Description
I tried following the [compile section](https://github.com/aseprite/laf#compile) but I got a error when running `ninja`:
```sh
FAILED: gfx/packing_rects_tests
: && /usr/bin/c++ gfx/CMakeFiles/packing_rects_tests.dir/packing_rects_tests.cpp.o -o gfx/packing_rects_tests lib/libgtest.a gfx/liblaf-gfx.a -lpthread base/liblaf-base.a -lpthread /usr/lib/x86_64-linux-gnu/libdl.so /usr/lib/x86_64-linux-gnu/libGL.so third_party/zlib/lib/libz.a /usr/lib/x86_64-linux-gnu/libfontconfig.so && :
gfx/liblaf-gfx.a(packing_rects.cpp.o): In function `gfx::Region::createSubtraction(gfx::Region const&, gfx::Region const&)':
packing_rects.cpp:(.text._ZN3gfx6Region17createSubtractionERKS0_S2_[_ZN3gfx6Region17createSubtractionERKS0_S2_]+0x29): undefined reference to `SkRegion::op(SkRegion const&, SkRegion const&, SkRegion::Op)'
gfx/liblaf-gfx.a(packing_rects.cpp.o): In function `gfx::Region::~Region()':
packing_rects.cpp:(.text._ZN3gfx6RegionD2Ev[_ZN3gfx6RegionD5Ev]+0x14): undefined reference to `SkRegion::~SkRegion()'
gfx/liblaf-gfx.a(region_skia.cpp.o): In function `gfx::Region::Region()':
region_skia.cpp:(.text+0x80): undefined reference to `SkRegion::SkRegion()'
gfx/liblaf-gfx.a(region_skia.cpp.o): In function `gfx::Region::Region(gfx::Region const&)':
...
```
There are more undefined reference error, but I omitted them.
Previously when running `cmake` I get some warnings:
```sh
CMake Warning at cmake/FindSkia.cmake:150 (target_link_libraries):
Target requests linking to directory
"/home/yudi/deps/skia/out/Release-x64". Targets may link only to
libraries. CMake is dropping the item.
Call Stack (most recent call first):
CMakeLists.txt:47 (include)
```
This warning is printed several times with different values for``.
Am I missing something?
Versions:
```
cmake: 3.25.2
g++: 11.0
```
Contributor guide
Research direction
Start by reproducing the compile-section setup and running the failing ninja target. Read cmake/FindSkia.cmake, especially the warning at line 150, and CMakeLists.txt around line 47; done means the Skia symbols link successfully and the directory-linking warning no longer appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100