Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble building on Ubuntu 24.10. #556

Closed
Nirerp opened this issue Nov 12, 2024 · 3 comments
Closed

Trouble building on Ubuntu 24.10. #556

Nirerp opened this issue Nov 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Nirerp
Copy link

Nirerp commented Nov 12, 2024

Regression?

Yes

Hyprlock Info and Version

Trying to build hyprlock on my ubuntu using

cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build
cmake --build ./build --config Release --target hyprlock -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`

but got this error:

/home/nir/hyprlock/src/core/Fingerprint.cpp:12:42: error: ‘ServiceName’ is not a member of ‘sdbus’
   12 | static const auto FPRINT        = sdbus::ServiceName{"net.reactivated.Fprint"};
      |                                          ^~~~~~~~~~~
/home/nir/hyprlock/src/core/Fingerprint.cpp:13:42: error: ‘ServiceName’ is not a member of ‘sdbus’
   13 | static const auto DEVICE        = sdbus::ServiceName{"net.reactivated.Fprint.Device"};
      |                                          ^~~~~~~~~~~
/home/nir/hyprlock/src/core/Fingerprint.cpp:14:42: error: ‘ServiceName’ is not a member of ‘sdbus’
   14 | static const auto MANAGER       = sdbus::ServiceName{"net.reactivated.Fprint.Manager"};
      |                                          ^~~~~~~~~~~
/home/nir/hyprlock/src/core/Fingerprint.cpp:15:42: error: ‘ServiceName’ is not a member of ‘sdbus’
   15 | static const auto LOGIN_MANAGER = sdbus::ServiceName{"org.freedesktop.login1.Manager"};
      |                                          ^~~~~~~~~~~
/home/nir/hyprlock/src/core/Fingerprint.cpp: In member function ‘std::shared_ptr<sdbus::IConnection> CFingerprint::start()’:
/home/nir/hyprlock/src/core/Fingerprint.cpp:53:83: error: ‘ServiceName’ is not a member of ‘sdbus’
   53 | login      = sdbus::createProxy(*m_sDBUSState.connection, sdbus::ServiceName{"org.freedesktop.login1"}, sdbus::ObjectPath{"/org/freedesktop/login1"});
      |                                                                  ^~~~~~~~~~~

gmake[2]: *** [CMakeFiles/hyprlock.dir/build.make:132: CMakeFiles/hyprlock.dir/src/core/Fingerprint.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/hyprlock.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

does anyone know how to go on from here?

Compositor Info and Version

System/Version info
<Paste the output of the command here>

Description

Trying to build according to README

How to reproduce

cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build
cmake --build ./build --config Release --target hyprlock -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`

Crash reports, logs, images, videos

No response

@Nirerp Nirerp added the bug Something isn't working label Nov 12, 2024
@vaxerski
Copy link
Member

sdbus-cpp >= 2.0.0

@vaxerski vaxerski closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2024
@AdityaRoot
Copy link

Issue persisting with sdbus-cpp = 2.1.0

-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring hyprlock in Release with CMake
-- Checking deps...
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "2.3.0")
-- Found OpenGL: /usr/lib/libOpenGL.so
-- Checking for modules 'wayland-client;wayland-protocols;wayland-egl;hyprlang>=0.4.0;egl;opengl;xkbcommon;libjpeg;libwebp;libmagic;cairo;pangocairo;libdrm;gbm;hyprutils>=0.2.6;sdbus-c++>=2.0.0;hyprgraphics'
--   Found wayland-client, version 1.23.1
--   Found wayland-protocols, version 1.38
--   Found wayland-egl, version 18.1.0
--   Found hyprlang, version 0.5.3
--   Found egl, version 1.5
--   Found opengl, version 4.5
--   Found xkbcommon, version 1.7.0
--   Found libjpeg, version 3.0.4
--   Found libwebp, version 1.4.0
--   Found libmagic, version 5.46
--   Found cairo, version 1.18.2
--   Found pangocairo, version 1.54.0
--   Found libdrm, version 2.4.124
--   Found gbm, version 24.3.1-arch1.3
--   Found hyprutils, version 0.2.6
--   Found sdbus-c++, version 2.1.0
--   Found hyprgraphics, version 0.1.0
-- Found WaylandScanner at /usr/bin/wayland-scanner
-- Found wayland-protocols at //usr/share/wayland-protocols
-- Configuring done (0.6s)
-- Generating done (0.0s)
-- Build files have been written to: /home/adi/.cache/yay/hyprlock-git/src/hyprlock/build
[  5%] Building CXX object CMakeFiles/hyprlock.dir/src/core/Auth.cpp.o
[  5%] Building CXX object CMakeFiles/hyprlock.dir/src/config/ConfigManager.cpp.o
[  8%] Building CXX object CMakeFiles/hyprlock.dir/src/core/CursorShape.cpp.o
[ 11%] Building CXX object CMakeFiles/hyprlock.dir/src/core/Egl.cpp.o
[ 14%] Building CXX object CMakeFiles/hyprlock.dir/src/core/Fingerprint.cpp.o
/home/adi/.cache/yay/hyprlock-git/src/hyprlock/src/core/Fingerprint.cpp:12:42: error: ‘ServiceName’ is not a member of ‘sdbus’
   12 | static const auto FPRINT        = sdbus::ServiceName{"net.reactivated.Fprint"};
      |                                          ^~~~~~~~~~~
