Bug 236603 - devel/RStudio: fails to build with boost 1.70
Summary: devel/RStudio: fails to build with boost 1.70
Status: New
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://github.com/rstudio/rstudio/is...
Keywords: needs-patch, regression
Depends on:
Blocks: 235956
  Show dependency treegraph
 
Reported: 2019-03-17 15:10 UTC by Jan Beich
Modified: 2019-07-07 20:05 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2019-03-17 15:10:21 UTC
While preparing for Boost upgrade this port failed to build. Can you help to avoid marking it as BROKEN?

$ fetch -qo- 'https://reviews.freebsd.org/D19303?download=true' |
  patch -Efsp0 -d /usr/ports
$ make all deinstall install clean -C/usr/ports/devel/boost-jam
$ make all deinstall install clean -C/usr/ports/devel/boost-libs
$ make -C/usr/ports/devel/RStudio
[...]
In file included from .../work/rstudio-1.2.1320/src/cpp/session/postback/PostbackMain.cpp:36:
In file included from .../work/rstudio-1.2.1320/src/cpp/session/include/session/http/SessionRequest.hpp:24:
In file included from .../work/rstudio-1.2.1320/src/cpp/core/include/core/http/TcpIpBlockingClient.hpp:22:
In file included from .../work/rstudio-1.2.1320/src/cpp/core/include/core/http/TcpIpAsyncClient.hpp:28:
.../work/rstudio-1.2.1320/src/cpp/core/include/core/http/TcpIpAsyncConnector.hpp:80:76: error: no member named 'get_io_service' in 'boost::asio::ip::basic_resolver<boost::asio::ip::tcp, boost::asio::executor>'
         pConnectionTimer_.reset(new boost::asio::deadline_timer(resolver_.get_io_service(), timeout));
                                                                 ~~~~~~~~~ ^
