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

Build error on Arch Linux #100

Closed
yuvadm opened this issue Aug 17, 2024 · 5 comments
Closed

Build error on Arch Linux #100

yuvadm opened this issue Aug 17, 2024 · 5 comments

Comments

@yuvadm
Copy link

yuvadm commented Aug 17, 2024

Build error:

[ 14%] Built target Base
[ 15%] Building CXX object source/EngineInterface/CMakeFiles/EngineInterface.dir/SimulationParameters.cpp.o
[ 15%] Building CXX object source/Network/CMakeFiles/Network.dir/NetworkService.cpp.o
[ 16%] Building CXX object source/Network/CMakeFiles/Network.dir/NetworkResourceParserService.cpp.o
[ 16%] Building CXX object source/EngineInterface/CMakeFiles/EngineInterface.dir/SpaceCalculator.cpp.o
In file included from /usr/include/c++/14.2.1/array:43,
                 from /home/yuval/dev/alien/source/Base/Definitions.h:3,
                 from /home/yuval/dev/alien/source/EngineInterface/DescriptionEditService.h:3,
                 from /home/yuval/dev/alien/source/EngineInterface/DescriptionEditService.cpp:1:
In function ‘constexpr decltype (__comp((* __first1), (* __first2))) std::lexicographical_compare_three_way(_InputIter1, _InputIter1, _InputIter2, _InputIter2, _Comp) [with _InputIter1 = __gnu_cxx::__normal_iterator<const unsigned char*, vector<unsigned char> >; _InputIter2 = __gnu_cxx::__normal_iterator<const unsigned char*, vector<unsigned char> >; _Comp = __detail::_Synth3way]’,
    inlined from ‘constexpr std::__detail::__synth3way_t<_Iterator> std::operator<=>(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&) [with _Tp = unsigned char; _Alloc = allocator<unsigned char>]’ at /usr/include/c++/14.2.1/bits/stl_vector.h:2071:52,
    inlined from ‘constexpr bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = std::vector<unsigned char>]’ at /usr/include/c++/14.2.1/bits/stl_function.h:405:20,
    inlined 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::vector<unsigned char>; _Val = std::pair<const std::vector<unsigned char>, long unsigned int>; _KeyOfValue = std::_Select1st<std::pair<const std::vector<unsigned char>, long unsigned int> >; _Compare = std::less<std::vector<unsigned char> >; _Alloc = std::allocator<std::pair<const std::vector<unsigned char>, long unsigned int> >]’ at /usr/include/c++/14.2.1/bits/stl_tree.h:2114:35:
/usr/include/c++/14.2.1/bits/stl_algobase.h:1874:39: error: ‘int __builtin_memcmp(const void*, const void*, long unsigned int)’ specified bound [9223372036854775808, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Werror=stringop-overread]
 1874 |                     = __builtin_memcmp(&*__first1, &*__first2, __blen) <=> 0;
      |         

This comes up as a relevant bug from the past few weeks (albeit on Debian) - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077393 however still not sure how to resolve this.

@mashaal
Copy link

mashaal commented Aug 17, 2024

Running into this as well.

@chrxh
Copy link
Owner

chrxh commented Aug 18, 2024

It seems to be GCC compiler bug with the C++20 spaceship operator. I think the best solution is to use GCC 11 (see https://github.com/chrxh/alien?tab=readme-ov-file#build-instructions).

@mgalgs
Copy link

mgalgs commented Aug 25, 2024

use GCC 11

Quick instructions with relevant definitions:

yay gcc11
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
cmake --build . --config Release -j<whatever>

@chrxh
Copy link
Owner

chrxh commented Aug 27, 2024

Thanks @mgalgs !
@yuvadm Does it solves your problem?

@yuvadm
Copy link
Author

yuvadm commented Aug 27, 2024

Yeah I guess that's good enough for now, thanks guys

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

No branches or pull requests

4 participants