Error building fpylll from Sage 9.2 source

145 views
Skip to first unread message

David Valdez

unread,
Jan 21, 2021, 1:29:41 PM1/21/21
to sage-s...@googlegroups.com
While building Sage 9.2 from source, the `make` process throws an error while building the "fpylll.config" extension. I believe the most relevant log information is: 
   build/src/fpylll/config.cpp:1807:37: error: 'FPLLL_WITH_RECURSIVE_ENUM' was not declared in this scope
   1807 |   __pyx_t_4 = __Pyx_PyBool_FromLong(FPLLL_WITH_RECURSIVE_ENUM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error)
        |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
  error: command 'gcc' failed with exit status 1

What might cause this, and how would I fix it?

(~/sage/config.log is not attached because it was a 0 byte file that can't be opened, and thus couldn't be attached)

If you have any questions or suggestions, please let me know.


Virus-free. www.avast.com
fpylll-0.5.4.log

Dima Pasechnik

unread,
Jan 21, 2021, 1:43:25 PM1/21/21
to sage-support
Could it be due to gcc-10?
I am not sure whether 9.2 was well-tested with gcc-10.


--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/CAC175FX9_i6C5qgCyPGoBviTOURsoHON4ypnLCuVpBWjaVXz9Q%40mail.gmail.com.

David Valdez

unread,
Jan 21, 2021, 1:52:35 PM1/21/21
to sage-support

I'll try that. Thanks!

David Valdez

unread,
Jan 21, 2021, 5:30:02 PM1/21/21
to sage-support
Despite not actually solving the problem, it did result in Sage working, which was my end goal. So thanks!

Matthias Koeppe

unread,
Jan 22, 2021, 10:12:42 PM1/22/21
to sage-support
This failure on Cygwin has been fixed in https://trac.sagemath.org/ticket/31146

Josef Svoboda

unread,
Dec 22, 2022, 7:12:06 PM12/22/22
to sage-support
This looks similar so I will ask here:
I am trying to build sage 9.8.beta6 (which I cloned from github) and I have an issue that fpylll is not installed and sagemath-standard requires it. If I try to install it I get an error:
How do I fix it?


