[
https://issues.apache.org/jira/browse/MADLIB-1025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15862109#comment-15862109
]
ASF GitHub Bot commented on MADLIB-1025:
----------------------------------------
GitHub user iyerr3 opened a pull request:
https://github.com/apache/incubator-madlib/pull/101
Multiple: Add casting to allow compilation with GCC 6+
JIRA: MADLIB-1025
GCC 6+ introduced stricter rules for implicit casting where loss of
information is possible.
Closes #101
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/iyerr3/incubator-madlib
bugfix/gcc6_error_fixes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-madlib/pull/101.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #101
----
commit 8e03ffda2e8a4b2f2ab2baf01c2e6727345c91be
Author: Rahul Iyer <[email protected]>
Date: 2017-02-11T00:29:08Z
Multiple: Add casting to allow compilation in GCC 6+
JIRA: MADLIB-1025
GCC 6+ introduced stricter rules for implicit casting where loss of
information is possible.
Closes #101
----
> MADlib does not compile with gcc 6.2
> ------------------------------------
>
> Key: MADLIB-1025
> URL: https://issues.apache.org/jira/browse/MADLIB-1025
> Project: Apache MADlib
> Issue Type: Bug
> Components: Build System
> Reporter: Rahul Iyer
> Assignee: Nandish Jayaram
> Priority: Minor
> Fix For: v2.0
>
>
> Compiling with gcc 6.2.0 gives the below error.
> {code}
> [ 84%] Building CXX object
> src/ports/postgres/9.5/CMakeFiles/madlib_postgresql_9_5.dir/__/__/__/modules/elastic_net/elastic_net_gaussian_fista.cpp.o
> In file included from
> /var/folders/rm/g9tb1s_53wb86s5_nrsdbxph0000gn/T/tmp8WXq3S/madlib-1.9.1/src/modules/elastic_net/elastic_net_binomial_igd.cpp:5:0:
> /var/folders/rm/g9tb1s_53wb86s5_nrsdbxph0000gn/T/tmp8WXq3S/madlib-1.9.1/src/modules/elastic_net/elastic_net_optimizer_igd.hpp:
> In static member function 'static madlib::dbconnector::postgres::AnyType
> madlib::modules::elastic_net::Igd<
> Model>::igd_transition(madlib::dbconnector::postgres::AnyType&, const
> madlib::dbconnector::postgres::Allocator&)':
> /var/folders/rm/g9tb1s_53wb86s5_nrsdbxph0000gn/T/tmp8WXq3S/madlib-1.9.1/src/modules/elastic_net/elastic_net_optimizer_igd.hpp:69:46:
> error: call of overloaded
> 'log(madlib::modules::HandleTraits<madlib::dbconnector::postgres::MutableAr
> rayHandle<double> >::ReferenceToUInt32&)' is ambiguous
> state.p = 2 * log(state.dimension);
> ^
> In file included from
> /usr/local/Cellar/gcc/6.2.0/include/c++/6.2.0/cmath:45:0,
> from /usr/local/Cellar/gcc/6.2.0/include/c++/6.2.0/math.h:36,
> from
> /var/folders/rm/g9tb1s_53wb86s5_nrsdbxph0000gn/T/tmp8WXq3S/madlib-1.9.1/src/ports/postgres/dbconnector/../../../../methods/svec/src/pg_gp/SparseData.h:24,
> from
> /var/folders/rm/g9tb1s_53wb86s5_nrsdbxph0000gn/T/tmp8WXq3S/madlib-1.9.1/src/ports/postgres/dbconnector/../../../../methods/svec/src/pg_gp/sparse_vector.h:10,
> from
> /var/folders/rm/g9tb1s_53wb86s5_nrsdbxph0000gn/T/tmp8WXq3S/madlib-1.9.1/src/ports/postgres/dbconnector/dbconnector.hpp:39,
> from
> /var/folders/rm/g9tb1s_53wb86s5_nrsdbxph0000gn/T/tmp8WXq3S/madlib-1.9.1/src/modules/elastic_net/elastic_net_binomial_igd.cpp:2:
> /usr/local/Cellar/gcc/6.2.0/lib/gcc/6/gcc/x86_64-apple-darwin15.6.0/6.2.0/include-fixed/math.h:402:15:
> note: candidate: double log(double)
> extern double log(double);
> ^~~
> In file included from
> /usr/local/Cellar/gcc/6.2.0/include/c++/6.2.0/math.h:36:0,
> from
> /var/folders/rm/g9tb1s_53wb86s5_nrsdbxph0000gn/T/tmp8WXq3S/madlib-1.9.1/src/ports/postgres/dbconnector/../../../../methods/svec/src/pg_gp/SparseData.h:24,
> from
> /var/folders/rm/g9tb1s_53wb86s5_nrsdbxph0000gn/T/tmp8WXq3S/madlib-1.9.1/src/ports/postgres/dbconnector/../../../../methods/svec/src/pg_gp/sparse_vector.h:10,
> from
> /var/folders/rm/g9tb1s_53wb86s5_nrsdbxph0000gn/T/tmp8WXq3S/madlib-1.9.1/src/ports/postgres/dbconnector/dbconnector.hpp:39,
> from
> /var/folders/rm/g9tb1s_53wb86s5_nrsdbxph0000gn/T/tmp8WXq3S/madlib-1.9.1/src/modules/elastic_net/elastic_net_binomial_igd.cpp:2:
> /usr/local/Cellar/gcc/6.2.0/include/c++/6.2.0/cmath:365:3: note: candidate:
> long double std::log(long double)
> log(long double __x)
> ^~~
> /usr/local/Cellar/gcc/6.2.0/include/c++/6.2.0/cmath:361:3: note: candidate:
> float std::log(float)
> log(float __x)
> ^~~
> make[3]: ***
> [src/ports/postgres/9.5/CMakeFiles/madlib_postgresql_9_5.dir/__/__/__/modules/elastic_net/elastic_net_binomial_igd.cpp.o]
> Error 1
> make[3]: *** Waiting for unfinished jobs....
> make[2]: ***
> [src/ports/postgres/9.5/CMakeFiles/madlib_postgresql_9_5.dir/all] Error 2
> make[1]: *** [all] Error 2
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)