1 error generated.
Comment 1 Yuri Victorovich freebsd_committer 2019-03-17 18:05:18 UTC
Duplicate of bug#236589 ?
Comment 2 Jan Beich freebsd_committer 2019-03-17 19:43:20 UTC
No. Bug 236589 is about websocketpp bundlers and wesnoth that I've accidentally included due to similar error. With get_io_service removal games/freeorion may have a fix soon (see upstream issue) that can assist fixing other ports.
Comment 3 Jan Beich freebsd_committer 2019-04-12 09:44:17 UTC
The port has been marked BROKEN in ports r498698.
Comment 4 Jan Beich freebsd_committer 2019-04-12 13:45:40 UTC
Yuri, See Also field already had link to upstream bug.
Comment 5 tech-lists 2019-05-18 13:13:18 UTC
Is there any way round this? like use an earlier boost version
Comment 6 Yuri Victorovich freebsd_committer 2019-05-18 16:03:48 UTC
(In reply to tech-lists from comment #5)

> Is there any way round this? like use an earlier boost version

FreeBSD switched to the latest boost, and RStudio isn't ready.

Either you can create a pull request on GitHub with the needed changes. Pull requests can be easily incorporated into ports. Otherwise we need to wait for the upstream to fix it themselves.


Yuri
Comment 7 tech-lists 2019-07-07 12:23:20 UTC
(In reply to Yuri Victorovich from comment #6)

Hi,
Upstream suggests the boost issue is fixed?

https://github.com/Icinga/icinga2/issues/7041
Comment 8 Yuri Victorovich freebsd_committer 2019-07-07 18:15:31 UTC
(In reply to tech-lists from comment #7)

tech-lists@zyxst.net,

The port is at their latest tagged version, see https://github.com/rstudio/rstudio/tags

Please ask them to tag the version with the fixed boost problem.

Thanks,
Yuri
Comment 9 Rainer Hurling 2019-07-07 20:00:00 UTC
The solution described in comment #7 is for Icinga2 (net-mgmt/icinga2) and seems not sufficient for the RStudio port.


In devel/RStudio, after patching the ports Makefile like this:

========================================================================
--- Makefile.orig	2019-04-22 17:08:14.218090000 +0200
+++ Makefile	2019-07-07 21:54:17.461444000 +0200
@@ -21,7 +21,7 @@
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-BROKEN=		fails to build with boost 1.70, see bug 236603
+#BROKEN=		fails to build with boost 1.70, see bug 236603
 
 BUILD_DEPENDS=	ant:devel/apache-ant \
 		${LOCALBASE}/include/sys/sysinfo.h:devel/libsysinfo \
@@ -74,6 +74,10 @@
 		s|rHomePaths.push_back|//rHomePaths.push_back|; \
 		s|//rHomePaths.push_back(FilePath("/usr/local/lib/|rHomePaths.push_back(FilePath("${PREFIX}/lib/|' \
 		${WRKSRC}/src/cpp/core/r_util/RVersionsPosix.cpp
+	# Changes in Boost 1.70 (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236603)
+	@${REINPLACE_CMD} -e 's|get_io_service()|get_executor().context()|g' \
+		${WRKSRC}/src/cpp/core/include/core/http/TcpIpAsyncConnector.hpp \
+		${WRKSRC}/src/cpp/ext/websocketpp/transport/asio/endpoint.hpp
 
 pre-build:
 	@${CP} ${FILESDIR}/global-setenv.h ${WRKSRC}/src/cpp/desktop/
========================================================================


the build breaks with:

[..snip..]
[ 43%] Building CXX object src/cpp/desktop/CMakeFiles/rstudio.dir/DesktopSessionLauncher.cpp.o
cd /usr/ports/devel/RStudio/work/.build/src/cpp/desktop && /usr/bin/c++  -DBOOST_ASIO_DISABLE_KQUEUE -DBOOST_ENABLE_ASSERT_HANDLER -DBOOST_SIGNALS_NO_DEPRECATION_WARNING -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_OPENGL_LIB -DQT_POSITIONING_LIB -DQT_PRINTSUPPORT_LIB -DQT_QML_LIB -DQT_QUICKWIDGETS_LIB -DQT_QUICK_LIB -DQT_SENSORS_LIB -DQT_SQL_LIB -DQT_SVG_LIB -DQT_WEBCHANNEL_LIB -DQT_WEBENGINECORE_LIB -DQT_WEBENGINEWIDGETS_LIB -DQT_WEBENGINE_LIB -DQT_WIDGETS_LIB -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DRSTUDIO_BOOST_NAMESPACE=boost -DRSTUDIO_BOOST_SIGNALS_VERSION=2 -DWEBSOCKETPP_STRICT_MASKING -D_FORTIFY_SOURCE=2 -D_WEBSOCKETPP_NO_CPP11_MEMORY_=1 -I/usr/ports/devel/RStudio/work/.build/src/cpp/desktop -I/usr/ports/devel/RStudio/work/rstudio-1.2.1335/src/cpp/desktop -I/usr/ports/devel/RStudio/work/rstudio-1.2.1335/src/cpp/desktop/include -I/usr/ports/devel/RStudio/work/rstudio-1.2.1335/src/cpp/core/include -I/usr/ports/devel/RStudio/work/rstudio-1.2.1335/src/cpp/tests/cpp -isystem /usr/local/include -isystem /usr/local/include/qt5 -isystem /usr/local/include/qt5/QtCore -isystem /usr/local/lib/qt5/mkspecs/freebsd-clang -isystem /usr/local/include/qt5/QtWidgets -isystem /usr/local/include/qt5/QtGui -isystem /usr/local/include/qt5/QtNetwork -isystem /usr/local/include/qt5/QtWebChannel -isystem /usr/local/include/qt5/QtQml -isystem /usr/local/include/qt5/QtWebEngine -isystem /usr/local/include/qt5/QtWebEngineCore -isystem /usr/local/include/qt5/QtQuick -isystem /usr/local/include/qt5/QtPositioning -isystem /usr/local/include/qt5/QtWebEngineWidgets -isystem /usr/local/include/qt5/QtPrintSupport -isystem /usr/local/include/qt5/QtQuickWidgets -isystem /usr/local/include/qt5/QtSensors -isystem /usr/local/include/qt5/QtSvg -isystem /usr/local/include/qt5/QtXml -isystem /usr/local/include/qt5/QtXmlPatterns -isystem /usr/local/include/qt5/QtDBus -isystem /usr/local/include/qt5/QtSql -isystem /usr/local/include/qt5/QtOpenGL -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -std=c++0x -std=c++11 -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIE   -Wall -pthread -Wformat -Wformat-security -fstack-protector --param ssp-buffer-size=4 -fPIC -fPIC -std=gnu++11 -o CMakeFiles/rstudio.dir/DesktopSessionLauncher.cpp.o -c /usr/ports/devel/RStudio/work/rstudio-1.2.1335/src/cpp/desktop/DesktopSessionLauncher.cpp
In file included from /usr/ports/devel/RStudio/work/rstudio-1.2.1335/src/cpp/desktop/DesktopSessionLauncher.cpp:24:
In file included from /usr/ports/devel/RStudio/work/rstudio-1.2.1335/src/cpp/core/include/core/http/TcpIpBlockingClient.hpp:20:
In file included from /usr/ports/devel/RStudio/work/rstudio-1.2.1335/src/cpp/core/include/core/http/BlockingClient.hpp:24:
In file included from /usr/ports/devel/RStudio/work/rstudio-1.2.1335/src/cpp/core/include/core/http/AsyncClient.hpp:30:
In file included from /usr/local/include/boost/asio/deadline_timer.hpp:24:
In file included from /usr/local/include/boost/asio/basic_deadline_timer.hpp:26:
/usr/local/include/boost/asio/detail/io_object_impl.hpp:87:40: error: no member named 'get_executor' in
      'boost::asio::execution_context'
      implementation_executor_(context.get_executor(),
                               ~~~~~~~ ^
/usr/local/include/boost/asio/basic_deadline_timer.hpp:256:7: note: in instantiation of function template
      specialization
      'boost::asio::detail::io_object_impl<boost::asio::detail::deadline_timer_service<boost::asio::time_traits<boost::posix_time::ptime>
      >, boost::asio::executor>::io_object_impl<boost::asio::execution_context>' requested here
    : impl_(context)
      ^
/usr/ports/devel/RStudio/work/rstudio-1.2.1335/src/cpp/core/include/core/http/TcpIpAsyncConnector.hpp:80:38: note: 
      in instantiation of function template specialization
      'boost::asio::basic_deadline_timer<boost::posix_time::ptime,
      boost::asio::time_traits<boost::posix_time::ptime>,
      boost::asio::executor>::basic_deadline_timer<boost::asio::execution_context>' requested here
         pConnectionTimer_.reset(new boost::asio::deadline_timer(resolver_.get_executor().context(), timeout));
                                     ^
1 error generated.
*** Error code 1
Stop.
make[3]: stopped in /usr/ports/devel/RStudio/work/.build
Comment 10 Yuri Victorovich freebsd_committer 2019-07-07 20:05:32 UTC
(In reply to Rainer Hurling from comment #9)

I asked RStudio to fix the boost compatibility, but they replied that this is not a priority for them.