You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@madlib.apache.org by "Babak Alipour (JIRA)" <ji...@apache.org> on 2016/02/22 02:05:18 UTC
[jira] [Created] (MADLIB-967) Hello World Example Errors
Babak Alipour created MADLIB-967:
------------------------------------
Summary: Hello World Example Errors
Key: MADLIB-967
URL: https://issues.apache.org/jira/browse/MADLIB-967
Project: Apache MADlib
Issue Type: Bug
Components: Documentation
Reporter: Babak Alipour
While trying to go through the quick start guide for developers (available here : https://cwiki.apache.org/confluence/display/MADLIB/Quick+Start+Guide+for+Developers), I realized that in avg_var.cpp there are some lines that use 'this.member'. I think 'this' is a pointer and it should be used with '->'.
So I tried to build MADlib from source with these files added, and it doesn't.
It produces multiple compile-time errors:
E.g. ' error: request for member ‘avg’ in ‘this’, which is of pointer type ...'
Replacing every 'this.' with 'this->' takes care of those errors but there are still a few more errors in the given example.
Line 53:
double a = static_cast<double>(state.numRows) / normalizer;
Produces an error, since 'state' is not defined in this scope. Since this function is overloading '+=', I think it's safe to say this was supposed to be the state of 'this', so I replaced it with 'this->' and that error went away.
Lines 44 & 45:
template <class OtherHandle>
AvgVarTransitionState &operator+=(const double x){
This was also producing compile errors. (failed to deduce OtherHandle template type) This takes a double and adds it to the state, so I don't see any uses for 'OtherHandle' in this context and I commented line 44.
All said and done, MADlib now compiles, installs and works just fine.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)