Bug 224123 - games/pokerth: fails to build with boost 1.66
Summary: games/pokerth: fails to build with boost 1.66
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Guido Falsi
URL:
Keywords: needs-patch
Depends on:
Blocks: 223922
  Show dependency treegraph
 
Reported: 2017-12-05 19:06 UTC by Jan Beich
Modified: 2017-12-31 13:31 UTC (History)
1 user (show)

See Also:
madpilot: maintainer-feedback+


Attachments
Proposed fix (4.05 KB, patch)
2017-12-14 09:29 UTC, Guido Falsi
no flags Details | Diff
Upstream fix (2.54 KB, patch)
2017-12-30 09:53 UTC, Guido Falsi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2017-12-05 19:06:50 UTC
As part of exp-run in bug 223922 this port was found to break on Boost update. If the issue won't disappear on its own by Boost release I plan to mark the port as BROKEN. Can you check with upstream maintainer or help with a fix?

$ fetch -qo- 'https://reviews.freebsd.org/D13279?download=true' | patch -Efsp0 -d /usr/ports
$ make all deinstall install clean -C/usr/ports/devel/boost-libs
$ make -C/usr/ports/games/pokerth
[...]
src/third_party/websocketpp/websocketpp/transport/asio/connection.hpp:422:45: error: use of class template 'boost::asio::strand' requires template arguments
            m_strand.reset(new boost::asio::strand(*io_service));
                                            ^
/usr/local/include/boost/asio/strand.hpp:29:7: note: template is declared here
class strand
      ^

http://package23.nyi.freebsd.org/data/103i386-default-PR223922/2017-12-02_11h06m37s/logs/errors/pokerth-1.1.1_17.log
http://package22.nyi.freebsd.org/data/103amd64-default-PR223922/2017-12-02_11h06m39s/logs/errors/pokerth-1.1.1_17.log
http://package22.nyi.freebsd.org/data/111amd64-default-PR223922/2017-12-03_09h31m05s/logs/errors/pokerth-1.1.1_17.log
http://package23.nyi.freebsd.org/data/111i386-default-PR223922/2017-12-03_09h31m14s/logs/errors/pokerth-1.1.1_17.log
Comment 1 Jan Beich freebsd_committer 2017-12-05 19:13:34 UTC
Maybe you can replace io_service with io_context similar to https://github.com/arvidn/libtorrent/commit/f42b63c7ea82
Comment 2 Guido Falsi freebsd_committer 2017-12-05 19:34:38 UTC
Hi,

Thanks for the information, I'll be looking at it.

Unluckily I won't be able to really do much about this before the weekend.

But I'm definitely going to look at this.
Comment 3 Guido Falsi freebsd_committer 2017-12-13 00:03:22 UTC
I did create a patch, but right now I'm unable to test it because pokerth is broken by the recent devel/protobuf update.

I'm investigating that too.
Comment 4 Guido Falsi freebsd_committer 2017-12-14 09:29:38 UTC
Created attachment 188819 [details]
Proposed fix

I created a patch which compiles fine with the current ports tree.

I'm not completely sure it's correct for new boost though.

I still have to test it with the new boost patch applied.
Comment 5 Jan Beich freebsd_committer 2017-12-15 01:07:02 UTC
Comment on attachment 188819 [details]
Proposed fix

Not enough, tested against Boost 1.66.0 rc2.

src/third_party/websocketpp/websocketpp/transport/asio/connection.hpp:430:32: error: no type named 'strand' in namespace 'boost::asio'; did you mean 'boost::asio::detail::executor_memfns_derived<io_context>::strand'?
            m_strand.reset(new boost::asio::strand(*io_service));
                               ^~~~~~~~~~~~~~~~~~~
                               boost::asio::detail::executor_memfns_derived<io_context>::strand
/usr/local/include/boost/asio/io_context_strand.hpp:89:19: note: 'boost::asio::detail::executor_memfns_derived<io_context>::strand' declared here
class io_context::strand
                  ^
src/net/common/clientthread.cpp:990:3: error: no member named 'non_blocking_io' in 'boost::asio::socket_base'; did you mean 'boost::asio::basic_socket<tcp>::non_blocking'?
                boost::asio::socket_base::non_blocking_io command(true);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                boost::asio::basic_socket<tcp>::non_blocking
/usr/local/include/boost/asio/basic_socket.hpp:1154:8: note: 'boost::asio::basic_socket<tcp>::non_blocking' declared here
  bool non_blocking() const
       ^

10.3 i386 build log  - https://clbin.com/VIMo1
11.1 amd64 build log - https://clbin.com/TV8L3
Comment 6 Guido Falsi freebsd_committer 2017-12-28 13:56:06 UTC
There is a new version of pokerth available which has good chances of fixing this issue.

I have committed it in r457460 [1].

Could you test with that one without additional changes?