/home/adi/.cache/yay/hyprlock-git/src/hyprlock/src/core/Fingerprint.cpp:13:42: error: ‘ServiceName’ is not a member of ‘sdbus’
   13 | static const auto DEVICE        = sdbus::ServiceName{"net.reactivated.Fprint.Device"};
      |                                          ^~~~~~~~~~~
/home/adi/.cache/yay/hyprlock-git/src/hyprlock/src/core/Fingerprint.cpp:14:42: error: ‘ServiceName’ is not a member of ‘sdbus’
   14 | static const auto MANAGER       = sdbus::ServiceName{"net.reactivated.Fprint.Manager"};
      |                                          ^~~~~~~~~~~
/home/adi/.cache/yay/hyprlock-git/src/hyprlock/src/core/Fingerprint.cpp:15:42: error: ‘ServiceName’ is not a member of ‘sdbus’
   15 | static const auto LOGIN_MANAGER = sdbus::ServiceName{"org.freedesktop.login1.Manager"};
      |                                          ^~~~~~~~~~~
/home/adi/.cache/yay/hyprlock-git/src/hyprlock/src/core/Fingerprint.cpp: In member function ‘std::shared_ptr<sdbus::IConnection> CFingerprint::start()’:
/home/adi/.cache/yay/hyprlock-git/src/hyprlock/src/core/Fingerprint.cpp:53:83: error: ‘ServiceName’ is not a member of ‘sdbus’
   53 |     m_sDBUSState.login      = sdbus::createProxy(*m_sDBUSState.connection, sdbus::ServiceName{"org.freedesktop.login1"}, sdbus::ObjectPath{"/org/freedesktop/login1"});
      |                                                                                   ^~~~~~~~~~~
/home/adi/.cache/yay/hyprlock-git/src/hyprlock/src/core/Fingerprint.cpp:54:25: error: ‘class sdbus::IProxy’ has no member named ‘getPropertyAsync’; did you mean ‘getProperty’?
   54 |     m_sDBUSState.login->getPropertyAsync("PreparingForSleep").onInterface(LOGIN_MANAGER).uponReplyInvoke([this](std::optional<sdbus::Error> e, sdbus::Variant preparingForSleep) {
      |                         ^~~~~~~~~~~~~~~~
      |                         getProperty
make[3]: *** [CMakeFiles/hyprlock.dir/build.make:135: CMakeFiles/hyprlock.dir/src/core/Fingerprint.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/Makefile2:87: CMakeFiles/hyprlock.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:94: CMakeFiles/hyprlock.dir/rule] Error 2
make: *** [Makefile:170: hyprlock] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: hyprlock-git-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
hyprlock-git - exit status 4

Am I doing something wrong elsewhere?

@Alessio-jpg
Copy link

Hello,
I was facing the same issue while building Hyprlock v0.6.0 (tried both sdbus v2.0.0 and v2.1.0) on Ubuntu 24.04.

Following the solution to this issue fixes the problem: hyprwm/hypridle#109

It seems to be a problem within the hypr ecosystem on Ubuntu.
I have no idea why the problem only shows up on Ubuntu and I have no other platforms to test things. I am running cmake version 3.28.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants