Bug 224180 - sysutils/osquery: fails to build with boost 1.66
Summary: sysutils/osquery: 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: Ryan Steinmetz
URL:
Keywords: needs-patch
Depends on: 225798
Blocks: 221547 223922
  Show dependency treegraph
 
Reported: 2017-12-08 15:49 UTC by Jan Beich
Modified: 2018-03-02 02:44 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (zi)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2017-12-08 15:49:23 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/sysutils/osquery
[...]
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/osquery/config/plugins/tls_config.cpp:26:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/osquery/remote/utility.h:17:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/osquery/remote/transports/tls.h:15:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/osquery/remote/http_client.h:16:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/third-party/beast/boost/beast/core.hpp:15:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/third-party/beast/boost/beast/core/async_result.hpp:14:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/third-party/beast/boost/beast/core/type_traits.hpp:15:
/wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/third-party/beast/boost/beast/core/detail/type_traits.hpp:28:7: error: definition of type 'io_service' conflicts with typedef of the same name
class io_service;
      ^
/usr/local/include/boost/asio/io_service.hpp:27:20: note: 'io_service' declared here
typedef io_context io_service;
                   ^
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/osquery/config/plugins/tls_config.cpp:26:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/osquery/remote/utility.h:17:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/osquery/remote/transports/tls.h:15:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/osquery/remote/http_client.h:16:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/third-party/beast/boost/beast/core.hpp:15:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/third-party/beast/boost/beast/core/async_result.hpp:14:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/third-party/beast/boost/beast/core/type_traits.hpp:15:
/wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.10.2/third-party/beast/boost/beast/core/detail/type_traits.hpp:37:1: error: too few template parameters in template redeclaration
template<class Buffer, class Buffers>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/asio/detail/consuming_buffers.hpp:53:1: note: previous template declaration is here
template <typename Buffer, typename Buffers, typename Buffer_Iterator>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

http://package23.nyi.freebsd.org/data/103i386-default-PR223922/2017-12-02_11h06m37s/logs/errors/osquery-2.10.2.log
http://package22.nyi.freebsd.org/data/103amd64-default-PR223922/2017-12-02_11h06m39s/logs/errors/osquery-2.10.2.log
http://package23.nyi.freebsd.org/data/111i386-default-PR223922/2017-12-03_09h31m14s/logs/errors/osquery-2.10.2.log
http://package22.nyi.freebsd.org/data/111amd64-default-PR223922/2017-12-03_09h31m05s/logs/errors/osquery-2.10.2.log
Comment 1 Jan Beich freebsd_committer freebsd_triage 2017-12-08 15:50:06 UTC
Maybe you can replace io_service with io_context similar to https://github.com/arvidn/libtorrent/commit/f42b63c7ea82
Comment 2 Jan Beich freebsd_committer freebsd_triage 2017-12-25 17:14:54 UTC
Maybe update to 2.11.1.
Comment 3 Ryan Steinmetz freebsd_committer freebsd_triage 2017-12-26 01:32:28 UTC
Dependencies are currently preventing successful build/testing:

[00:05:11] [01] [00:00:00] Building databases/rocksdb-lite | rocksdb-lite-5.9.2
[00:06:15] [01] [00:01:04] Finished databases/rocksdb-lite | rocksdb-lite-5.9.2: Failed: build
Comment 4 Jan Beich freebsd_committer freebsd_triage 2017-12-26 01:51:08 UTC
rocksdb-lite-5.9.2 is only broken on 10.*. Try more recent FreeBSD version or locally revert ports r456745 for testing.
Comment 5 Ryan Steinmetz freebsd_committer freebsd_triage 2017-12-27 16:49:49 UTC
Checking.
Comment 6 Ryan Steinmetz freebsd_committer freebsd_triage 2018-01-01 21:32:49 UTC
Still failing with 2.11.2:

  ^
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/osquery/extensions/interface.cpp:13:
In file included from /usr/include/c++/v1/string:470:
In file included from /usr/include/c++/v1/string_view:171:
In file included from /usr/include/c++/v1/__string:56:
In file included from /usr/include/c++/v1/algorithm:640:
/usr/include/c++/v1/memory:2172:15: error: no matching constructor for initialization of 'osquery::extensions::ExtensionClient'
              __second_(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...)
              ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/memory:2329:15: note: in instantiation of function template specialization 'std::__1::__libcpp_compressed_pair_imp<std::__1::allocator<osquery::extensions::ExtensionClient>, osquery::extensions::ExtensionClient, 1>::__libcpp_compressed_pair_imp<std::__1::allocator<osquery::extensions::ExtensionClient> &, std::__1::shared_ptr<apache::thrift::protocol::TProtocol> &, 0, 0>' requested here
            : base(__pc, _VSTD::move(__first_args), _VSTD::move(__second_args),
              ^
/usr/include/c++/v1/memory:3827:16: note: in instantiation of function template specialization 'std::__1::__compressed_pair<std::__1::allocator<osquery::extensions::ExtensionClient>, osquery::extensions::ExtensionClient>::__compressed_pair<std::__1::allocator<osquery::extensions::ExtensionClient> &, std::__1::shared_ptr<apache::thrift::protocol::TProtocol> &>' requested here
            :  __data_(piecewise_construct, _VSTD::forward_as_tuple(__a),
               ^
/usr/include/c++/v1/memory:4444:26: note: in instantiation of function template specialization 'std::__1::__shared_ptr_emplace<osquery::extensions::ExtensionClient, std::__1::allocator<osquery::extensions::ExtensionClient> >::__shared_ptr_emplace<std::__1::shared_ptr<apache::thrift::protocol::TProtocol> &>' requested here
    ::new(__hold2.get()) _CntrlBlk(__a2, _VSTD::forward<_Args>(__args)...);
                         ^
/usr/include/c++/v1/memory:4810:29: note: in instantiation of function template specialization 'std::__1::shared_ptr<osquery::extensions::ExtensionClient>::make_shared<std::__1::shared_ptr<apache::thrift::protocol::TProtocol> &>' requested here
    return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
                            ^
/wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/osquery/extensions/interface.cpp:365:20: note: in instantiation of function template specialization 'std::__1::make_shared<osquery::extensions::ExtensionClient, std::__1::shared_ptr<apache::thrift::protocol::TProtocol> &>' requested here
      client_(std::make_shared<extensions::ExtensionClient>(protocol_)) {
                   ^
generated/gen-cpp/Extension.h:351:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::__1::shared_ptr<apache::thrift::protocol::TProtocol>' to 'osquery::extensions::ExtensionClient' for 1st argument
class ExtensionClient : virtual public ExtensionIf {
      ^
generated/gen-cpp/Extension.h:351:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::__1::shared_ptr<apache::thrift::protocol::TProtocol>' to 'const osquery::extensions::ExtensionClient' for 1st argument
generated/gen-cpp/Extension.h:353:3: note: candidate constructor not viable: no known conversion from 'std::__1::shared_ptr<apache::thrift::protocol::TProtocol>' to 'boost::shared_ptr< ::apache::thrift::protocol::TProtocol>' for 1st argument
  ExtensionClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
  ^
generated/gen-cpp/Extension.h:356:3: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
  ExtensionClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) {
  ^
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/osquery/extensions/interface.cpp:13:
In file included from /usr/include/c++/v1/string:470:
In file included from /usr/include/c++/v1/string_view:171:
In file included from /usr/include/c++/v1/__string:56:
In file included from /usr/include/c++/v1/algorithm:640:
/usr/include/c++/v1/memory:2172:15: error: no matching constructor for initialization of 'osquery::extensions::ExtensionManagerClient'
              __second_(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...)
              ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/memory:2329:15: note: in instantiation of function template specialization 'std::__1::__libcpp_compressed_pair_imp<std::__1::allocator<osquery::extensions::ExtensionManagerClient>, osquery::extensions::ExtensionManagerClient, 1>::__libcpp_compressed_pair_imp<std::__1::allocator<osquery::extensions::ExtensionManagerClient> &, std::__1::shared_ptr<apache::thrift::protocol::TProtocol> &, 0, 0>' requested here
            : base(__pc, _VSTD::move(__first_args), _VSTD::move(__second_args),
              ^
/usr/include/c++/v1/memory:3827:16: note: in instantiation of function template specialization 'std::__1::__compressed_pair<std::__1::allocator<osquery::extensions::ExtensionManagerClient>, osquery::extensions::ExtensionManagerClient>::__compressed_pair<std::__1::allocator<osquery::extensions::ExtensionManagerClient> &, std::__1::shared_ptr<apache::thrift::protocol::TProtocol> &>' requested here
            :  __data_(piecewise_construct, _VSTD::forward_as_tuple(__a),
               ^
/usr/include/c++/v1/memory:4444:26: note: in instantiation of function template specialization 'std::__1::__shared_ptr_emplace<osquery::extensions::ExtensionManagerClient, std::__1::allocator<osquery::extensions::ExtensionManagerClient> >::__shared_ptr_emplace<std::__1::shared_ptr<apache::thrift::protocol::TProtocol> &>' requested here
    ::new(__hold2.get()) _CntrlBlk(__a2, _VSTD::forward<_Args>(__args)...);
                         ^
/usr/include/c++/v1/memory:4810:29: note: in instantiation of function template specialization 'std::__1::shared_ptr<osquery::extensions::ExtensionManagerClient>::make_shared<std::__1::shared_ptr<apache::thrift::protocol::TProtocol> &>' requested here
    return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
                            ^
/wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/osquery/extensions/interface.cpp:373:20: note: in instantiation of function template specialization 'std::__1::make_shared<osquery::extensions::ExtensionManagerClient, std::__1::shared_ptr<apache::thrift::protocol::TProtocol> &>' requested here
      client_(std::make_shared<extensions::ExtensionManagerClient>(protocol_)) {
                   ^
generated/gen-cpp/ExtensionManager.h:687:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::__1::shared_ptr<apache::thrift::protocol::TProtocol>' to 'osquery::extensions::ExtensionManagerClient' for 1st argument
class ExtensionManagerClient : virtual public ExtensionManagerIf, public ExtensionClient {
      ^
generated/gen-cpp/ExtensionManager.h:687:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::__1::shared_ptr<apache::thrift::protocol::TProtocol>' to 'const osquery::extensions::ExtensionManagerClient' for 1st argument
generated/gen-cpp/ExtensionManager.h:689:3: note: candidate constructor not viable: no known conversion from 'std::__1::shared_ptr<apache::thrift::protocol::TProtocol>' to 'boost::shared_ptr< ::apache::thrift::protocol::TProtocol>' for 1st argument
  ExtensionManagerClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) :
  ^
generated/gen-cpp/ExtensionManager.h:691:3: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
  ExtensionManagerClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) :    ExtensionClient(iprot, oprot) {}
  ^
7 errors generated.
Comment 7 Ryan Steinmetz freebsd_committer freebsd_triage 2018-01-01 21:33:04 UTC
Reaching out to osquery devs.
Comment 8 Ryan Steinmetz freebsd_committer freebsd_triage 2018-01-02 20:26:43 UTC
osquery now requires thrift >=0.11.0.  Will see if I can get the other maintainer of devel/thrift to update.
Comment 9 Yuri Victorovich freebsd_committer freebsd_triage 2018-02-03 01:30:06 UTC
(In reply to Ryan Steinmetz from comment #8)

Any progress on this?
Comment 10 Walter Schwarzenfeld 2018-02-09 19:37:33 UTC
https://github.com/facebook/osquery/releases/tag/2.11.1
Comment 11 David Thiel freebsd_committer freebsd_triage 2018-02-09 19:52:19 UTC
Has anyone else had luck in contacting the thrift maintainer? I haven't heard back.
Comment 12 Ryan Steinmetz freebsd_committer freebsd_triage 2018-02-09 19:55:31 UTC
(In reply to David Thiel from comment #11)
No luck here either.
Comment 13 David Thiel freebsd_committer freebsd_triage 2018-02-09 20:20:53 UTC
Ok, I'll test all the thrift subports with 0.11.1. Should I submit a PR, or shall we consider the lack of response thus far as being a maintainer timeout?
Comment 14 Ryan Steinmetz freebsd_committer freebsd_triage 2018-02-10 00:57:22 UTC
(In reply to David Thiel from comment #13)
I think technically there is supposed to be a PR for a timeout to occur.
Comment 15 Ryan Steinmetz freebsd_committer freebsd_triage 2018-02-25 15:22:29 UTC
Testing 2.11.2 now.
Comment 16 Ryan Steinmetz freebsd_committer freebsd_triage 2018-02-27 15:57:34 UTC
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/osquery/config/plugins/tls_config.cpp:26:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/osquery/remote/utility.h:17:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/osquery/remote/transports/tls.h:15:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/osquery/remote/http_client.h:16:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/third-party/beast/boost/beast/core.hpp:15:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/third-party/beast/boost/beast/core/async_result.hpp:14:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/third-party/beast/boost/beast/core/type_traits.hpp:15:
/wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/third-party/beast/boost/beast/core/detail/type_traits.hpp:28:7: error: definition of type 'io_service' conflicts with typedef of the same name
class io_service;
      ^
/usr/local/include/boost/asio/io_service.hpp:27:20: note: 'io_service' declared here
typedef io_context io_service;
                   ^
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/osquery/config/plugins/tls_config.cpp:26:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/osquery/remote/utility.h:17:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/osquery/remote/transports/tls.h:15:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/osquery/remote/http_client.h:16:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/third-party/beast/boost/beast/core.hpp:15:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/third-party/beast/boost/beast/core/async_result.hpp:14:
In file included from /wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/third-party/beast/boost/beast/core/type_traits.hpp:15:
/wrkdirs/usr/ports/sysutils/osquery/work/osquery-2.11.2/third-party/beast/boost/beast/core/detail/type_traits.hpp:37:1: error: too few template parameters in template redeclaration
template<class Buffer, class Buffers>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/asio/detail/consuming_buffers.hpp:71:1: note: previous template declaration is here
template <typename Buffer, typename Buffers, typename Buffer_Iterator>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.


root@104R-test:~ # pkg info|grep boos
boost-libs-1.66.0              Free portable C++ libraries (without Boost.Python)
root@104R-test:~ # pkg info | grep thrif
thrift-0.11.0,1                Framework for scalable cross-language services development
thrift-cpp-0.11.0,1            C++ interface to Thrift
Comment 17 David Thiel freebsd_committer freebsd_triage 2018-02-27 18:22:46 UTC
I believe that's the third-party beast clashing with Boost 1.66.

https://github.com/facebook/osquery/pull/3876
Comment 18 David Thiel freebsd_committer freebsd_triage 2018-03-01 23:50:21 UTC
It builds if you remove the rule for third-party/beast from CMakeLists.txt. The devs will remove that from the distributed version in the 3.x stable release, but we should patch it out for now.
Comment 19 Ryan Steinmetz freebsd_committer freebsd_triage 2018-03-02 02:41:18 UTC
(In reply to David Thiel from comment #18)
Thanks David.
Comment 20 commit-hook freebsd_committer freebsd_triage 2018-03-02 02:44:23 UTC
A commit references this bug:

Author: zi
Date: Fri Mar  2 02:43:50 UTC 2018
New revision: 463364
URL: https://svnweb.freebsd.org/changeset/ports/463364

Log:
  - Update to 2.11.2

  PR:		224180

Changes:
  head/sysutils/osquery/Makefile
  head/sysutils/osquery/distinfo
  head/sysutils/osquery/files/patch-CMakeLists.txt