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

Compilation failure with 1.83 #70

Closed
SoapGentoo opened this issue Sep 10, 2023 · 7 comments
Closed

Compilation failure with 1.83 #70

SoapGentoo opened this issue Sep 10, 2023 · 7 comments

Comments

@SoapGentoo
Copy link

We're seeing one specific failure of Boost.Signals2 in our Gentoo package tree: Bug 912309

This code used to compile fine under Boost 1.82. The offending line is:

stanzaChannel_->onPresenceReceived.disconnect(boost::ref(onPresenceReceived));

here stanzaChannel_->onPresenceReceived is of type boost::signals2::signal<void (std::shared_ptr<Message>)> and the onPresenceReceived argument on the right-hand side is of type boost::signals2::signal<void (std::shared_ptr<Message>)> too. The error boils down to an ambiguous overload

/usr/include/boost/function_equal.hpp:17:14: error: no match for 'operator==' (operand types are 'const boost::reference_wrapper<boost::signals2::signal<void(std::shared_ptr<Swift::Presence>)> >' and 'const boost::reference_wrapper<boost::signals2::signal<void(std::shared_ptr<Swift::Presence>)> >')
   17 |   { return f == g; }
      | 

Do you have any ideas or guidance that could help us fix this locally? Upstream seems mostly gone, and this is the last bug for us in Boost 1.83. Paging in @pdimov who recommended I file a bug here.

@fmhess
Copy link
Collaborator

fmhess commented Sep 15, 2023

To fix, you'd need to patch boost.function and boost.signals2 from development, or wait for boost 1.84, or compile against a version of the c++ standard which is not c++20

@SoapGentoo
Copy link
Author

@fmhess thanks, could you point me to the commits that purport to fix this? I can try them locally, since boost 1.84 is still some time away

@ConiKost
Copy link

ConiKost commented Oct 4, 2023

@fmhess ping. Could you please have a look, which commits are needed for fix? Thank you!

@thesamesam
Copy link

Ping

@SoapGentoo
Copy link
Author

Unfortunately, the code still fails with boost 1.84 😢

@fmhess
Copy link
Collaborator

fmhess commented Dec 30, 2023

Ok, I fixed disconnection by slots which are signals, and slots which are wrapped in a boost::reference_wrapper. The fix is on the develop branch with the following two commits:

commit 2ba258f
commit 4d994bb

@ConiKost
Copy link

I can confirm, that appliying those patches against boost-1.83 (haven't tested boost-1.84), makes it compiling again.

gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Jan 1, 2024
@fmhess fmhess closed this as completed May 31, 2024
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

4 participants