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

[C++] Compiler error with GLog and unity build enabled #27141

Closed
asfimport opened this issue Jan 13, 2021 · 1 comment
Closed

[C++] Compiler error with GLog and unity build enabled #27141

asfimport opened this issue Jan 13, 2021 · 1 comment
Assignees
Milestone

Comments

@asfimport
Copy link

In file included from src/arrow/CMakeFiles/arrow_objlib.dir/Unity/unity_8_cxx.cxx:7:
In file included from /home/antoine/arrow/dev/cpp/src/arrow/util/logging.cc:29:
glog_ep-prefix/src/glog_ep/include/glog/logging.h:640:9: error: use of overloaded operator '<<' is ambiguous (with operand types 'std::ostream' (aka 'basic_ostream<char>') and 'const nullptr_t')
  (*os) << v;
  ~~~~~ ^  ~
glog_ep-prefix/src/glog_ep/include/glog/logging.h:696:3: note: in instantiation of function template specialization 'google::MakeCheckOpValueString<nullptr_t>' requested here
  MakeCheckOpValueString(comb.ForVar2(), v2);
  ^
glog_ep-prefix/src/glog_ep/include/glog/logging.h:720:1: note: in instantiation of function template specialization 'google::MakeCheckOpString<std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::hash<std::string>, std::equal_to<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > > > *, nullptr_t>' requested here
DEFINE_CHECK_OP_IMPL(Check_NE, !=)  // Use CHECK(x == NULL) instead.
^
glog_ep-prefix/src/glog_ep/include/glog/logging.h:709:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, exprtext); \
                ^
/home/antoine/arrow/dev/cpp/src/arrow/util/key_value_metadata.cc:75:3: note: in instantiation of function template specialization 'google::Check_NEImpl<std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::hash<std::string>, std::equal_to<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > > > *, nullptr_t>' requested here
  DCHECK_NE(out, nullptr);
  ^
glog_ep-prefix/src/glog_ep/include/glog/logging.h:996:31: note: expanded from macro 'DCHECK_NE'
#define DCHECK_NE(val1, val2) CHECK_NE(val1, val2)
                              ^
glog_ep-prefix/src/glog_ep/include/glog/logging.h:791:30: note: expanded from macro 'CHECK_NE'
#define CHECK_NE(val1, val2) CHECK_OP(_NE, !=, val1, val2)
                             ^
glog_ep-prefix/src/glog_ep/include/glog/logging.h:766:3: note: expanded from macro 'CHECK_OP'
  CHECK_OP_LOG(name, op, val1, val2, google::LogMessageFatal)
  ^
glog_ep-prefix/src/glog_ep/include/glog/logging.h:746:18: note: expanded from macro 'CHECK_OP_LOG'
         google::Check##name##Impl(                      \
                 ^
<scratch space>:101:1: note: expanded from here
Check_NEImpl
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ostream:108:7: note: candidate function
      operator<<(__ostream_type& (*__pf)(__ostream_type&))
      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ostream:117:7: note: candidate function
      operator<<(__ios_type& (*__pf)(__ios_type&))
      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ostream:127:7: note: candidate function
      operator<<(ios_base& (*__pf) (ios_base&))
      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ostream:245:7: note: candidate function
      operator<<(const void* __p)
      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ostream:276:7: note: candidate function
      operator<<(__streambuf_type* __sb);
      ^

Reporter: Antoine Pitrou / @pitrou
Assignee: Antoine Pitrou / @pitrou

PRs and other links:

Note: This issue was originally created as ARROW-11237. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Antoine Pitrou / @pitrou:
Issue resolved by pull request 9190
#9190

@asfimport asfimport added this to the 3.0.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants