xyproto / wallutils

:city_sunset: Utilities for handling monitors, resolutions, wallpapers and timed wallpapers
BSD 3-Clause "New" or "Revised" License
463 stars 17 forks source link

Fedora build procedure does not work #34

Closed sgob1 closed 1 year ago

sgob1 commented 1 year ago

The commands provided in the README.md file for the Fedora build are inaccurate and should be updated.

I recently tried to compile wallutils for Fedora 37 in a clean environment inside a toolbox. While following the provided commands, I encountered some issues during the compilation process:

  1. the package imagemagick is misspelled: the correct package name in Fedora repositories is ImageMagick;
  2. the package libheif-devel does not belong to Fedora repositories, it is instead part of rpmfusion-free repository, and this should be addressed. I am well aware that most, if not all users have rpmfusion installed, but for a build in a clean environment this is not usually the case;
  3. package wayland-devel is missing: if not installed, full compilation with make fails for file wayinfo.go with error
    go build -mod=vendor -trimpath
    # github.com/xyproto/wallutils
    In file included from ./wayinfo.go:4:
    ./include/wayinfo.h:32:10: fatal error: wayland-client.h: No such file or directory
    32 | #include <wayland-client.h>
      |          ^~~~~~~~~~~~~~~~~~
    compilation terminated.
    make: *** [Makefile:18: all] Error 2

To solve this, a working command sequence could be the following:

sudo dnf update
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install git golang ImageMagick libXcursor-devel libXmu-devel xorg-x11-xbitmaps libheif-devel wayland-devel
git clone https://github.com/xyproto/wallutils
cd wallutils
make
sudo make PREFIX=/usr/local install

I tested it on a toolbox running Fedora 37.

xyproto commented 1 year ago

Thanks for reporting! I'll update the documentation.