Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-3580: [Gandiva][C++] Fix build error with g++ 8.2.0 #2806

Closed

Conversation

kou
Copy link
Member

@kou kou commented Oct 20, 2018

Error message1:

In file included from /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/expr_decomposer.cc:27:
/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:46:27: error: 'function' in namespace 'std' does not name a template type
   using maker_type = std::function<Status(const FunctionNode&, FunctionHolderPtr*)>;
                           ^~~~~~~~
/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:46:22: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:30:1:
+#include <functional>

/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:46:22:
   using maker_type = std::function<Status(const FunctionNode&, FunctionHolderPtr*)>;
                      ^~~
/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:47:52: error: 'maker_type' was not declared in this scope
   using map_type = std::unordered_map<std::string, maker_type>;
                                                    ^~~~~~~~~~
/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:47:52: note: suggested alternative: 'decltype'
   using map_type = std::unordered_map<std::string, maker_type>;
                                                    ^~~~~~~~~~
                                                    decltype
/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:47:62: error: template argument 2 is invalid
   using map_type = std::unordered_map<std::string, maker_type>;
                                                              ^
/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:47:62: error: template argument 5 is invalid
/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:60:10: error: 'map_type' does not name a type; did you mean 'iswctype'?
   static map_type& makers() {
          ^~~~~~~~
          iswctype
/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h: In static member function 'static gandiva::Status gandiva::FunctionHolderRegistry::Make(const string&, const gandiva::FunctionNode&, gandiva::FunctionHolderPtr*)':
/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:51:18: error: 'makers' was not declared in this scope
     auto found = makers().find(name);
                  ^~~~~~
/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:51:18: note: suggested alternative: 'Make'
     auto found = makers().find(name);
                  ^~~~~~
                  Make

Message2:

/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/tree_expr_builder.cc: In static member function 'static gandiva::NodePtr gandiva::TreeExprBuilder::MakeNull(gandiva::DataTypePtr)':
/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/tree_expr_builder.cc:78:70: error: 'float_t' was not declared in this scope
       return std::make_shared<LiteralNode>(data_type, LiteralHolder((float_t)0), true);
                                                                      ^~~~~~~
/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/tree_expr_builder.cc:78:70: note: suggested alternative: 'float'
       return std::make_shared<LiteralNode>(data_type, LiteralHolder((float_t)0), true);
                                                                      ^~~~~~~
                                                                      float
/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/tree_expr_builder.cc:80:70: error: 'double_t' was not declared in this scope
       return std::make_shared<LiteralNode>(data_type, LiteralHolder((double_t)0), true);
                                                                      ^~~~~~~~
/home/kou/work/cpp/arrow.kou/cpp/src/gandiva/tree_expr_builder.cc:80:70: note: suggested alternative: 'double'
       return std::make_shared<LiteralNode>(data_type, LiteralHolder((double_t)0), true);
                                                                      ^~~~~~~~
                                                                      double

Error message1:

    In file included from /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/expr_decomposer.cc:27:
    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:46:27: error: 'function' in namespace 'std' does not name a template type
       using maker_type = std::function<Status(const FunctionNode&, FunctionHolderPtr*)>;
                               ^~~~~~~~
    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:46:22: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:30:1:
    +#include <functional>

    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:46:22:
       using maker_type = std::function<Status(const FunctionNode&, FunctionHolderPtr*)>;
                          ^~~
    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:47:52: error: 'maker_type' was not declared in this scope
       using map_type = std::unordered_map<std::string, maker_type>;
                                                        ^~~~~~~~~~
    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:47:52: note: suggested alternative: 'decltype'
       using map_type = std::unordered_map<std::string, maker_type>;
                                                        ^~~~~~~~~~
                                                        decltype
    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:47:62: error: template argument 2 is invalid
       using map_type = std::unordered_map<std::string, maker_type>;
                                                                  ^
    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:47:62: error: template argument 5 is invalid
    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:60:10: error: 'map_type' does not name a type; did you mean 'iswctype'?
       static map_type& makers() {
              ^~~~~~~~
              iswctype
    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h: In static member function 'static gandiva::Status gandiva::FunctionHolderRegistry::Make(const string&, const gandiva::FunctionNode&, gandiva::FunctionHolderPtr*)':
    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:51:18: error: 'makers' was not declared in this scope
         auto found = makers().find(name);
                      ^~~~~~
    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/function_holder_registry.h:51:18: note: suggested alternative: 'Make'
         auto found = makers().find(name);
                      ^~~~~~
                      Make

Message2:

    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/tree_expr_builder.cc: In static member function 'static gandiva::NodePtr gandiva::TreeExprBuilder::MakeNull(gandiva::DataTypePtr)':
    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/tree_expr_builder.cc:78:70: error: 'float_t' was not declared in this scope
           return std::make_shared<LiteralNode>(data_type, LiteralHolder((float_t)0), true);
                                                                          ^~~~~~~
    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/tree_expr_builder.cc:78:70: note: suggested alternative: 'float'
           return std::make_shared<LiteralNode>(data_type, LiteralHolder((float_t)0), true);
                                                                          ^~~~~~~
                                                                          float
    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/tree_expr_builder.cc:80:70: error: 'double_t' was not declared in this scope
           return std::make_shared<LiteralNode>(data_type, LiteralHolder((double_t)0), true);
                                                                          ^~~~~~~~
    /home/kou/work/cpp/arrow.kou/cpp/src/gandiva/tree_expr_builder.cc:80:70: note: suggested alternative: 'double'
           return std::make_shared<LiteralNode>(data_type, LiteralHolder((double_t)0), true);
                                                                          ^~~~~~~~
                                                                          double
Copy link
Member

@xhochy xhochy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM

Windows failure is unrelated to this patch set (zstd was build with the wrong flags).

@xhochy xhochy closed this in d1e7ab9 Oct 21, 2018
@kou kou deleted the cpp-gandiva-fix-build-error-with-g++-8.2.0 branch October 22, 2018 00:00
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.

None yet

2 participants