boost::date_time error while building MongoDB: winapi is not member









up vote
1
down vote

favorite












While building MongoDB with SCons and boost, I'm getting errors. Here's my command line:




C:mongo-cxx-driver>Scons --prefix=$HOME/mongo-client-lib --cpppath=C:boost_1_66_0 --libpath=C:boost_1_66_0stage64lib --dbg=on --64 install




Here are the error messages I'm getting:



srcmongoutiltime_support.cpp(904): error C2039: 'winapi': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(904): error C3083: 'winapi': the symbol to the left of a '::' must be a type
srcmongoutiltime_support.cpp(904): error C2039: 'file_time_to_microseconds': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(904): error C3861: 'file_time_to_microseconds': identifier not found
srcmongoutiltime_support.cpp(936): error C2039: 'winapi': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(936): error C3083: 'winapi': the symbol to the left of a '::' must be a type
srcmongoutiltime_support.cpp(936): error C2039: 'file_time_to_microseconds': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(936): error C3861: 'file_time_to_microseconds': identifier not found
scons: *** [buildwin3264dbg_onmongoutiltime_support.obj] Error 2
scons: building terminated because of errors.









share|improve this question























  • The below answer is correct, but the good news is that we are working on fixing it. See my comment below.
    – acm
    Nov 13 at 21:50














up vote
1
down vote

favorite












While building MongoDB with SCons and boost, I'm getting errors. Here's my command line:




C:mongo-cxx-driver>Scons --prefix=$HOME/mongo-client-lib --cpppath=C:boost_1_66_0 --libpath=C:boost_1_66_0stage64lib --dbg=on --64 install




Here are the error messages I'm getting:



srcmongoutiltime_support.cpp(904): error C2039: 'winapi': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(904): error C3083: 'winapi': the symbol to the left of a '::' must be a type
srcmongoutiltime_support.cpp(904): error C2039: 'file_time_to_microseconds': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(904): error C3861: 'file_time_to_microseconds': identifier not found
srcmongoutiltime_support.cpp(936): error C2039: 'winapi': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(936): error C3083: 'winapi': the symbol to the left of a '::' must be a type
srcmongoutiltime_support.cpp(936): error C2039: 'file_time_to_microseconds': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(936): error C3861: 'file_time_to_microseconds': identifier not found
scons: *** [buildwin3264dbg_onmongoutiltime_support.obj] Error 2
scons: building terminated because of errors.









share|improve this question























  • The below answer is correct, but the good news is that we are working on fixing it. See my comment below.
    – acm
    Nov 13 at 21:50












up vote
1
down vote

favorite









up vote
1
down vote

favorite











While building MongoDB with SCons and boost, I'm getting errors. Here's my command line:




C:mongo-cxx-driver>Scons --prefix=$HOME/mongo-client-lib --cpppath=C:boost_1_66_0 --libpath=C:boost_1_66_0stage64lib --dbg=on --64 install




Here are the error messages I'm getting:



srcmongoutiltime_support.cpp(904): error C2039: 'winapi': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(904): error C3083: 'winapi': the symbol to the left of a '::' must be a type
srcmongoutiltime_support.cpp(904): error C2039: 'file_time_to_microseconds': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(904): error C3861: 'file_time_to_microseconds': identifier not found
srcmongoutiltime_support.cpp(936): error C2039: 'winapi': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(936): error C3083: 'winapi': the symbol to the left of a '::' must be a type
srcmongoutiltime_support.cpp(936): error C2039: 'file_time_to_microseconds': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(936): error C3861: 'file_time_to_microseconds': identifier not found
scons: *** [buildwin3264dbg_onmongoutiltime_support.obj] Error 2
scons: building terminated because of errors.









share|improve this question















While building MongoDB with SCons and boost, I'm getting errors. Here's my command line:




C:mongo-cxx-driver>Scons --prefix=$HOME/mongo-client-lib --cpppath=C:boost_1_66_0 --libpath=C:boost_1_66_0stage64lib --dbg=on --64 install




Here are the error messages I'm getting:



