Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: libgudev vs libudev  (Read 1424 times)

0 Members and 2 Guests are viewing this topic.

jschatzman

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
libgudev vs libudev
« on: March 15, 2022, 12:13:23 am »
RHEL 8 (8.5 in particular) supports libgudev but not libudev. Libgudev is designed to "consume library libudev from subpackage libudev".  The SFML cmake configuration does not appear to be able to use libgudev. When attempting to build SFML-2.5.1, cmake reports

-- UDev not found.
-- UDev: You can specify includes: -DUDEV_PATH_INCLUDES=/opt/udev/include
--       currently found includes: UDEV_INCLUDE_DIR-NOTFOUND
-- UDev: You can specify libs: -DUDEV_PATH_LIB=/opt/udev/lib
--       currently found libs: UDEV_LIBRARIES-NOTFOUND
CMake Error at cmake/Modules/FindUDev.cmake:49 (MESSAGE):
  Could not find UDev library
Call Stack (most recent call first):
  cmake/Macros.cmake:279 (find_package)
  src/SFML/Window/CMakeLists.txt:276 (sfml_find_package)
-- Configuring incomplete, errors occurred!


Adding the paths to libgudev headers and library does not make any change.

cmake -DUDEV_PATH_INCLUDES=/usr/include/gudev-1.0/  -DUDEV_PATH_LIB=/usr/lib64 ..

gives the same result as above.[ Packages libgudev and libgudev-devel have been installed.]

Does SFML work with libgudev?  How can I modify the 2.5.1 cmake config to make it succeed?



eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: libgudev vs libudev
« Reply #1 on: March 15, 2022, 08:32:28 am »
Is libgudev a drop-in replacement with API (or ABI) compatibility?

Doing a quick web search seems to yield some different results from what you're saying:

https://wiki.gnome.org/Projects/libgudev
Quote
libgudev
This library provides GObject bindings for libudev

https://gitlab.gnome.org/GNOME/libgudev/
Quote
libgudev requires libudev (part of systemd), glib, and pkg-config. Refer to
the meson.build file itself for up-to-date version requirements.

Since SFML doesn't use GObject libgudev can't be used with SFML and since libgudev depends on libudev, libudev has to be present on your system anyways...
« Last Edit: March 15, 2022, 08:37:12 am by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything