Skip to content

Build fix: changed abs() -> fabs() (or std::abs?) to be built with G++ 7.1.0#49

Merged
ngeiswei merged 1 commit intoopencog:masterfrom
mhatta:master
Aug 10, 2017
Merged

Build fix: changed abs() -> fabs() (or std::abs?) to be built with G++ 7.1.0#49
ngeiswei merged 1 commit intoopencog:masterfrom
mhatta:master

Conversation

@mhatta
Copy link
Contributor

@mhatta mhatta commented Aug 10, 2017

MOSES build with newer(?) G++ fails with the following error:

home/mhatta/work/Debian/opencog/opencog-moses/opencog-moses-3.6.10git20170807.
a3a37c9/moses/comboreduct/combo/similarity.cc: In function ‘size_t opencog::comb
o::tree_similarity(const tree_branch_vector&, const tree_branch_vector&)’:
/home/mhatta/work/Debian/opencog/opencog-moses/opencog-moses-3.6.10
git20170807.a3a37c9/moses/comboreduct/combo/similarity.cc:220:26: error: call of overloaded
‘abs(size_t)’ is ambiguous dist += abs(acnt - bcnt);
^

Changing abs() to fabs() fixes this. Or std::abs instead of fabs?

A include file in cogutils needs to be fixed too.

@ngeiswei ngeiswei merged commit b5e13ef into opencog:master Aug 10, 2017
@ngeiswei
Copy link
Member

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

Successfully merging this pull request may close these issues.

2 participants