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

Makefile and meson differences #95

Open
Frontear opened this issue Sep 14, 2023 · 8 comments
Open

Makefile and meson differences #95

Frontear opened this issue Sep 14, 2023 · 8 comments

Comments

@Frontear
Copy link

Frontear commented Sep 14, 2023

  • Makefile does not enforce runtime dependency sdbus-cpp
  • Makefile will not include /usr/share/pkgconfig/hyprland-protocols.pc
  • Makefile will not include /usr/share/hyprland-protocols
@vaxerski
Copy link
Member

shouldn't sdbus-cpp be statically linked with da makefile?

@Frontear
Copy link
Author

afaik i dont see it. ran make in a clean chroot without sdbus and the code compiled without a hitch

@vaxerski
Copy link
Member

well because sdbus-cpp is a subproject. CMake uses that, Meson uses a dep (because nix)

@timblaktu
Copy link

Re: "Makefile does not enforce runtime dependency sdbus-cpp".. build succeeds for me after separately installing the missing dependency sdbus-cpp-git.

@Frontear
Copy link
Author

well because sdbus-cpp is a subproject. CMake uses that, Meson uses a dep (because nix)

I reckon though at least the Makefile should include those other files. I dont know their importance because the portal works fine without them, but for parity sake

@LaptopDev
Copy link

thanks for pointing this out, in fedora meson worked for me:

meson builddir
ninja -C builddir

@maxwelljens
Copy link

thanks for pointing this out, in fedora meson worked for me:

meson builddir
ninja -C builddir

I have Fedora 38. Tried the above, but upon ninja -C builddir I get the following error:

FAILED: src/xdg-desktop-portal-hyprland.p/core_PortalManager.cpp.o
c++ -Isrc/xdg-desktop-portal-hyprland.p -Isrc -I../src -I. -I.. -Iprotocols -I../protocols -I/usr/include/libdrm -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O3 -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -Wno-unused-parameter -Wno-unused-value -fpermissive -std=c++23 -pthread -D_REENTRANT -MD -MQ src/xdg-desktop-portal-hyprland.p/core_PortalManager.cpp.o -MF src/xdg-desktop-portal-hyprland.p/core_PortalManager.cpp.o.d -o src/xdg-desktop-portal-hyprland.p/core_PortalManager.cpp.o -c ../src/core/PortalManager.cpp
In file included from ../src/core/PortalManager.cpp:1:
../src/core/PortalManager.hpp:84:14: error: ‘condition_variable’ in namespace ‘std’ does not name a type
   84 |         std::condition_variable loopSignal;
      |              ^~~~~~~~~~~~~~~~~~
../src/core/PortalManager.hpp:15:1: note: ‘std::condition_variable’ is defined in header ‘<condition_variable>’; did you forget to ‘#include <condition_variable>’?
   14 | #include <mutex>
  +++ |+#include <condition_variable>
   15 |
../src/core/PortalManager.hpp:86:33: error: field ‘shouldProcess’ has incomplete type ‘std::atomic<bool>’
   86 |         std::atomic<bool>       shouldProcess = false;
      |                                 ^~~~~~~~~~~~~
In file included from /usr/include/c++/13/bits/shared_ptr_atomic.h:33,
                 from /usr/include/c++/13/memory:81,
                 from ../src/core/PortalManager.hpp:3:
/usr/include/c++/13/bits/atomic_base.h:174:12: note: declaration of ‘class std::atomic<bool>’
  174 |     struct atomic;
      |            ^~~~~~
../src/core/PortalManager.hpp:91:14: error: ‘condition_variable’ in namespace ‘std’ does not name a type
   91 |         std::condition_variable              loopSignal;
      |              ^~~~~~~~~~~~~~~~~~
../src/core/PortalManager.hpp:91:9: note: ‘std::condition_variable’ is defined in header ‘<condition_variable>’; did you forget to ‘#include <condition_variable>’?
   91 |         std::condition_variable              loopSignal;
      |         ^~~
