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

[regression] error: no matching constructor for initialization of 'boost::posix_time::milliseconds' #2867

Closed
yurivict opened this issue May 26, 2018 · 5 comments

Comments

@yurivict
Copy link

yurivict commented May 26, 2018

Version 1.2.637 fails to build on FreeBSD 11.1:

/usr/ports/devel/RStudio/work/rstudio-1.2.637/src/cpp/core/ExponentialBackoff.cpp:71:36: error: no matching constructor for initialization of 'boost::posix_time::milliseconds' (aka 'subsecond_duration<boost::posix_time::time_duration, 1000>')
   boost::posix_time::milliseconds nextWait(initialWait_.total_milliseconds() * std::pow(2, totalNumTries_));
                                   ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/date_time/time_duration.hpp:270:30: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'double' to 'const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>' for 1st argument
  class BOOST_SYMBOL_VISIBLE subsecond_duration : public base_duration
                             ^
/usr/local/include/boost/date_time/time_duration.hpp:270:30: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'double' to 'boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>' for 1st argument
/usr/local/include/boost/date_time/time_duration.hpp:286:59: note: candidate template ignored: disabled by 'enable_if' [with T = double]
                                typename boost::enable_if<boost::is_integral<T>, void>::type* = 0) :
                                                          ^

boost-libs-1.67.0_1

@yurivict
Copy link
Author

This issue is found while trying to update the FreeBSD port for RStudio. It blocks the update.

@kevinushey
Copy link
Contributor

Thanks for the bug report. This appears to be caused by the upgrade to Boost 1.67.0 -- I'll take a look.

kevinushey added a commit that referenced this issue May 29, 2018
@kevinushey
Copy link
Contributor

This commit should fix the issue:

85896f3

Are you able to include that as a patch in the version of RStudio you build on FreeBSD?

@yurivict
Copy link
Author

Yes, I will do this tonight.
Thanks!

@yurivict
Copy link
Author

I've included the patch, thanks!

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

3 participants