facebook/redex

run autoreconf -ivf && ./configure && make failed

wowkakloov opened this issue · 3 comments

env:
MacOS Monterey 12.5.1
autoreconf (GNU Autoconf) 2.71
GNU Make 3.81

log:
...
service/method-outliner -I./service/method-merger -I./service/kotlin-instance-rewrite -I./service/reduce-boolean-branches -I./service/reference-update -I./service/regalloc -I./service/regalloc-fast -I./service/resources -I./service/shrinker -I./service/switch-dispatch -I./service/switch-partitioning -I./service/type-analysis -I./service/type-string-rewriter -I./shared -I./sparta/include -I./tools/common -I./tools/redexdump -I./util -I/usr/include/jsoncpp --std=gnu++17 -O3 -Wall -g -std=gnu++17 -MT opt/outliner/redex_all-ClosureAggregator.o -MD -MP -MF opt/outliner/.deps/redex_all-ClosureAggregator.Tpo -c -o opt/outliner/redex_all-ClosureAggregator.o test -f 'opt/outliner/ClosureAggregator.cpp' || echo './'opt/outliner/ClosureAggregator.cpp
In file included from opt/outliner/ClosureAggregator.cpp:8:
./opt/outliner/ClosureAggregator.h:32:44: error: implicit instantiation of undefined template 'std::array<unsigned int, 11>'
std::array<uint32_t, INFREQUENT_COUNT> infrequent_code_sizes{};
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__tuple:219:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
^
In file included from opt/outliner/ClosureAggregator.cpp:8:
./opt/outliner/ClosureAggregator.h:42:43: error: implicit instantiation of undefined template 'std::array<int, 11>'
std::array<int32_t, INFREQUENT_COUNT> infrequent_code_sizes{};
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__tuple:219:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
^
In file included from opt/outliner/ClosureAggregator.cpp:8:
In file included from ./opt/outliner/ClosureAggregator.h:10:
In file included from ./opt/outliner/MethodClosures.h:11:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/unordered_map:437:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__hash_table:2107:29: error: cannot initialize object parameter of type 'std::__hash_node_base<std::__hash_node<std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>, void *> *>' with an expression of type 'std::__hash_node<std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>, void *>'
__pn->_next = __h.get()->__ptr();
^~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/unordered_map:1743:21: note: in instantiation of function template specialization 'std::__hash_table<std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>, std::__unordered_map_hasher<const method_splitting_impl::Closure *, std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>, std::hash<const method_splitting_impl::Closure *>, std::equal_to<const method_splitting_impl::Closure *>, true>, std::__unordered_map_equal<const method_splitting_impl::Closure *, std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>, std::equal_to<const method_splitting_impl::Closure *>, std::hash<const method_splitting_impl::Closure *>, true>, std::allocator<std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>>>::__emplace_unique_key_args<const method_splitting_impl::Closure *, const std::piecewise_construct_t &, std::tuple<const method_splitting_impl::Closure *const &>, std::tuple<>>' requested here
return _table.__emplace_unique_key_args(__k,
^
opt/outliner/ClosureAggregator.cpp:87:26: note: in instantiation of member function 'std::unordered_map<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>::operator[]' requested here
affected_closures[affected_closure]
^
In file included from opt/outliner/ClosureAggregator.cpp:8:
In file included from ./opt/outliner/ClosureAggregator.h:10:
In file included from ./opt/outliner/MethodClosures.h:11:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/unordered_map:437:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__hash_table:2112:23: error: cannot initialize object parameter of type 'std::__hash_node_base<std::__hash_node<std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>, void *> *>' with an expression of type 'std::__hash_node<std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>, void *>'
= __h.get()->__ptr();
^~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__hash_table:2119:16: error: static_cast from 'std::unique_ptr<std::__hash_node<std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>, void *>, std::__hash_node_destructor<std::allocator<std::__hash_node<std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>, void *>>>>::pointer' (aka 'std::__hash_node<std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>, void *> *') to 'std::__hash_table<std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>, std::__unordered_map_hasher<const method_splitting_impl::Closure *, std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>, std::hash<const method_splitting_impl::Closure *>, std::equal_to<const method_splitting_impl::Closure *>, true>, std::__unordered_map_equal<const method_splitting_impl::Closure *, std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>, std::equal_to<const method_splitting_impl::Closure *>, std::hash<const method_splitting_impl::Closure *>, true>, std::allocator<std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>>>::__next_pointer' (aka 'std::__hash_node_base<std::__hash_node<std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfoDelta>, void *> *> *'), which are not related by inheritance, is not allowed
__nd = static_cast<__next_pointer>(__h.release());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from opt/outliner/ClosureAggregator.cpp:8:
In file included from ./opt/outliner/ClosureAggregator.h:10:
In file included from ./opt/outliner/MethodClosures.h:11:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/unordered_map:836:76: error: binding reference of type 'pair<...>' to value of type 'const pair<...>' drops 'const' qualifier
pointer operator->() const {return pointer_traits::pointer_to(_i->__get_value());}
^~~~~~~~~~~~~~~~~~~
opt/outliner/ClosureAggregator.cpp:114:45: note: in instantiation of member function 'std::__hash_map_iterator<std::__hash_iterator<std::__hash_node<std::__hash_value_type<const method_splitting_impl::Closure *, method_splitting_impl::ClosureAggregator::ClosureInfo>, void *> *>>::operator->' requested here
const auto& closure_info = closure_info_it->second;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/pointer_traits.h:153:67: note: passing argument to parameter '__r' here
__nat, element_type>::type& __r) _NOEXCEPT
^
6 errors generated.
make[2]: *** [opt/outliner/redex_all-ClosureAggregator.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I couldn't reproduce your issue, but can you check if this fixes it? #789
Some other includes might be needed.

Hi @NTillmann , i try to update the changed of #789, but still same failed.

We merged a new version of #789, which hopefully fixed this issue.