$ sage -pip install fpylll
Collecting fpylll
  Using cached fpylll-0.5.8.tar.gz (1.1 MB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: fpylll
  Building wheel for fpylll (setup.py) ... error
  error: subprocess-exited-with-error
 
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [132 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/fpylll
      copying src/fpylll/__init__.py -> build/lib.linux-x86_64-cpython-310/fpylll
      creating build/lib.linux-x86_64-cpython-310/fpylll/gmp
      copying src/fpylll/gmp/__init__.py -> build/lib.linux-x86_64-cpython-310/fpylll/gmp
      creating build/lib.linux-x86_64-cpython-310/fpylll/fplll
      copying src/fpylll/fplll/__init__.py -> build/lib.linux-x86_64-cpython-310/fpylll/fplll
      creating build/lib.linux-x86_64-cpython-310/fpylll/algorithms
      copying src/fpylll/algorithms/babai.py -> build/lib.linux-x86_64-cpython-310/fpylll/algorithms
      copying src/fpylll/algorithms/bkz2.py -> build/lib.linux-x86_64-cpython-310/fpylll/algorithms
      copying src/fpylll/algorithms/__init__.py -> build/lib.linux-x86_64-cpython-310/fpylll/algorithms
      copying src/fpylll/algorithms/simple_bkz.py -> build/lib.linux-x86_64-cpython-310/fpylll/algorithms
      copying src/fpylll/algorithms/bkz.py -> build/lib.linux-x86_64-cpython-310/fpylll/algorithms
      copying src/fpylll/algorithms/simple_dbkz.py -> build/lib.linux-x86_64-cpython-310/fpylll/algorithms
      creating build/lib.linux-x86_64-cpython-310/fpylll/tools
      copying src/fpylll/tools/bkz_plot.py -> build/lib.linux-x86_64-cpython-310/fpylll/tools
      copying src/fpylll/tools/benchmark.py -> build/lib.linux-x86_64-cpython-310/fpylll/tools
      copying src/fpylll/tools/compare.py -> build/lib.linux-x86_64-cpython-310/fpylll/tools
      copying src/fpylll/tools/quality.py -> build/lib.linux-x86_64-cpython-310/fpylll/tools
      copying src/fpylll/tools/__init__.py -> build/lib.linux-x86_64-cpython-310/fpylll/tools
      copying src/fpylll/tools/bkz_simulator.py -> build/lib.linux-x86_64-cpython-310/fpylll/tools
      copying src/fpylll/tools/bkz_stats.py -> build/lib.linux-x86_64-cpython-310/fpylll/tools
      running build_ext
      Compiling src/fpylll/gmp/pylong.pyx because it changed.
      Compiling src/fpylll/fplll/integer_matrix.pyx because it changed.
      Compiling src/fpylll/fplll/gso.pyx because it changed.
      Compiling src/fpylll/fplll/lll.pyx because it changed.
      Compiling src/fpylll/fplll/wrapper.pyx because it changed.
      Compiling src/fpylll/fplll/bkz_param.pyx because it changed.
      Compiling src/fpylll/fplll/bkz.pyx because it changed.
      Compiling src/fpylll/fplll/enumeration.pyx because it changed.
      Compiling src/fpylll/fplll/svpcvp.pyx because it changed.
      Compiling src/fpylll/fplll/pruner.pyx because it changed.
      Compiling src/fpylll/util.pyx because it changed.
      Compiling src/fpylll/io.pyx because it changed.
      Compiling src/fpylll/config.pyx because it changed.
      Compiling src/fpylll/numpy.pyx because it changed.
      [ 1/14] Cythonizing src/fpylll/config.pyx
      [ 2/14] Cythonizing src/fpylll/fplll/bkz.pyx
      [ 3/14] Cythonizing src/fpylll/fplll/bkz_param.pyx
      [ 4/14] Cythonizing src/fpylll/fplll/enumeration.pyx
      [ 5/14] Cythonizing src/fpylll/fplll/gso.pyx
      [ 6/14] Cythonizing src/fpylll/fplll/integer_matrix.pyx
      [ 7/14] Cythonizing src/fpylll/fplll/lll.pyx
      [ 8/14] Cythonizing src/fpylll/fplll/pruner.pyx
      [ 9/14] Cythonizing src/fpylll/fplll/svpcvp.pyx
      [10/14] Cythonizing src/fpylll/fplll/wrapper.pyx
      [11/14] Cythonizing src/fpylll/gmp/pylong.pyx
      [12/14] Cythonizing src/fpylll/io.pyx
      [13/14] Cythonizing src/fpylll/numpy.pyx
      [14/14] Cythonizing src/fpylll/util.pyx
      build/src/fpylll/gmp/pylong.c: In function ‘__pyx_f_6fpylll_3gmp_6pylong_mpz_get_pylong_large’:
      build/src/fpylll/gmp/pylong.c:1275:13: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from incompatible pointer type ‘PyLongObject *’ {aka ‘struct _longobject *’} [-Wincompatible-pointer-types]
       1275 |   __pyx_t_2 = _PyLong_New(__pyx_v_pylong_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
            |             ^
      build/src/fpylll/fplll/gso.cpp: In function ‘PyObject* __pyx_pf_6fpylll_5fplll_3gso_6MatGSO_50from_canonical(__pyx_obj_6fpylll_5fplll_3gso_MatGSO*, PyObject*, int, int)’:
      build/src/fpylll/fplll/gso.cpp:18675:121: error: ‘class fplll::MatGSO<fplll::Z_NR<__mpz_struct [1]>, fplll::FP_NR<double> >’ has no member named ‘from_canonical’
      18675 |     ((fplll::MatGSO<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *)__pyx_v_self->_core.mpz_d)->from_canonical(__pyx_v_cv.d, __pyx_v_cw.d, __pyx_v_start, __pyx_v_dimension);
            |                                                                                                                         ^~~~~~~~~~~~~~
      build/src/fpylll/fplll/gso.cpp:18735:123: error: ‘class fplll::MatGSO<fplll::Z_NR<__mpz_struct [1]>, fplll::FP_NR<long double> >’ has no member named ‘from_canonical’
      18735 |     ((fplll::MatGSO<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *)__pyx_v_self->_core.mpz_ld)->from_canonical(__pyx_v_cv.ld, __pyx_v_cw.ld, __pyx_v_start, __pyx_v_dimension);
            |                                                                                                                           ^~~~~~~~~~~~~~
      build/src/fpylll/fplll/gso.cpp:18795:98: error: ‘class fplll::MatGSO<fplll::Z_NR<__mpz_struct [1]>, fplll::FP_NR<__mpfr_struct [1]> >’ has no member named ‘from_canonical’
      18795 |     ((fplll::MatGSO<fplll::Z_NR<mpz_t> ,fplll::FP_NR<mpfr_t> >  *)__pyx_v_self->_core.mpz_mpfr)->from_canonical(__pyx_v_cv.mpfr, __pyx_v_cw.mpfr, __pyx_v_start, __pyx_v_dimension);
            |                                                                                                  ^~~~~~~~~~~~~~
      build/src/fpylll/fplll/gso.cpp:18855:121: error: ‘class fplll::MatGSO<fplll::Z_NR<long int>, fplll::FP_NR<double> >’ has no member named ‘from_canonical’
      18855 |     ((fplll::MatGSO<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *)__pyx_v_self->_core.long_d)->from_canonical(__pyx_v_cv.d, __pyx_v_cw.d, __pyx_v_start, __pyx_v_dimension);
            |                                                                                                                         ^~~~~~~~~~~~~~
      build/src/fpylll/fplll/gso.cpp:18915:123: error: ‘class fplll::MatGSO<fplll::Z_NR<long int>, fplll::FP_NR<long double> >’ has no member named ‘from_canonical’
      18915 |     ((fplll::MatGSO<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *)__pyx_v_self->_core.long_ld)->from_canonical(__pyx_v_cv.ld, __pyx_v_cw.ld, __pyx_v_start, __pyx_v_dimension);
            |                                                                                                                           ^~~~~~~~~~~~~~
      build/src/fpylll/fplll/gso.cpp: In function ‘PyObject* __pyx_pf_6fpylll_5fplll_3gso_6MatGSO_52to_canonical(__pyx_obj_6fpylll_5fplll_3gso_MatGSO*, PyObject*, int)’:
      build/src/fpylll/fplll/gso.cpp:19141:121: error: ‘class fplll::MatGSO<fplll::Z_NR<__mpz_struct [1]>, fplll::FP_NR<double> >’ has no member named ‘to_canonical’
      19141 |     ((fplll::MatGSO<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *)__pyx_v_self->_core.mpz_d)->to_canonical(__pyx_v_cw.d, __pyx_v_cv.d, __pyx_v_start);
            |                                                                                                                         ^~~~~~~~~~~~
      build/src/fpylll/fplll/gso.cpp:19201:123: error: ‘class fplll::MatGSO<fplll::Z_NR<__mpz_struct [1]>, fplll::FP_NR<long double> >’ has no member named ‘to_canonical’
      19201 |     ((fplll::MatGSO<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *)__pyx_v_self->_core.mpz_ld)->to_canonical(__pyx_v_cw.ld, __pyx_v_cv.ld, __pyx_v_start);
            |                                                                                                                           ^~~~~~~~~~~~
      build/src/fpylll/fplll/gso.cpp:19261:98: error: ‘class fplll::MatGSO<fplll::Z_NR<__mpz_struct [1]>, fplll::FP_NR<__mpfr_struct [1]> >’ has no member named ‘to_canonical’
      19261 |     ((fplll::MatGSO<fplll::Z_NR<mpz_t> ,fplll::FP_NR<mpfr_t> >  *)__pyx_v_self->_core.mpz_mpfr)->to_canonical(__pyx_v_cw.mpfr, __pyx_v_cv.mpfr, __pyx_v_start);
            |                                                                                                  ^~~~~~~~~~~~
      build/src/fpylll/fplll/gso.cpp:19321:121: error: ‘class fplll::MatGSO<fplll::Z_NR<long int>, fplll::FP_NR<double> >’ has no member named ‘to_canonical’
      19321 |     ((fplll::MatGSO<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *)__pyx_v_self->_core.long_d)->to_canonical(__pyx_v_cw.d, __pyx_v_cv.d, __pyx_v_start);
            |                                                                                                                         ^~~~~~~~~~~~
      build/src/fpylll/fplll/gso.cpp:19381:123: error: ‘class fplll::MatGSO<fplll::Z_NR<long int>, fplll::FP_NR<long double> >’ has no member named ‘to_canonical’
      19381 |     ((fplll::MatGSO<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *)__pyx_v_self->_core.long_ld)->to_canonical(__pyx_v_cw.ld, __pyx_v_cv.ld, __pyx_v_start);
            |                                                                                                                           ^~~~~~~~~~~~
      build/src/fpylll/fplll/gso.cpp: In function ‘PyObject* __pyx_pf_6fpylll_5fplll_3gso_6MatGSO_54babai(__pyx_obj_6fpylll_5fplll_3gso_MatGSO*, PyObject*, int, int, PyObject*)’:
      build/src/fpylll/fplll/gso.cpp:19700:130: error: ‘class fplll::MatGSO<fplll::Z_NR<__mpz_struct [1]>, fplll::FP_NR<double> >’ has no member named ‘babai’
      19700 |       (void)(((fplll::MatGSO<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *)__pyx_v_self->_core.mpz_d)->babai(__pyx_v_cw.mpz, __pyx_v_cv.d, __pyx_v_start, __pyx_v_dimension, __pyx_t_8));
            |                                                                                                                                  ^~~~~
      build/src/fpylll/fplll/gso.cpp:19761:132: error: ‘class fplll::MatGSO<fplll::Z_NR<__mpz_struct [1]>, fplll::FP_NR<long double> >’ has no member named ‘babai’
      19761 |       (void)(((fplll::MatGSO<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *)__pyx_v_self->_core.mpz_ld)->babai(__pyx_v_cw.mpz, __pyx_v_cv.ld, __pyx_v_start, __pyx_v_dimension, __pyx_t_8));
            |                                                                                                                                    ^~~~~
      build/src/fpylll/fplll/gso.cpp:19822:107: error: ‘class fplll::MatGSO<fplll::Z_NR<__mpz_struct [1]>, fplll::FP_NR<__mpfr_struct [1]> >’ has no member named ‘babai’
      19822 |       (void)(((fplll::MatGSO<fplll::Z_NR<mpz_t> ,fplll::FP_NR<mpfr_t> >  *)__pyx_v_self->_core.mpz_mpfr)->babai(__pyx_v_cw.mpz, __pyx_v_cv.mpfr, __pyx_v_start, __pyx_v_dimension, __pyx_t_8));
            |                                                                                                           ^~~~~
      build/src/fpylll/fplll/gso.cpp:19883:130: error: ‘class fplll::MatGSO<fplll::Z_NR<long int>, fplll::FP_NR<double> >’ has no member named ‘babai’
      19883 |       (void)(((fplll::MatGSO<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *)__pyx_v_self->_core.long_d)->babai(__pyx_v_cw.__pyx_long, __pyx_v_cv.d, __pyx_v_start, __pyx_v_dimension, __pyx_t_8));
            |                                                                                                                                  ^~~~~
      build/src/fpylll/fplll/gso.cpp:19944:132: error: ‘class fplll::MatGSO<fplll::Z_NR<long int>, fplll::FP_NR<long double> >’ has no member named ‘babai’
      19944 |       (void)(((fplll::MatGSO<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *)__pyx_v_self->_core.long_ld)->babai(__pyx_v_cw.__pyx_long, __pyx_v_cv.ld, __pyx_v_start, __pyx_v_dimension, __pyx_t_8));
            |                                                                                                                                    ^~~~~
      build/src/fpylll/fplll/gso.cpp:20043:41: error: ‘class fplll::MatGSOInterface<fplll::Z_NR<__mpz_struct [1]>, fplll::FP_NR<double> >’ has no member named ‘babai’
      20043 |       (void)(__pyx_v_self->_core.mpz_d->babai(__pyx_v_cw.mpz, __pyx_v_cv.d, __pyx_v_start, __pyx_v_dimension));
            |                                         ^~~~~
      build/src/fpylll/fplll/gso.cpp:20103:42: error: ‘class fplll::MatGSOInterface<fplll::Z_NR<__mpz_struct [1]>, fplll::FP_NR<long double> >’ has no member named ‘babai’
      20103 |       (void)(__pyx_v_self->_core.mpz_ld->babai(__pyx_v_cw.mpz, __pyx_v_cv.ld, __pyx_v_start, __pyx_v_dimension));
            |                                          ^~~~~
      build/src/fpylll/fplll/gso.cpp:20163:43: error: ‘class fplll::MatGSOInterface<fplll::Z_NR<__mpz_struct [1]>, fplll::FP_NR<dpe_struct [1]> >’ has no member named ‘babai’
      20163 |       (void)(__pyx_v_self->_core.mpz_dpe->babai(__pyx_v_cw.mpz, __pyx_v_cv.dpe, __pyx_v_start, __pyx_v_dimension));
            |                                           ^~~~~
      build/src/fpylll/fplll/gso.cpp:20223:44: error: ‘class fplll::MatGSOInterface<fplll::Z_NR<__mpz_struct [1]>, fplll::FP_NR<__mpfr_struct [1]> >’ has no member named ‘babai’
      20223 |       (void)(__pyx_v_self->_core.mpz_mpfr->babai(__pyx_v_cw.mpz, __pyx_v_cv.mpfr, __pyx_v_start, __pyx_v_dimension));
            |                                            ^~~~~
      build/src/fpylll/fplll/gso.cpp:20283:42: error: ‘class fplll::MatGSOInterface<fplll::Z_NR<long int>, fplll::FP_NR<double> >’ has no member named ‘babai’
      20283 |       (void)(__pyx_v_self->_core.long_d->babai(__pyx_v_cw.__pyx_long, __pyx_v_cv.d, __pyx_v_start, __pyx_v_dimension));
            |                                          ^~~~~
      build/src/fpylll/fplll/gso.cpp:20343:43: error: ‘class fplll::MatGSOInterface<fplll::Z_NR<long int>, fplll::FP_NR<long double> >’ has no member named ‘babai’
      20343 |       (void)(__pyx_v_self->_core.long_ld->babai(__pyx_v_cw.__pyx_long, __pyx_v_cv.ld, __pyx_v_start, __pyx_v_dimension));
            |                                           ^~~~~
      build/src/fpylll/fplll/gso.cpp:20403:44: error: ‘class fplll::MatGSOInterface<fplll::Z_NR<long int>, fplll::FP_NR<dpe_struct [1]> >’ has no member named ‘babai’
      20403 |       (void)(__pyx_v_self->_core.long_dpe->babai(__pyx_v_cw.__pyx_long, __pyx_v_cv.dpe, __pyx_v_start, __pyx_v_dimension));
            |                                            ^~~~~
      build/src/fpylll/fplll/gso.cpp:20463:45: error: ‘class fplll::MatGSOInterface<fplll::Z_NR<long int>, fplll::FP_NR<__mpfr_struct [1]> >’ has no member named ‘babai’
      20463 |       (void)(__pyx_v_self->_core.long_mpfr->babai(__pyx_v_cw.__pyx_long, __pyx_v_cv.mpfr, __pyx_v_start, __pyx_v_dimension));
            |                                             ^~~~~
      error: Command "gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -g -O2 -fPIC -Isrc/fpylll/fplll -I/home/josef/programs/sage/local/var/lib/sage/venv-python3.10.8/lib/python3.10/site-packages/cysignals -I/home/josef/programs/sage/local/var/lib/sage/venv-python3.10.8/include -I/home/josef/programs/sage/local/var/lib/sage/venv-python3.10.8/lib/python3.10/site-packages/numpy/core/include -I/home/josef/programs/sage/local/var/lib/sage/venv-python3.10.8/include/python3.10 -c build/src/fpylll/fplll/gso.cpp -o build/temp.linux-x86_64-cpython-310/build/src/fpylll/fplll/gso.o -std=c++11" failed with exit status 1
      [end of output]
 
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for fpylll
  Running setup.py clean for fpylll
Failed to build fpylll


Best,
Josef

Dima Pasechnik

unread,
Dec 22, 2022, 7:22:47 PM12/22/22
to sage-s...@googlegroups.com
a normal Sage way would be

   make fpylll

(unless you are doing something non-standard)

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages