Bug 224827 - devel/RStudio: fails to build with boost 1.66
Summary: devel/RStudio: 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: Yuri Victorovich
URL: https://reviews.freebsd.org/D13748
Keywords: needs-patch
Depends on:
Blocks: 223922
  Show dependency treegraph
 
Reported: 2018-01-01 19:27 UTC by Jan Beich
Modified: 2018-01-07 20:51 UTC (History)
2 users (show)

See Also:
jbeich: maintainer-feedback? (yuri)


Attachments
patch (1.68 KB, patch)
2018-01-03 17:22 UTC, Yuri Victorovich
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 freebsd_triage 2018-01-01 19:27:34 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 on update 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/devel/RStudio
[...]
src/cpp/core/BoostErrors.cpp:151:47: error: use of undeclared identifier 'get_system_category'; did you mean 'system_category'?
      return error_code(e.get_native_error(), get_system_category()) ;
                                              ^~~~~~~~~~~~~~~~~~~
                                              system_category
/usr/local/include/boost/system/error_code.hpp:196:47: note: 'system_category' declared here
    BOOST_SYSTEM_DECL const error_category &  system_category() BOOST_SYSTEM_NOEXCEPT;
                                              ^
src/cpp/core/Error.cpp:168:35: error: use of undeclared identifier 'get_system_category'; did you mean 'system_category'?
   return Error(error_code(value, get_system_category()), location);
                                  ^~~~~~~~~~~~~~~~~~~
                                  system_category
/usr/local/include/boost/system/error_code.hpp:196:47: note: 'system_category' declared here
    BOOST_SYSTEM_DECL const error_category &  system_category() BOOST_SYSTEM_NOEXCEPT;
                                              ^
src/cpp/core/Error.cpp:176:35: error: use of undeclared identifier 'get_system_category'; did you mean 'system_category'?
   return Error(error_code(value, get_system_category()), cause, location);
                                  ^~~~~~~~~~~~~~~~~~~
                                  system_category
/usr/local/include/boost/system/error_code.hpp:196:47: note: 'system_category' declared here
    BOOST_SYSTEM_DECL const error_category &  system_category() BOOST_SYSTEM_NOEXCEPT;
                                              ^

build log: https://clbin.com/Fw29i
Comment 1 Jan Beich freebsd_committer freebsd_triage 2018-01-01 19:35:58 UTC
Regressed by https://github.com/boostorg/system/commit/829a1320a7be
Comment 2 Jan Beich freebsd_committer freebsd_triage 2018-01-01 19:38:18 UTC
In file included from src/cpp/monitor/MonitorClient.cpp:18:
src/cpp/monitor/include/monitor/MonitorClient.hpp:34:10: 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;
                   ^

Regressed by: https://github.com/boostorg/asio/commit/b60e92b13ef6
Example fix: https://github.com/arvidn/libtorrent/commit/f42b63c7ea82
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2018-01-01 19:44:03 UTC
I created the upstream ticket.
Comment 4 Jan Beich freebsd_committer freebsd_triage 2018-01-01 19:50:12 UTC
Thanks. Here's another error (similer to comment 2).

In file included from src/cpp/session/SessionConsoleProcessApi.cpp:16:
In file included from src/cpp/session/SessionConsoleProcessApi.hpp:19:
In file included from src/cpp/session/include/session/SessionConsoleProcess.hpp:30:
In file included from src/cpp/session/include/session/SessionConsoleProcessSocket.hpp:31:
In file included from src/cpp/ext/websocketpp/config/asio_no_tls.hpp:32:
In file included from src/cpp/ext/websocketpp/transport/asio/endpoint.hpp:32:
src/cpp/ext/websocketpp/transport/asio/connection.hpp:425:24: error: no matching function for call to 'make_shared'
            m_strand = lib::make_shared<boost::asio::strand>(
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/smart_ptr/make_shared_object.hpp:346:52: note: candidate template ignored: invalid explicitly-specified argument for template parameter 'T'
typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1 )
                                                   ^
/usr/local/include/boost/smart_ptr/make_shared_array.hpp:25:1: note: candidate template ignored: invalid explicitly-specified argument for template parameter 'T'
make_shared(const typename detail::sp_array_element<T>::type& value)
^
/usr/local/include/boost/smart_ptr/make_shared_array.hpp:33:1: note: candidate template ignored: invalid explicitly-specified argument for template parameter 'T'
make_shared(std::size_t size)
^
/usr/local/include/boost/smart_ptr/make_shared_object.hpp:309:72: note: candidate function template not viable: requires 0 arguments, but 1 was provided
template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared()
                                                                       ^
/usr/local/include/boost/smart_ptr/make_shared_object.hpp:388:52: note: candidate function template not viable: requires 2 arguments, but 1 was provided
typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2 )
                                                   ^
/usr/local/include/boost/smart_ptr/make_shared_object.hpp:432:52: note: candidate function template not viable: requires 3 arguments, but 1 was provided
typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3 )
                                                   ^
/usr/local/include/boost/smart_ptr/make_shared_object.hpp:478:52: note: candidate function template not viable: requires 4 arguments, but 1 was provided
typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4 )
                                                   ^
