semigroups / Semigroups

The GAP package Semigroups
https://semigroups.github.io/Semigroups/
Other
23 stars 35 forks source link

Problem building 'main' branch of Semigroups #977

Closed ChrisJefferson closed 7 months ago

ChrisJefferson commented 7 months ago

I'm trying to build the main branch. I made sure to reset everything, then ran ./autogen.sh; ./prerequisites.sh; ./configure; make.

I get the following error:

   GAC     src/cong.cpp => gen/src/cong.o
In file included from ./bin/include/libsemigroups/HPCombi/include/hpcombi.hpp:19,
                 from ./bin/include/libsemigroups/hpcombi.hpp:35,
                 from ./bin/include/libsemigroups/transf.hpp:49,
                 from src/to_cpp.hpp:61,
                 from src/cong.cpp:29:
./bin/include/libsemigroups/HPCombi/include/epu.hpp:42:17: note: ‘#pragma message: Using a constexpr broken compiler ! Performance may not be optimal’
   42 |                 "Performance may not be optimal"
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./bin/include/libsemigroups/HPCombi/include/epu.hpp:64:29: error: static assertion failed: xpu8 type is not properly aligned by the compiler !
   64 | static_assert(alignof(xpu8) == 32,
      |               ~~~~~~~~~~~~~~^~~~~
./bin/include/libsemigroups/HPCombi/include/epu.hpp:64:29: note: the comparison reduces to ‘(16 == 32)’
./bin/include/libsemigroups/HPCombi/include/epu.hpp: In function ‘bool HPCombi::is_all_zero(epu8)’:
./bin/include/libsemigroups/HPCombi/include/epu.hpp:205:57: note: use ‘-flax-vector-conversions’ to permit conversions between vectors with differing element types or numbers of subparts
  205 | inline bool is_all_zero(epu8 a) { return _mm_testz_si128(a, a); }
./bin/include/libsemigroups/HPCombi/include/epu.hpp:205:57: note: use ‘-flax-vector-conversions’ to permit conversions between vectors with differing element types or numbers of subparts
  205 | inline bool is_all_zero(epu8 a) { return _mm_testz_si128(a, a); }
      |                                          ~~~~~~~~~~~~~~~^~~~~~
./bin/include/libsemigroups/HPCombi/include/epu.hpp:205:58: error: cannot convert ‘HPCombi::epu8’ {aka ‘__vector(16) unsigned char’} to ‘__m128i’
  205 | inline bool is_all_zero(epu8 a) { return _mm_testz_si128(a, a); }
      |                                                          ^
      |                                                          |
      |                                                          HPCombi::epu8 {aka __vector(16) unsigned char}

I'm running the latest Ubuntu, with gcc 13.2.0. I don't think I'm doing anything unusual, but let me know if you want me to test or check anything.

ChrisJefferson commented 7 months ago

I had a quick look -- I can fix this by copying the flags -mavx -flax-vector-conversions from libsemigroups to the GAP kernel GNUmakefile, but then something else breaks later in building.

james-d-mitchell commented 7 months ago

Thanks @ChrisJefferson you can disable this using '--disable-hpcombi' as a temporary fix.

james-d-mitchell commented 7 months ago

I think I've resolved this in PR #978, can you please confirm @ChrisJefferson ?

james-d-mitchell commented 7 months ago

Resolved in v5.3.4