See https://github.com/fplll/fpylll/pull/303 gentoo has a patch here: https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-python/fpylll/files/cython-3.1.patch which fixes it for me