../src/core/PortalManager.hpp:95:30: error: ‘thread’ is not a member of ‘std’
   95 |         std::unique_ptr<std::thread>         thread;
      |                              ^~~~~~
../src/core/PortalManager.hpp:15:1: note: ‘std::thread’ is defined in header ‘<thread>’; did you forget to ‘#include <thread>’?
   14 | #include <mutex>
  +++ |+#include <thread>
   15 |
../src/core/PortalManager.hpp:95:36: error: template argument 1 is invalid
   95 |         std::unique_ptr<std::thread>         thread;
      |                                    ^
../src/core/PortalManager.hpp:95:36: error: template argument 2 is invalid
../src/core/PortalManager.hpp:95:14: error: ‘<expression error>’ in namespace ‘std’ does not name a type
   95 |         std::unique_ptr<std::thread>         thread;
      |              ^~~~~~~~~~~~~~~~~~~~~~~
../src/core/PortalManager.cpp: In lambda function:
../src/core/PortalManager.cpp:339:39: error: ‘struct CPortalManager::<unnamed>’ has no member named ‘loopSignal’
  339 |                 m_sEventLoopInternals.loopSignal.notify_all();
      |                                       ^~~~~~~~~~
../src/core/PortalManager.cpp: In member function ‘void CPortalManager::startEventLoop()’:
../src/core/PortalManager.cpp:344:21: error: ‘struct CPortalManager::<unnamed>’ has no member named ‘thread’
  344 |     m_sTimersThread.thread = std::make_unique<std::thread>([this] {
      |                     ^~~~~~
../src/core/PortalManager.cpp: In lambda function:
../src/core/PortalManager.cpp:358:29: error: ‘struct CPortalManager::<unnamed>’ has no member named ‘loopSignal’
  358 |             m_sTimersThread.loopSignal.wait_for(lk, std::chrono::milliseconds((int)nearest), [this] { return m_sTimersThread.shouldProcess; });
      |                             ^~~~~~~~~~
../src/core/PortalManager.cpp:379:39: error: ‘struct CPortalManager::<unnamed>’ has no member named ‘loopSignal’
  379 |                 m_sEventLoopInternals.loopSignal.notify_all();
      |                                       ^~~~~~~~~~
../src/core/PortalManager.cpp: In member function ‘void CPortalManager::startEventLoop()’:
../src/core/PortalManager.cpp:390:35: error: ‘struct CPortalManager::<unnamed>’ has no member named ‘loopSignal’
  390 |             m_sEventLoopInternals.loopSignal.wait(lk, [this] { return m_sEventLoopInternals.shouldProcess == true; }); // wait for events
      |                                   ^~~~~~~~~~
../src/core/PortalManager.cpp:455:21: error: ‘struct CPortalManager::<unnamed>’ has no member named ‘thread’
  455 |     m_sTimersThread.thread.release();
      |                     ^~~~~~
../src/core/PortalManager.cpp: In member function ‘void CPortalManager::addTimer(const CTimer&)’:
../src/core/PortalManager.cpp:517:21: error: ‘struct CPortalManager::<unnamed>’ has no member named ‘loopSignal’
  517 |     m_sTimersThread.loopSignal.notify_all();
      |                     ^~~~~~~~~~
../src/core/PortalManager.cpp: In member function ‘void CPortalManager::terminate()’:
../src/core/PortalManager.cpp:530:31: error: ‘struct CPortalManager::<unnamed>’ has no member named ‘loopSignal’
  530 |         m_sEventLoopInternals.loopSignal.notify_all();
      |                               ^~~~~~~~~~
../src/core/PortalManager.cpp:534:21: error: ‘struct CPortalManager::<unnamed>’ has no member named ‘loopSignal’
  534 |     m_sTimersThread.loopSignal.notify_all();
      |                     ^~~~~~~~~~
[25/32] Compiling C++ object src/xdg-desktop-portal-hyprland.p/shared_Session.cpp.o
FAILED: src/xdg-desktop-portal-hyprland.p/shared_Session.cpp.o
c++ -Isrc/xdg-desktop-portal-hyprland.p -Isrc -I../src -I. -I.. -Iprotocols -I../protocols -I/usr/include/libdrm -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O3 -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -Wno-unused-parameter -Wno-unused-value -fpermissive -std=c++23 -pthread -D_REENTRANT -MD -MQ src/xdg-desktop-portal-hyprland.p/shared_Session.cpp.o -MF src/xdg-desktop-portal-hyprland.p/shared_Session.cpp.o.d -o src/xdg-desktop-portal-hyprland.p/shared_Session.cpp.o -c ../src/shared/Session.cpp
In file included from ../src/shared/Session.cpp:2:
../src/shared/../core/PortalManager.hpp:84:14: error: ‘condition_variable’ in namespace ‘std’ does not name a type
   84 |         std::condition_variable loopSignal;
      |              ^~~~~~~~~~~~~~~~~~
../src/shared/../core/PortalManager.hpp:15:1: note: ‘std::condition_variable’ is defined in header ‘<condition_variable>’; did you forget to ‘#include <condition_variable>’?
   14 | #include <mutex>
  +++ |+#include <condition_variable>
   15 |
../src/shared/../core/PortalManager.hpp:86:33: error: field ‘shouldProcess’ has incomplete type ‘std::atomic<bool>’
   86 |         std::atomic<bool>       shouldProcess = false;
      |                                 ^~~~~~~~~~~~~
In file included from /usr/include/c++/13/bits/shared_ptr_atomic.h:33,
                 from /usr/include/c++/13/memory:81,
                 from /usr/include/sdbus-c++/TypeTraits.h:36,
                 from /usr/include/sdbus-c++/IConnection.h:30,
                 from /usr/include/sdbus-c++/sdbus-c++.h:27,
                 from ../src/shared/Session.hpp:3,
                 from ../src/shared/Session.cpp:1:
/usr/include/c++/13/bits/atomic_base.h:174:12: note: declaration of ‘class std::atomic<bool>’
  174 |     struct atomic;
      |            ^~~~~~
../src/shared/../core/PortalManager.hpp:91:14: error: ‘condition_variable’ in namespace ‘std’ does not name a type
   91 |         std::condition_variable              loopSignal;
      |              ^~~~~~~~~~~~~~~~~~
../src/shared/../core/PortalManager.hpp:91:9: note: ‘std::condition_variable’ is defined in header ‘<condition_variable>’; did you forget to ‘#include <condition_variable>’?
   91 |         std::condition_variable              loopSignal;
      |         ^~~
../src/shared/../core/PortalManager.hpp:95:30: error: ‘thread’ is not a member of ‘std’
   95 |         std::unique_ptr<std::thread>         thread;
      |                              ^~~~~~
../src/shared/../core/PortalManager.hpp:15:1: note: ‘std::thread’ is defined in header ‘<thread>’; did you forget to ‘#include <thread>’?
   14 | #include <mutex>
  +++ |+#include <thread>
   15 |
../src/shared/../core/PortalManager.hpp:95:36: error: template argument 1 is invalid
   95 |         std::unique_ptr<std::thread>         thread;
      |                                    ^
../src/shared/../core/PortalManager.hpp:95:36: error: template argument 2 is invalid
../src/shared/../core/PortalManager.hpp:95:14: error: ‘<expression error>’ in namespace ‘std’ does not name a type
   95 |         std::unique_ptr<std::thread>         thread;
      |              ^~~~~~~~~~~~~~~~~~~~~~~
[30/32] Compiling C++ object hyprland-share-picker/hyprland-share-picker.p/main.cpp.o
ninja: build stopped: subcommand failed.

@cgevans
Copy link

cgevans commented Feb 22, 2024

I have Fedora 38. Tried the above, but upon ninja -C builddir I get the following error:

That may be related to #191 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants