pyeda icon indicating copy to clipboard operation
pyeda copied to clipboard

PyEDA fails to build.

Open matj1 opened this issue 8 months ago • 2 comments

If I try to install PyEDA with pip install pyeda, it fails with this error:

thirdparty/espresso/src/cofactor.c:351:50: error: passing argument 4 of ‘qsort’ from incompatible pointer type [-Wincompatible-pointer-types]
  351 |     qsort((char *) (T+2), ncubes, sizeof(set *), d1_order);
      |                                                  ^~~~~~~~
      |                                                  |
      |                                                  int (*)(set **, set **) {aka int (*)(unsigned int **, unsigned int **)}
In file included from thirdparty/espresso/src/utility.h:6,
                 from thirdparty/espresso/src/espresso.h:8,
                 from thirdparty/espresso/src/cofactor.c:3:
/usr/include/stdlib.h:971:34: note: expected ‘__compar_fn_t’ {aka ‘int (*)(const void *, const void *)’} but argument is of type ‘int (*)(set **, set **)’ {aka ‘int (*)(unsigned int **, unsigned int **)’}
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1

I use Python 3.13.2 on Arch Linux.

The full report
Collecting pyeda
  Using cached pyeda-0.29.0.tar.gz (486 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyeda
  Building wheel for pyeda (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pyeda (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [82 lines of output]
      /tmp/pip-build-env-59e_gu21/overlay/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!
      
              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:
      
              License :: OSI Approved :: BSD License
      
              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************
      
      !!
        self._finalize_license_expression()
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-313/pyeda
      copying pyeda/util.py -> build/lib.linux-x86_64-cpython-313/pyeda
      copying pyeda/inter.py -> build/lib.linux-x86_64-cpython-313/pyeda
      copying pyeda/__init__.py -> build/lib.linux-x86_64-cpython-313/pyeda
      creating build/lib.linux-x86_64-cpython-313/pyeda/boolalg
      copying pyeda/boolalg/table.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg
      copying pyeda/boolalg/minimization.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg
      copying pyeda/boolalg/expr.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg
      copying pyeda/boolalg/boolfunc.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg
      copying pyeda/boolalg/bfarray.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg
      copying pyeda/boolalg/bdd.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg
      copying pyeda/boolalg/__init__.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg
      creating build/lib.linux-x86_64-cpython-313/pyeda/logic
      copying pyeda/logic/sudoku.py -> build/lib.linux-x86_64-cpython-313/pyeda/logic
      copying pyeda/logic/graycode.py -> build/lib.linux-x86_64-cpython-313/pyeda/logic
      copying pyeda/logic/aes.py -> build/lib.linux-x86_64-cpython-313/pyeda/logic
      copying pyeda/logic/addition.py -> build/lib.linux-x86_64-cpython-313/pyeda/logic
      copying pyeda/logic/__init__.py -> build/lib.linux-x86_64-cpython-313/pyeda/logic
      creating build/lib.linux-x86_64-cpython-313/pyeda/parsing
      copying pyeda/parsing/token.py -> build/lib.linux-x86_64-cpython-313/pyeda/parsing
      copying pyeda/parsing/pla.py -> build/lib.linux-x86_64-cpython-313/pyeda/parsing
      copying pyeda/parsing/lex.py -> build/lib.linux-x86_64-cpython-313/pyeda/parsing
      copying pyeda/parsing/dimacs.py -> build/lib.linux-x86_64-cpython-313/pyeda/parsing
      copying pyeda/parsing/boolexpr.py -> build/lib.linux-x86_64-cpython-313/pyeda/parsing
      copying pyeda/parsing/__init__.py -> build/lib.linux-x86_64-cpython-313/pyeda/parsing
      creating build/lib.linux-x86_64-cpython-313/pyeda/test
      copying pyeda/test/__init__.py -> build/lib.linux-x86_64-cpython-313/pyeda/test
      creating build/lib.linux-x86_64-cpython-313/pyeda/boolalg/test
      copying pyeda/boolalg/test/test_table.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg/test
      copying pyeda/boolalg/test/test_picosat.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg/test
      copying pyeda/boolalg/test/test_exxpr.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg/test
      copying pyeda/boolalg/test/test_expr.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg/test
      copying pyeda/boolalg/test/test_espresso.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg/test
      copying pyeda/boolalg/test/test_boolfunc.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg/test
      copying pyeda/boolalg/test/test_bfarray.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg/test
      copying pyeda/boolalg/test/test_bdd.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg/test
      copying pyeda/boolalg/test/__init__.py -> build/lib.linux-x86_64-cpython-313/pyeda/boolalg/test
      creating build/lib.linux-x86_64-cpython-313/pyeda/logic/test
      copying pyeda/logic/test/test_sudoku.py -> build/lib.linux-x86_64-cpython-313/pyeda/logic/test
      copying pyeda/logic/test/test_graycode.py -> build/lib.linux-x86_64-cpython-313/pyeda/logic/test
      copying pyeda/logic/test/test_addition.py -> build/lib.linux-x86_64-cpython-313/pyeda/logic/test
      copying pyeda/logic/test/__init__.py -> build/lib.linux-x86_64-cpython-313/pyeda/logic/test
      creating build/lib.linux-x86_64-cpython-313/pyeda/parsing/test
      copying pyeda/parsing/test/test_pla.py -> build/lib.linux-x86_64-cpython-313/pyeda/parsing/test
      copying pyeda/parsing/test/test_dimacs.py -> build/lib.linux-x86_64-cpython-313/pyeda/parsing/test
      copying pyeda/parsing/test/test_boolexpr.py -> build/lib.linux-x86_64-cpython-313/pyeda/parsing/test
      copying pyeda/parsing/test/__init__.py -> build/lib.linux-x86_64-cpython-313/pyeda/parsing/test
      running build_ext
      building 'pyeda.boolalg.espresso' extension
      creating build/temp.linux-x86_64-cpython-313/pyeda/boolalg
      creating build/temp.linux-x86_64-cpython-313/thirdparty/espresso/src
      gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -Ithirdparty/espresso/src -I/home/matj1/trappist-fork-venv/include -I/usr/include/python3.13 -c pyeda/boolalg/espressomodule.c -o build/temp.linux-x86_64-cpython-313/pyeda/boolalg/espressomodule.o
      gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -Ithirdparty/espresso/src -I/home/matj1/trappist-fork-venv/include -I/usr/include/python3.13 -c thirdparty/espresso/src/cofactor.c -o build/temp.linux-x86_64-cpython-313/thirdparty/espresso/src/cofactor.o
      thirdparty/espresso/src/cofactor.c: In function ‘simplify_cubelist’:
      thirdparty/espresso/src/cofactor.c:351:50: error: passing argument 4 of ‘qsort’ from incompatible pointer type [-Wincompatible-pointer-types]
        351 |     qsort((char *) (T+2), ncubes, sizeof(set *), d1_order);
            |                                                  ^~~~~~~~
            |                                                  |
            |                                                  int (*)(set **, set **) {aka int (*)(unsigned int **, unsigned int **)}
      In file included from thirdparty/espresso/src/utility.h:6,
                       from thirdparty/espresso/src/espresso.h:8,
                       from thirdparty/espresso/src/cofactor.c:3:
      /usr/include/stdlib.h:971:34: note: expected ‘__compar_fn_t’ {aka ‘int (*)(const void *, const void *)’} but argument is of type ‘int (*)(set **, set **)’ {aka ‘int (*)(unsigned int **, unsigned int **)’}
        971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
            |                    ~~~~~~~~~~~~~~^~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyeda
Failed to build pyeda
ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyeda)

matj1 avatar Apr 08 '25 15:04 matj1

The compilation works with Python 3.10 (on a different system). So I think that the failure is caused by the Python version.

matj1 avatar Apr 08 '25 17:04 matj1

#186

NN--- avatar Jun 19 '25 11:06 NN---