Installing g6k (arm-fixes) on M1: suggestion and error report
Hi,
need help with installing g6k on Mac M1. I do the following steps
- I install fplll, fpylll, all the dependencies, and the requirements in a conda environment (with Python 3.12.4).
- I git-clone g6k, arm-fixes branch.
Upon running
python setup.py build_ext --inplace, I receive exactly the same error as in https://github.com/fplll/g6k/issues/123#issue-2182986708 In the master branch, the erroneous line in siever.pyx has been changed fromdef insert_best_lift(self, scoring=(lambda index, nlen, olen, aux: True), aux=None):todef insert_best_lift(self, scoring=None, aux=None):and inside the function
if scoring is None:
scoring = lambda index, nlen, olen, aux: True
I changed that in arm-fixes, and the error was gone, g6k/siever.pyx was cythonized.
However, now I'm getting another error:
simd.inl: In function 'Simd::SmallVecType Simd::m128_add_epi64(SmallVecType, SmallVecType)':
simd.inl:119:74: internal compiler error: in aarch64_function_arg_alignment, at config/aarch64/aarch64.cc:6715
119 | const Simd::SmallVecType b)
For some reasons, it complains on a subset of functions inside simd.inl. Tried to change SmallVecType to Simd::SmallVecType in the arguments to the function Simd::SmallVecType Simd::m128_add_epi64, it didn't help.
I have no idea what this arg_alignment error means. Would appreciate some help here.
Hi @ElenaKirshanova : I will take a look into this later on today and get back to you.
The issue has been resolved. The problem was in the compiler. In my system I have a g++ compiler from homebrew, which was picked up here for the compilation. I do not know if there is a bug in this compiler, but switching to Apple's original clang finishes the installation normally. So I had to do the following
python setup.py build_ext --inplace #to be able to run make clean next
make clean
./configure CXX=/usr/bin/g++ #this is where Apple's clang is
python setup.py build_ext --inplace
We can close the issue but I think it will be nice to fix def insert_best_lift first. I can create a PR if you find it useful.
Hi @ElenaKirshanova: I've just updated PR #108 to cover this (as far as I know, the issue was already solved in cf7b6b8, but I hadn't rebased that branch in a while). If it solves your issue, then I'll close this (and when I get some time, work on getting PR #108 merged)