/usr/local/include/boost/smart_ptr/make_shared_object.hpp:526:52: note: candidate function template not viable: requires 5 arguments, but 1 was provided
typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4, BOOST_FWD_REF(A5) a5 )
                                                   ^
/usr/local/include/boost/smart_ptr/make_shared_object.hpp:576:52: note: candidate function template not viable: requires 6 arguments, but 1 was provided
typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4, BOOST_FWD_REF(A5) a5, BOOST_FWD_REF(A6) a6 )
                                                   ^
/usr/local/include/boost/smart_ptr/make_shared_object.hpp:628:52: note: candidate function template not viable: requires 7 arguments, but 1 was provided
typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4, BOOST_FWD_REF(A5) a5, BOOST_FWD_REF(A6) a6, BOOST_FWD_REF(A7) a7 )
                                                   ^
/usr/local/include/boost/smart_ptr/make_shared_object.hpp:682:52: note: candidate function template not viable: requires 8 arguments, but 1 was provided
typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4, BOOST_FWD_REF(A5) a5, BOOST_FWD_REF(A6) a6, BOOST_FWD_REF(A7) a7, BOOST_FWD_REF(A8) a8 )
                                                   ^
/usr/local/include/boost/smart_ptr/make_shared_object.hpp:738:52: note: candidate function template not viable: requires 9 arguments, but 1 was provided
typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4, BOOST_FWD_REF(A5) a5, BOOST_FWD_REF(A6) a6, BOOST_FWD_REF(A7) a7, BOOST_FWD_REF(A8) a8, BOOST_FWD_REF(A9) a9 )
                                                   ^
/usr/local/include/boost/smart_ptr/make_shared_array.hpp:17:1: note: candidate function template not viable: requires 0 arguments, but 1 was provided
make_shared()
^
/usr/local/include/boost/smart_ptr/make_shared_array.hpp:41:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
make_shared(std::size_t size,
^
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2018-01-02 19:33:16 UTC
Update: The upstream backported the fix to 1.X series, and it should appear in the next minor release, which they do frequently. I will update the port then.
Comment 6 Yuri Victorovich freebsd_committer freebsd_triage 2018-01-03 17:22:57 UTC
Created attachment 189373 [details]
patch

Jan,

This patch is supposed to fix the boost issue.

Thanks,
Yuri
Comment 7 Yuri Victorovich freebsd_committer freebsd_triage 2018-01-03 17:23:18 UTC
https://reviews.freebsd.org/D13748
Comment 8 Jan Beich freebsd_committer freebsd_triage 2018-01-03 18:40:01 UTC
Comment on attachment 189373 [details]
patch

(In reply to Yuri Victorovich from comment #6)
> This patch is supposed to fix the boost issue.

Probably, see https://clbin.com/TIcNE . comment 0 no longer happens but I can't test completely due to an unrelated issue already reported by pkg-fallout@.
Comment 9 Yuri Victorovich freebsd_committer freebsd_triage 2018-01-03 18:42:32 UTC
(In reply to Jan Beich from comment #8)

That's ok, thanks!
Comment 10 Yuri Victorovich freebsd_committer freebsd_triage 2018-01-03 18:44:44 UTC
(In reply to Jan Beich from comment #8)

FYI: There is a new feature in poudriere-devel.

You need this
> MAX_FILES_RStudio=2048
in /usr/local/etc/poudriere.conf to avoid fallout.
This needs to be there permanently, because of the quirk of this package.
Comment 11 Jan Beich freebsd_committer freebsd_triage 2018-01-04 00:18:20 UTC
(In reply to Yuri Victorovich from comment #10)
>> MAX_FILES_RStudio=2048

Thanks for the hint. My build against Boost 1.66 with the patch here was successful: https://clbin.com/PVyZl
Comment 12 Yuri Victorovich freebsd_committer freebsd_triage 2018-01-04 00:26:23 UTC
(In reply to Jan Beich from comment #11)

You're welcome!
Comment 13 Yuri Victorovich freebsd_committer freebsd_triage 2018-01-07 20:50:38 UTC
Committed, thanks!
Comment 14 commit-hook freebsd_committer freebsd_triage 2018-01-07 20:51:21 UTC
A commit references this bug:

Author: yuri
Date: Sun Jan  7 20:50:33 UTC 2018
New revision: 458384
URL: https://svnweb.freebsd.org/changeset/ports/458384

Log:
  devel/RStudio: Update to 1.1.409 (also fixes building with boost 1.66)

  The RStudio's upstream merged the boost fix into the master for FreeBSD.

  Additionally, the comment is modified to reflect the new poudriere feature
  MAX_FILES_${PKGBASE} that needs to be utilized to make this port build
  in poudriere, since it opens more files than the default limit of 1024.

  PR:		224827
  Submitted by:	myself
  Reported by:	jbeich
  Approved by:	adamw
  Differential Revision:	https://reviews.freebsd.org/D13748

Changes:
  head/devel/RStudio/Makefile
  head/devel/RStudio/distinfo