Thanks in advance!



[1] https://svnweb.freebsd.org/ports?view=revision&revision=457460
Comment 7 Jan Beich freebsd_committer 2017-12-28 17:58:02 UTC
No joy with pokerth-1.1.2.

10.3 amd64 - https://ptpb.pw/-y56
10.3 i386  - https://ptpb.pw/M0yn
11.1 amd64 - https://ptpb.pw/awP8
11.1 i386  - https://ptpb.pw/J-C9
12.0 amd64 - https://ptpb.pw/jhxF

src/net/common/clientthread.cpp:996:3: error: no member named 'non_blocking_io' in 'boost::asio::socket_base'; did you mean 'boost::asio::basic_socket<tcp>::non_blocking'?
                boost::asio::socket_base::non_blocking_io command(true);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                boost::asio::basic_socket<tcp>::non_blocking
/usr/local/include/boost/asio/basic_socket.hpp:1154:8: note: 'boost::asio::basic_socket<tcp>::non_blocking' declared here
  bool non_blocking() const
       ^
src/net/common/clientthread.cpp:996:29: error: call to non-static member function without an object argument
                boost::asio::socket_base::non_blocking_io command(true);
                ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
src/net/common/clientthread.cpp:997:23: error: use of undeclared identifier 'command'
                newSock->io_control(command);
                                    ^
3 errors generated.
Comment 8 Guido Falsi freebsd_committer 2017-12-28 19:21:28 UTC
(In reply to Jan Beich from comment #7)
> No joy with pokerth-1.1.2.
> 
> 10.3 amd64 - https://ptpb.pw/-y56
> 10.3 i386  - https://ptpb.pw/M0yn
> 11.1 amd64 - https://ptpb.pw/awP8
> 11.1 i386  - https://ptpb.pw/J-C9
> 12.0 amd64 - https://ptpb.pw/jhxF
> 
> src/net/common/clientthread.cpp:996:3: error: no member named
> 'non_blocking_io' in 'boost::asio::socket_base'; did you mean
> 'boost::asio::basic_socket<tcp>::non_blocking'?
>                 boost::asio::socket_base::non_blocking_io command(true);
>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>                 boost::asio::basic_socket<tcp>::non_blocking
> /usr/local/include/boost/asio/basic_socket.hpp:1154:8: note:
> 'boost::asio::basic_socket<tcp>::non_blocking' declared here
>   bool non_blocking() const
>        ^
> src/net/common/clientthread.cpp:996:29: error: call to non-static member
> function without an object argument
>                 boost::asio::socket_base::non_blocking_io command(true);
>                 ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
> src/net/common/clientthread.cpp:997:23: error: use of undeclared identifier
> 'command'
>                 newSock->io_control(command);
>                                     ^
> 3 errors generated.

This looks slightly better though.

The websocketpp part is not spitting errors now, so this is a different issue.
Comment 9 Guido Falsi freebsd_committer 2017-12-30 09:53:28 UTC
Created attachment 189215 [details]
Upstream fix

I have imported the fixes suggested upstream. Thanks for the pointer!

I wrapped them in ifdefs. These should work fine.
Comment 10 Jan Beich freebsd_committer 2017-12-30 10:24:46 UTC
Comment on attachment 189215 [details]
Upstream fix

I confirm, this fixes the build with Boost 1.66.

10.3 amd64 - http://tpaste.us/L6va
10.3 i386  - http://tpaste.us/ZPVa
11.1 amd64 - http://tpaste.us/lWMX
11.1 i386  - http://tpaste.us/dVjy
12.0 amd64 - http://tpaste.us/4q04
Comment 11 Guido Falsi freebsd_committer 2017-12-30 10:29:11 UTC
(In reply to Jan Beich from comment #10)
> Comment on attachment 189215 [details]
> Upstream fix
> 
> I confirm, this fixes the build with Boost 1.66.
> 

Great!

Thanks you for the testing.

I'll test it a little more and commit to the tree, since it's actually a noop at present. So this PR can be closed.
Comment 12 commit-hook freebsd_committer 2017-12-31 13:29:37 UTC
A commit references this bug:

Author: madpilot
Date: Sun Dec 31 13:28:37 UTC 2017
New revision: 457690
URL: https://svnweb.freebsd.org/changeset/ports/457690

Log:
  Add patches to fix pokerth build with upcoming boost 1.66.

  This is a NOP with the current boost version.

  PR:		224123
  Submitted by:	jbeich@
  Obtained from:	https://github.com/pokerth/pokerth/issues/338

Changes:
  head/games/pokerth/files/patch-src_net_common_clientthread.cpp
  head/games/pokerth/files/patch-src_net_serveraccepthelper.h
Comment 13 Guido Falsi freebsd_committer 2017-12-31 13:31:11 UTC
Patch committed to the tree.

Thanks for you help and support!