srcmongoutiltime_support.cpp(904): error C2039: 'winapi': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(904): error C3083: 'winapi': the symbol to the left of a '::' must be a type
srcmongoutiltime_support.cpp(904): error C2039: 'file_time_to_microseconds': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(904): error C3861: 'file_time_to_microseconds': identifier not found
srcmongoutiltime_support.cpp(936): error C2039: 'winapi': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(936): error C3083: 'winapi': the symbol to the left of a '::' must be a type
srcmongoutiltime_support.cpp(936): error C2039: 'file_time_to_microseconds': is not a member of 'boost::date_time'
C:boost_1_66_0boost/date_time/filetime_functions.hpp(28): note: see declaration of 'boost::date_time'
srcmongoutiltime_support.cpp(936): error C3861: 'file_time_to_microseconds': identifier not found
scons: *** [buildwin3264dbg_onmongoutiltime_support.obj] Error 2
scons: building terminated because of errors.






c++ mongodb boost boost-date-time






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 2:00









HostileFork

24.6k775131




24.6k775131










asked Nov 11 at 1:21









Antonio SEO

858




858











  • The below answer is correct, but the good news is that we are working on fixing it. See my comment below.
    – acm
    Nov 13 at 21:50
















  • The below answer is correct, but the good news is that we are working on fixing it. See my comment below.
    – acm
    Nov 13 at 21:50















The below answer is correct, but the good news is that we are working on fixing it. See my comment below.
– acm
Nov 13 at 21:50




The below answer is correct, but the good news is that we are working on fixing it. See my comment below.
– acm
Nov 13 at 21:50












1 Answer
1






active

oldest

votes

















up vote
1
down vote













TL; DR - You can't expect to pick an arbitrary or current version of a library and build MongoDB with it; they snapshot their dependencies in their repo and there's no promises about building with versions besides those.




MongoDB has snapshots of its dependencies in the src/thirdparty directory. The version of boost snapshotted there is 1.60, which was released in 2015. You can see that in that version of boost, there is a winapi namespace defined in boost/date_time/filetime_functions.hpp.



However, you're trying to build against boost 1.66, which was released in December 2017. The release notes mention changes to date_time:




DateTime:



  • The library has been converted to use Boost.WinAPI as the abstraction layer for Windows SDK.


  • Fixed an integral overflow that could cause incorrect results when adding or subtracting many years from a date (see here).




That version of filetime_functions does not have this namespace inside of date_time, nor does the current 1.67 snapshot of filetime_functions.hpp.



Looking at the git blame log for src/mongo/util/time_support.cpp, it looks like the mongo code in question mentioning date_time::winapi was added 3 years ago (before this winapi refactoring) and hasn't changed since.






share|improve this answer




















  • We are actually right now in the process of upgrading our vendored boost dependency and encountered this issue. We will be fixing it soon.
    – acm
    Nov 13 at 21:50










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245024%2fboostdate-time-error-while-building-mongodb-winapi-is-not-member%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













TL; DR - You can't expect to pick an arbitrary or current version of a library and build MongoDB with it; they snapshot their dependencies in their repo and there's no promises about building with versions besides those.




MongoDB has snapshots of its dependencies in the src/thirdparty directory. The version of boost snapshotted there is 1.60, which was released in 2015. You can see that in that version of boost, there is a winapi namespace defined in boost/date_time/filetime_functions.hpp.



However, you're trying to build against boost 1.66, which was released in December 2017. The release notes mention changes to date_time:




DateTime:



  • The library has been converted to use Boost.WinAPI as the abstraction layer for Windows SDK.


  • Fixed an integral overflow that could cause incorrect results when adding or subtracting many years from a date (see here).




That version of filetime_functions does not have this namespace inside of date_time, nor does the current 1.67 snapshot of filetime_functions.hpp.



Looking at the git blame log for src/mongo/util/time_support.cpp, it looks like the mongo code in question mentioning date_time::winapi was added 3 years ago (before this winapi refactoring) and hasn't changed since.






share|improve this answer




















  • We are actually right now in the process of upgrading our vendored boost dependency and encountered this issue. We will be fixing it soon.
    – acm
    Nov 13 at 21:50














up vote
1
down vote













