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

error: ‘copy_n’ is not a member of ‘std’; did you mean ‘copy’? #267

Open
goldyfruit opened this issue Sep 24, 2024 · 6 comments

Comments

@goldyfruit
Copy link

goldyfruit commented Sep 24, 2024

I'm running openSUSE Tumbleweed with GCC 14.2.

┌─[goldyfruit@x270] - [~/Development/xdg-desktop-portal-hyprland] - [Tue Sep 24, 11:16]
└─[$] <git:(master)> cmake --build build                                                           

[  2%] Building CXX object subprojects/sdbus-cpp/CMakeFiles/sdbus-c++-objlib.dir/src/Connection.cpp.o
In file included from /home/goldyfruit/Development/xdg-desktop-portal-hyprland/subprojects/sdbus-cpp/src/Connection.h:31,
                 from /home/goldyfruit/Development/xdg-desktop-portal-hyprland/subprojects/sdbus-cpp/src/Connection.cpp:27:
/home/goldyfruit/Development/xdg-desktop-portal-hyprland/subprojects/sdbus-cpp/include/sdbus-c++/Message.h: In member function ‘void sdbus::Message::deserializeArrayFast(_Array&)’:
/home/goldyfruit/Development/xdg-desktop-portal-hyprland/subprojects/sdbus-cpp/include/sdbus-c++/Message.h:490:14: error: ‘copy_n’ is not a member of ‘std’; did you mean ‘copy’?
  490 |         std::copy_n(arrayPtr, elementsInMsg, items.begin());
      |              ^~~~~~
      |              copy
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-address-of-temporary’ may have been intended to silence earlier diagnostics
gmake[2]: *** [subprojects/sdbus-cpp/CMakeFiles/sdbus-c++-objlib.dir/build.make:76: subprojects/sdbus-cpp/CMakeFiles/sdbus-c++-objlib.dir/src/Connection.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:243: subprojects/sdbus-cpp/CMakeFiles/sdbus-c++-objlib.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2

Not sure if its a compiler issue or something else.

@vaxerski
Copy link
Member

something's up with sdbus-cpp. We use a quite outdated version, maybe I should finally update.

@goldyfruit
Copy link
Author

something's up with sdbus-cpp. We use a quite outdated version, maybe I should finally update.

Not sure if it helps but here is the version installed on openSUSE Tumbleweed.

libsdbus-c++1-1.6.0-1.1.x86_64

@vaxerski
Copy link
Member

vaxerski commented Sep 24, 2024

IIRC we use 1.3 tho 1.6 should work too?

@goldyfruit
Copy link
Author

IIRC we use 1.3 tho 1.6 should work too?

Except if a param/feature/option got deprecated/removed I guess.

@Masber
Copy link

Masber commented Oct 12, 2024

Hi, I am having the same issue, using Ubuntu 24.10

@Masber
Copy link

Masber commented Oct 12, 2024

This solved this issue for me in Ubuntu 24.10

sudo apt install libsdbus-c++-bin libsdbus-c++-dev libsdbus-c++1 libsdbus-c++-doc

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

3 participants