symless / synergy-core

Open source core of Synergy, the cross-platform keyboard and mouse sharing tool (Windows, macOS, Linux)
https://symless.com/synergy
Other
10.13k stars 3.6k forks source link

Compile fail Rocky9.3 glib-2.0 missing #7344

Closed dullahan8 closed 2 months ago

dullahan8 commented 3 months ago

Operating Systems

Rocky Linux release 9.3 (Blue Onyx)

Synergy Version

1.15

Steps to Reproduce

  1. Clone repo
  2. CLI compile
    mkdir build
    cd build
    cmake ..

Expected: No errors Actual:

-- Checking for module 'glib-2.0'
--   Package 'glib-2.0', required by 'virtual:world', not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:556 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:778 (_pkg_check_modules_internal)
  src/lib/synergy/CMakeLists.txt:52 (pkg_check_modules)

On RHEL distros, I found out glib-2.0 is actually called glib2

$ yum info glib2
Last metadata expiration check: 1:12:17 ago on Thu 04 Apr 2024 10:39:02 AM PDT.
Installed Packages
Name         : glib2
Version      : 2.68.4
Release      : 11.el9
Architecture : x86_64
Size         : 13 M
Source       : glib2-2.68.4-11.el9.src.rpm

But it is already installed on my system.

Please let me know how I can resolve this and install Synergy.

dullahan8 commented 2 months ago

I found my solution by installing glib2-devel which revealed the next error and the next. I ended up resolving them all by installing the -devel version of each missing package. Here is the summary of all the missing packages I installed: sudo yum install -y glib2-devel gdk-pixbuf2-devel.x86_64 libnotify-devel.x86_64 qt5-linguist.x86_64

It would be nice to improve the installation documentation to prompt future readers to install these pre-requisites before attempting to compile.