TL; DR - You can't expect to pick an arbitrary or current version of a library and build MongoDB with it; they snapshot their dependencies in their repo and there's no promises about building with versions besides those.




MongoDB has snapshots of its dependencies in the src/thirdparty directory. The version of boost snapshotted there is 1.60, which was released in 2015. You can see that in that version of boost, there is a winapi namespace defined in boost/date_time/filetime_functions.hpp.



However, you're trying to build against boost 1.66, which was released in December 2017. The release notes mention changes to date_time:




DateTime:



  • The library has been converted to use Boost.WinAPI as the abstraction layer for Windows SDK.


  • Fixed an integral overflow that could cause incorrect results when adding or subtracting many years from a date (see here).




That version of filetime_functions does not have this namespace inside of date_time, nor does the current 1.67 snapshot of filetime_functions.hpp.



Looking at the git blame log for src/mongo/util/time_support.cpp, it looks like the mongo code in question mentioning date_time::winapi was added 3 years ago (before this winapi refactoring) and hasn't changed since.






share|improve this answer




















  • We are actually right now in the process of upgrading our vendored boost dependency and encountered this issue. We will be fixing it soon.
    – acm
    Nov 13 at 21:50












up vote
1
down vote










up vote
1
down vote









TL; DR - You can't expect to pick an arbitrary or current version of a library and build MongoDB with it; they snapshot their dependencies in their repo and there's no promises about building with versions besides those.




MongoDB has snapshots of its dependencies in the src/thirdparty directory. The version of boost snapshotted there is 1.60, which was released in 2015. You can see that in that version of boost, there is a winapi namespace defined in boost/date_time/filetime_functions.hpp.



However, you're trying to build against boost 1.66, which was released in December 2017. The release notes mention changes to date_time:




DateTime:



  • The library has been converted to use Boost.WinAPI as the abstraction layer for Windows SDK.


  • Fixed an integral overflow that could cause incorrect results when adding or subtracting many years from a date (see here).




That version of filetime_functions does not have this namespace inside of date_time, nor does the current 1.67 snapshot of filetime_functions.hpp.



Looking at the git blame log for src/mongo/util/time_support.cpp, it looks like the mongo code in question mentioning date_time::winapi was added 3 years ago (before this winapi refactoring) and hasn't changed since.






share|improve this answer












TL; DR - You can't expect to pick an arbitrary or current version of a library and build MongoDB with it; they snapshot their dependencies in their repo and there's no promises about building with versions besides those.




MongoDB has snapshots of its dependencies in the src/thirdparty directory. The version of boost snapshotted there is 1.60, which was released in 2015. You can see that in that version of boost, there is a winapi namespace defined in boost/date_time/filetime_functions.hpp.



However, you're trying to build against boost 1.66, which was released in December 2017. The release notes mention changes to date_time:




DateTime:



  • The library has been converted to use Boost.WinAPI as the abstraction layer for Windows SDK.


  • Fixed an integral overflow that could cause incorrect results when adding or subtracting many years from a date (see here).




That version of filetime_functions does not have this namespace inside of date_time, nor does the current 1.67 snapshot of filetime_functions.hpp.



Looking at the git blame log for src/mongo/util/time_support.cpp, it looks like the mongo code in question mentioning date_time::winapi was added 3 years ago (before this winapi refactoring) and hasn't changed since.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 11 at 2:59









HostileFork

24.6k775131




24.6k775131











  • We are actually right now in the process of upgrading our vendored boost dependency and encountered this issue. We will be fixing it soon.
    – acm
    Nov 13 at 21:50
















  • We are actually right now in the process of upgrading our vendored boost dependency and encountered this issue. We will be fixing it soon.
    – acm
    Nov 13 at 21:50















We are actually right now in the process of upgrading our vendored boost dependency and encountered this issue. We will be fixing it soon.
– acm
Nov 13 at 21:50




We are actually right now in the process of upgrading our vendored boost dependency and encountered this issue. We will be fixing it soon.
– acm
Nov 13 at 21:50

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245024%2fboostdate-time-error-while-building-mongodb-winapi-is-not-member%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

天津地下鉄3号線

How to fill missing numeric if any value in a subset is missing, all other columns with the same subset are missing