Skip to content

Trying to fix compilation error with GCC 10.2 #2

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

Merged
merged 1 commit into from
Nov 1, 2020

Conversation

AlexanderSeizinger
Copy link
Collaborator

Trying to fix compilation with GCC10.2 (tried with comparable example with GCC10.1).
Added mod config file for BA10.24.

@abma abma merged commit 1e71301 into spring:master Nov 1, 2020
@abma
Copy link
Collaborator

abma commented Nov 1, 2020

thank you!

@abma
Copy link
Collaborator

abma commented Nov 1, 2020

still fails:

[2/5] Building CXX object AI/Skirmish/AAI/CMakeFiles/AAI.dir/AAIExecute.cpp.o FAILED: AI/Skirmish/AAI/CMakeFiles/AAI.dir/AAIExecute.cpp.o /usr/lib/ccache/c++ -DAAI_EXPORTS -DASIO_STANDALONE -DBUILDING_AI -DBUILDING_SKIRMISH_AI -DSPRING_DATADIR=\"/usr/local/share/games/spring\" -DSYNCCHECK -DTHREADPOOL -D_GLIBCXX_USE_NANOSLEEP -D_GNU_SOURCE=1 -D_RANDOM_TCC -D_REENTRANT -Irts -Isrc-generated/engine -Irts/ExternalAI/Interface -IAI/Wrappers -fuse-ld=gold -std=c++17 -fdiagnostics-color=auto -march=x86-64 -msse -mfpmath=sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a -mno-avx -mno-fma -mno-fma4 -mno-xop -mno-lwp -mno-avx2 -fsingle-precision-constant -frounding-math -mieee-fp -pipe -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -pthread -O2 -Wformat -Wformat-security -DNDEBUG -g -fPIC -fpic -MD -MT AI/Skirmish/AAI/CMakeFiles/AAI.dir/AAIExecute.cpp.o -MF AI/Skirmish/AAI/CMakeFiles/AAI.dir/AAIExecute.cpp.o.d -o AI/Skirmish/AAI/CMakeFiles/AAI.dir/AAIExecute.cpp.o -c AI/Skirmish/AAI/AAIExecute.cpp In file included from /usr/include/c++/10/map:60, from AI/Wrappers/LegacyCpp/WeaponDef.h:6, from AI/Wrappers/LegacyCpp/aibase.h:8, from AI/Wrappers/LegacyCpp/IGlobalAI.h:9, from AI/Skirmish/AAI/AAI.h:14, from AI/Skirmish/AAI/AAIExecute.cpp:11: /usr/include/c++/10/bits/stl_tree.h: In instantiation of ‘static const _Key& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_S_key(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type) [with _Key = std::pair<int, float>; _Val = std::pair<int, float>; _KeyOfValue = std::_Identity<std::pair<int, float> >; _Compare = CompareConstructionUrgency; _Alloc = std::allocator<std::pair<int, float> >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type = const std::_Rb_tree_node<std::pair<int, float> >*]’: /usr/include/c++/10/bits/stl_tree.h:2101:47: required from ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_unique_pos(const key_type&) [with _Key = std::pair<int, float>; _Val = std::pair<int, float>; _KeyOfValue = std::_Identity<std::pair<int, float> >; _Compare = CompareConstructionUrgency; _Alloc = std::allocator<std::pair<int, float> >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = std::pair<int, float>]’ /usr/include/c++/10/bits/stl_tree.h:2154:4: required from ‘std::pair<std::_Rb_tree_iterator<_Val>, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(_Arg&&) [with _Arg = std::pair<int, float>; _Key = std::pair<int, float>; _Val = std::pair<int, float>; _KeyOfValue = std::_Identity<std::pair<int, float> >; _Compare = CompareConstructionUrgency; _Alloc = std::allocator<std::pair<int, float> >]’ /usr/include/c++/10/bits/stl_set.h:521:25: required from ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = std::pair<int, float>; _Compare = CompareConstructionUrgency; _Alloc = std::allocator<std::pair<int, float> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::pair<int, float>, std::pair<int, float>, std::_Identity<std::pair<int, float> >, CompareConstructionUrgency, std::allocator<std::pair<int, float> > >::const_iterator; std::set<_Key, _Compare, _Alloc>::value_type = std::pair<int, float>]’ AI/Skirmish/AAI/AAIExecute.cpp:2061:85: required from here /usr/include/c++/10/bits/stl_tree.h:780:8: error: static assertion failed: comparison object must be invocable as const 780 | is_invocable_v<const _Compare&, const _Key&, const _Key&>, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [4/5] Building CXX object AI/Skirmish/AAI/CMakeFiles/AAI.dir/AAIUnitTable.cpp.o ninja: build stopped: cannot make progress due to previous errors.

@abma
Copy link
Collaborator

abma commented Nov 1, 2020

better readable: https://paste.springfiles.com/view/raw/5045b870

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.

2 participants