mitchcurtis / slate

Pixel Art Editor
GNU General Public License v3.0
1.07k stars 103 forks source link

Compilation terminates with error on Arch Linux #156

Closed jose1711 closed 3 years ago

jose1711 commented 3 years ago

Describe the bug Compilation terminates with error on Arch Linux: aggregate ‘QPainterPath path’ has incomplete type ..

To Reproduce

  1. Install and boot Arch Linux
  2. get slate PKGBUILD from aur (https://aur.archlinux.org/packages/slate/)
  3. makepkg
  4. receive error:
    ..
    [ 55%] Building CXX object lib/CMakeFiles/slate.dir/tilecanvas.cpp.o
    [ 56%] Building CXX object lib/CMakeFiles/slate.dir/tilecanvaspaneitem.cpp.o
    [ 57%] Building CXX object lib/CMakeFiles/slate.dir/tilegrid.cpp.o
    /home/jose/.cache/yay/slate/src/slate-0.9.0/lib/tilegrid.cpp: In member function ‘virtual void TileGrid::paint(QPainter*)’:
    /home/jose/.cache/yay/slate/src/slate-0.9.0/lib/tilegrid.cpp:76:22: error: aggregate ‘QPainterPath path’ has incomplete type and cannot be defined
    76 |         QPainterPath path;
      |                      ^~~~
    make[2]: *** [lib/CMakeFiles/slate.dir/build.make:1135: lib/CMakeFiles/slate.dir/tilegrid.cpp.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:238: lib/CMakeFiles/slate.dir/all] Error 2
    make: *** [Makefile:114: all] Error 2

Expected behavior Compilation ends sucessfully.

Screenshots n/a

Environment (please complete the following information):

Additional context

cmake 3.19.2-1
qt5-base 5.15.2-2
mitchcurtis commented 3 years ago

Hi, thanks for reporting this.

This was fixed on master (which currently targets Qt 5.15) in https://github.com/mitchcurtis/slate/commit/92279b1d594d7d09c7e1f77841c1002c1a3782b7.

v0.9.0 targets Qt 5.13, and from memory, the changes in Qt that require the addition of the includes were done after 5.13. I'm not sure how the arch packages work, but if they are just source packages, then you need to make sure you use the correct Qt version as listed in Slate's README.md.

jose1711 commented 3 years ago

Thank you, that fixed it for me. I let the maintainer know so hopefully he'll update the PKGBUILD (which is sort-of a recipe how to compile and install the package) soon.

mitchcurtis commented 3 years ago

Thank you!