You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@madlib.apache.org by "Orhan Kislal (JIRA)" <ji...@apache.org> on 2018/05/10 18:23:00 UTC

[jira] [Commented] (MADLIB-1025) Support modern versions of gcc

    [ https://issues.apache.org/jira/browse/MADLIB-1025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16470904#comment-16470904 ] 

Orhan Kislal commented on MADLIB-1025:
--------------------------------------

The string issue can be fixed by the -D_GLIBCXX_USE_CXX11_ABI=0 flag. Thanks to [~nikhilkak] and [~riyer] for this fix.

After applying this fix, the IC passes on default builds but not on release. It seems the cause of these failures is the optimization level of the compiler. cmake defaults to -O3 for Release builds. If we add -O2 via "add_compile_options" function of cmake, we can eliminate some of these errors. Since the -O3 is quite aggressive in optimization I believe it is acceptable to change. We should continue to provide convenience binaries compiled with gcc4 to make sure existing users can easily upgrade.

The default build type (RelWithDebInfo) already uses -O2 and should not be affected by this issue.

> Support modern versions of gcc
> ------------------------------
>
>                 Key: MADLIB-1025
>                 URL: https://issues.apache.org/jira/browse/MADLIB-1025
>             Project: Apache MADlib
>          Issue Type: Bug
>          Components: Build System
>            Reporter: Rahul Iyer
>            Priority: Major
>             Fix For: v1.15
>
>
> 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
(v7.6.3#76005)