MantisBT - Rosetta
View Issue Details
0000332Rosetta[All Projects] Bad Codingpublic2014-04-17 09:552014-07-19 13:23
rmoretti 
rmoretti 
normalminorsometimes
resolvedfixed 
 
 
scons
scons.py mode=release bin
aa7b53799ffbe6b
0000332: Problems compiling with uint64_t
On some platforms it appears that the definition of uint64_t is missing/faulty.
This expresses itself as a compilation error in src/protocols/wum2/EndPoint.cc:

src/protocols/wum2/EndPoint.cc:21:42: error: a function call cannot appear in a constant-expression

If you supplement the definition of uint64_t with the one defined by boost/cstdint.hpp this apparently fixes the error.
Try compiling on an affected platform.
Forum thread reporting the issue: https://www.rosettacommons.org/node/3582 [^]

No tags attached.
Issue History
2014-04-17 09:55rmorettiNew Issue
2014-04-17 11:29rmorettiNote Added: 0000341
2014-04-18 14:41SergeyNote Added: 0000342
2014-04-18 14:42SergeyNote Edited: 0000342bug_revision_view_page.php?bugnote_id=342#r112
2014-04-21 09:05rmorettiNote Added: 0000343
2014-07-19 13:23rmorettiFixed in SVN Version => aa7b53799ffbe6b
2014-07-19 13:23rmorettiStatusnew => resolved
2014-07-19 13:23rmorettiResolutionopen => fixed
2014-07-19 13:23rmorettiAssigned To => rmoretti

Notes
(0000341)
rmoretti   
2014-04-17 11:29   
Andrew let me know that uint64_t usage in Rosetta is mostly boost based, and looking at src/protocols/wum2/EndPoint.hh I now see a "using namespace boost" line. The fix here is probably to get rid of the using declaration in the header and be explicit about using the boost version of uint64_t.

(There's a complication in all of this that uint64_t is available under C++11, but only for platforms where it's a native type. E.g. not for 32-bit compilers, which may be why there's such a platform dependent muddle.)
(0000342)
Sergey   
2014-04-18 14:41   
(edited on: 2014-04-18 14:42)
Rocco, types like uint64_t should not be really used anywhere besides platform/*. Could this be replaced with core::Size? (using uint64_t directly would create numerous problem for Windows build as well)

(0000343)
rmoretti   
2014-04-21 09:05   
Andrew said that he's used the boost::uint64_t and the like when he's needed a type that's specifically 64 bits long. I would assume that the boost library should figure out all the cross platform issues such that explicit use of the boost::uint64_t wouldn't have compilation issues on Windows, but I'm not certain of that.