ztane / python-Levenshtein

The Levenshtein Python C extension module contains functions for fast computation of Levenshtein distance and string similarity
GNU General Public License v2.0
1.26k stars 155 forks source link

pip install failed with command 'gcc' failed with exit status 1 #44

Open Xunius opened 5 years ago

Xunius commented 5 years ago

Hi all, I'm trying to install python-levenshtein in a conda environment, and I got this command 'gcc' failed with exit status 1 error.

I've gcc, the conda is version 4.7.12, the conda environment is a freshly created empty env and is using python3.6 (I tried 3.7 as well), I'm on Manjaro and I installed base-devel (I assume that's the equivalent to build-essential) and python-devtools.

Please help.

The entire dump is:

Building wheels for collected packages: python-levenshtein
  Building wheel for python-levenshtein (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/guangzhi/anaconda3/envs/mtt/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qfsg9aen/python-levenshtein/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qfsg9aen/python-levenshtein/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-d3usalms --python-tag cp36
       cwd: /tmp/pip-install-qfsg9aen/python-levenshtein/
  Complete output (175 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/Levenshtein
  copying Levenshtein/__init__.py -> build/lib.linux-x86_64-3.6/Levenshtein
  copying Levenshtein/StringMatcher.py -> build/lib.linux-x86_64-3.6/Levenshtein
  running egg_info
  writing python_Levenshtein.egg-info/PKG-INFO
  writing dependency_links to python_Levenshtein.egg-info/dependency_links.txt
  writing entry points to python_Levenshtein.egg-info/entry_points.txt
  writing namespace_packages to python_Levenshtein.egg-info/namespace_packages.txt
  writing requirements to python_Levenshtein.egg-info/requires.txt
  writing top-level names to python_Levenshtein.egg-info/top_level.txt
  reading manifest file 'python_Levenshtein.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*pyc' found anywhere in distribution
  warning: no previously-included files matching '*so' found anywhere in distribution
  warning: no previously-included files matching '.project' found anywhere in distribution
  warning: no previously-included files matching '.pydevproject' found anywhere in distribution
  writing manifest file 'python_Levenshtein.egg-info/SOURCES.txt'
  copying Levenshtein/_levenshtein.c -> build/lib.linux-x86_64-3.6/Levenshtein
  copying Levenshtein/_levenshtein.h -> build/lib.linux-x86_64-3.6/Levenshtein
  running build_ext
  building 'Levenshtein._levenshtein' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/Levenshtein
  gcc -pthread -B /home/guangzhi/anaconda3/envs/mtt/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/guangzhi/anaconda3/envs/mtt/include/python3.6m -c Levenshtein/_levenshtein.c -o build/temp.linux-x86_64-3.6/Levenshtein/_levenshtein.o
  Levenshtein/_levenshtein.c: In function ‘levenshtein_common’:
  Levenshtein/_levenshtein.c:711:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
    711 |     string1 = PyString_AS_STRING(arg1);
        |             ^
  Levenshtein/_levenshtein.c:712:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
    712 |     string2 = PyString_AS_STRING(arg2);
        |             ^
  Levenshtein/_levenshtein.c: In function ‘hamming_py’:
  Levenshtein/_levenshtein.c:796:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
    796 |     string1 = PyString_AS_STRING(arg1);
        |             ^
  Levenshtein/_levenshtein.c:797:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
    797 |     string2 = PyString_AS_STRING(arg2);
        |             ^
  Levenshtein/_levenshtein.c: In function ‘jaro_py’:
  Levenshtein/_levenshtein.c:840:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
    840 |     string1 = PyString_AS_STRING(arg1);
        |             ^
  Levenshtein/_levenshtein.c:841:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
    841 |     string2 = PyString_AS_STRING(arg2);
        |             ^
  Levenshtein/_levenshtein.c: In function ‘jaro_winkler_py’:
  Levenshtein/_levenshtein.c:890:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
    890 |     string1 = PyString_AS_STRING(arg1);
        |             ^
  Levenshtein/_levenshtein.c:891:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
    891 |     string2 = PyString_AS_STRING(arg2);
        |             ^
  Levenshtein/_levenshtein.c: In function ‘median_common’:
  Levenshtein/_levenshtein.c:992:43: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [-Wpointer-sign]
    992 |       result = PyString_FromStringAndSize(medstr, len);
        |                                           ^~~~~~
        |                                           |
        |                                           lev_byte * {aka unsigned char *}
  In file included from /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/Python.h:88,
                   from Levenshtein/_levenshtein.c:99:
  /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/bytesobject.h:51:24: note: expected ‘const char *’ but argument is of type ‘lev_byte *’ {aka ‘unsigned char *’}
     51 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
        |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
  Levenshtein/_levenshtein.c: In function ‘median_improve_common’:
  /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/bytesobject.h:87:31: warning: pointer targets in initialization of ‘lev_byte *’ {aka ‘unsigned char *’} from ‘char *’ differ in signedness [-Wpointer-sign]
     87 | #define PyBytes_AS_STRING(op) (assert(PyBytes_Check(op)), \
        |                               ^
  Levenshtein/_levenshtein.c:106:28: note: in expansion of macro ‘PyBytes_AS_STRING’
    106 | #define PyString_AS_STRING PyBytes_AS_STRING
        |                            ^~~~~~~~~~~~~~~~~
  Levenshtein/_levenshtein.c:1071:19: note: in expansion of macro ‘PyString_AS_STRING’
   1071 |     lev_byte *s = PyString_AS_STRING(arg1);
        |                   ^~~~~~~~~~~~~~~~~~
  Levenshtein/_levenshtein.c:1077:43: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [-Wpointer-sign]
   1077 |       result = PyString_FromStringAndSize(medstr, len);
        |                                           ^~~~~~
        |                                           |
        |                                           lev_byte * {aka unsigned char *}
  In file included from /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/Python.h:88,
                   from Levenshtein/_levenshtein.c:99:
  /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/bytesobject.h:51:24: note: expected ‘const char *’ but argument is of type ‘lev_byte *’ {aka ‘unsigned char *’}
     51 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
        |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
  Levenshtein/_levenshtein.c: In function ‘extract_weightlist’:
  Levenshtein/_levenshtein.c:1115:41: warning: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
   1115 |     if (PySequence_Fast_GET_SIZE(wlist) != n) {
        |                                         ^~
  Levenshtein/_levenshtein.c: In function ‘extract_stringlist’:
  Levenshtein/_levenshtein.c:1201:16: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
   1201 |     strings[0] = PyString_AS_STRING(first);
        |                ^
  Levenshtein/_levenshtein.c:1213:18: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
   1213 |       strings[i] = PyString_AS_STRING(item);
        |                  ^
  Levenshtein/_levenshtein.c: In function ‘string_to_edittype’:
  Levenshtein/_levenshtein.c:1379:13: warning: unused variable ‘len’ [-Wunused-variable]
   1379 |   size_t i, len;
        |             ^~~
  Levenshtein/_levenshtein.c:1378:15: warning: unused variable ‘s’ [-Wunused-variable]
   1378 |   const char *s;
        |               ^
  Levenshtein/_levenshtein.c: In function ‘editops_py’:
  Levenshtein/_levenshtein.c:1650:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
   1650 |     string1 = PyString_AS_STRING(arg1);
        |             ^
  Levenshtein/_levenshtein.c:1651:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
   1651 |     string2 = PyString_AS_STRING(arg2);
        |             ^
  Levenshtein/_levenshtein.c: In function ‘opcodes_py’:
  Levenshtein/_levenshtein.c:1768:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
   1768 |     string1 = PyString_AS_STRING(arg1);
        |             ^
  Levenshtein/_levenshtein.c:1769:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
   1769 |     string2 = PyString_AS_STRING(arg2);
        |             ^
  Levenshtein/_levenshtein.c: In function ‘apply_edit_py’:
  Levenshtein/_levenshtein.c:1863:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
   1863 |     string1 = PyString_AS_STRING(arg1);
        |             ^
  Levenshtein/_levenshtein.c:1864:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
   1864 |     string2 = PyString_AS_STRING(arg2);
        |             ^
  Levenshtein/_levenshtein.c:1878:43: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [-Wpointer-sign]
   1878 |       result = PyString_FromStringAndSize(s, len);
        |                                           ^
        |                                           |
        |                                           lev_byte * {aka unsigned char *}
  In file included from /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/Python.h:88,
                   from Levenshtein/_levenshtein.c:99:
  /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/bytesobject.h:51:24: note: expected ‘const char *’ but argument is of type ‘lev_byte *’ {aka ‘unsigned char *’}
     51 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
        |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
  Levenshtein/_levenshtein.c:1894:43: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [-Wpointer-sign]
   1894 |       result = PyString_FromStringAndSize(s, len);
        |                                           ^
        |                                           |
        |                                           lev_byte * {aka unsigned char *}
  In file included from /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/Python.h:88,
                   from Levenshtein/_levenshtein.c:99:
  /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/bytesobject.h:51:24: note: expected ‘const char *’ but argument is of type ‘lev_byte *’ {aka ‘unsigned char *’}
     51 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
        |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
  Levenshtein/_levenshtein.c: In function ‘subtract_edit_py’:
  Levenshtein/_levenshtein.c:2060:27: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
   2060 |           if (!orem && nr == -1) {
        |                           ^~
  At top level:
  Levenshtein/_levenshtein.c:6700:1: warning: ‘lev_opcodes_total_cost’ defined but not used [-Wunused-function]
   6700 | lev_opcodes_total_cost(size_t nb,
        | ^~~~~~~~~~~~~~~~~~~~~~
  Levenshtein/_levenshtein.c:6655:1: warning: ‘lev_editops_normalize’ defined but not used [-Wunused-function]
   6655 | lev_editops_normalize(size_t n,
        | ^~~~~~~~~~~~~~~~~~~~~
  Levenshtein/_levenshtein.c:6630:1: warning: ‘lev_editops_total_cost’ defined but not used [-Wunused-function]
   6630 | lev_editops_total_cost(size_t n,
        | ^~~~~~~~~~~~~~~~~~~~~~
  Levenshtein/_levenshtein.c:2550:1: warning: ‘lev_u_edit_distance_sod’ defined but not used [-Wunused-function]
   2550 | lev_u_edit_distance_sod(size_t len, const lev_wchar *string,
        | ^~~~~~~~~~~~~~~~~~~~~~~
  Levenshtein/_levenshtein.c:2371:1: warning: ‘lev_edit_distance_sod’ defined but not used [-Wunused-function]
   2371 | lev_edit_distance_sod(size_t len, const lev_byte *string,
        | ^~~~~~~~~~~~~~~~~~~~~
  gcc -pthread -shared -B /home/guangzhi/anaconda3/envs/mtt/compiler_compat -L/home/guangzhi/anaconda3/envs/mtt/lib -Wl,-rpath=/home/guangzhi/anaconda3/envs/mtt/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/Levenshtein/_levenshtein.o -o build/lib.linux-x86_64-3.6/Levenshtein/_levenshtein.cpython-36m-x86_64-linux-gnu.so
  /home/guangzhi/anaconda3/envs/mtt/compiler_compat/ld: build/temp.linux-x86_64-3.6/Levenshtein/_levenshtein.o: unable to initialize decompress status for section .debug_info
  /home/guangzhi/anaconda3/envs/mtt/compiler_compat/ld: build/temp.linux-x86_64-3.6/Levenshtein/_levenshtein.o: unable to initialize decompress status for section .debug_info
  /home/guangzhi/anaconda3/envs/mtt/compiler_compat/ld: build/temp.linux-x86_64-3.6/Levenshtein/_levenshtein.o: unable to initialize decompress status for section .debug_info
  /home/guangzhi/anaconda3/envs/mtt/compiler_compat/ld: build/temp.linux-x86_64-3.6/Levenshtein/_levenshtein.o: unable to initialize decompress status for section .debug_info
  build/temp.linux-x86_64-3.6/Levenshtein/_levenshtein.o: file not recognized: file format not recognized
  collect2: error: ld returned 1 exit status
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for python-levenshtein
  Running setup.py clean for python-levenshtein
Failed to build python-levenshtein
Installing collected packages: python-levenshtein
    Running setup.py install for python-levenshtein ... error
    ERROR: Command errored out with exit status 1:
     command: /home/guangzhi/anaconda3/envs/mtt/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qfsg9aen/python-levenshtein/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qfsg9aen/python-levenshtein/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ch5lrfxh/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-qfsg9aen/python-levenshtein/
    Complete output (175 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/Levenshtein
    copying Levenshtein/__init__.py -> build/lib.linux-x86_64-3.6/Levenshtein
    copying Levenshtein/StringMatcher.py -> build/lib.linux-x86_64-3.6/Levenshtein
    running egg_info
    writing python_Levenshtein.egg-info/PKG-INFO
    writing dependency_links to python_Levenshtein.egg-info/dependency_links.txt
    writing entry points to python_Levenshtein.egg-info/entry_points.txt
    writing namespace_packages to python_Levenshtein.egg-info/namespace_packages.txt
    writing requirements to python_Levenshtein.egg-info/requires.txt
    writing top-level names to python_Levenshtein.egg-info/top_level.txt
    reading manifest file 'python_Levenshtein.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '*pyc' found anywhere in distribution
    warning: no previously-included files matching '*so' found anywhere in distribution
    warning: no previously-included files matching '.project' found anywhere in distribution
    warning: no previously-included files matching '.pydevproject' found anywhere in distribution
    writing manifest file 'python_Levenshtein.egg-info/SOURCES.txt'
    copying Levenshtein/_levenshtein.c -> build/lib.linux-x86_64-3.6/Levenshtein
    copying Levenshtein/_levenshtein.h -> build/lib.linux-x86_64-3.6/Levenshtein
    running build_ext
    building 'Levenshtein._levenshtein' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/Levenshtein
    gcc -pthread -B /home/guangzhi/anaconda3/envs/mtt/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/guangzhi/anaconda3/envs/mtt/include/python3.6m -c Levenshtein/_levenshtein.c -o build/temp.linux-x86_64-3.6/Levenshtein/_levenshtein.o
    Levenshtein/_levenshtein.c: In function ‘levenshtein_common’:
    Levenshtein/_levenshtein.c:711:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
      711 |     string1 = PyString_AS_STRING(arg1);
          |             ^
    Levenshtein/_levenshtein.c:712:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
      712 |     string2 = PyString_AS_STRING(arg2);
          |             ^
    Levenshtein/_levenshtein.c: In function ‘hamming_py’:
    Levenshtein/_levenshtein.c:796:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
      796 |     string1 = PyString_AS_STRING(arg1);
          |             ^
    Levenshtein/_levenshtein.c:797:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
      797 |     string2 = PyString_AS_STRING(arg2);
          |             ^
    Levenshtein/_levenshtein.c: In function ‘jaro_py’:
    Levenshtein/_levenshtein.c:840:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
      840 |     string1 = PyString_AS_STRING(arg1);
          |             ^
    Levenshtein/_levenshtein.c:841:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
      841 |     string2 = PyString_AS_STRING(arg2);
          |             ^
    Levenshtein/_levenshtein.c: In function ‘jaro_winkler_py’:
    Levenshtein/_levenshtein.c:890:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
      890 |     string1 = PyString_AS_STRING(arg1);
          |             ^
    Levenshtein/_levenshtein.c:891:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
      891 |     string2 = PyString_AS_STRING(arg2);
          |             ^
    Levenshtein/_levenshtein.c: In function ‘median_common’:
    Levenshtein/_levenshtein.c:992:43: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [-Wpointer-sign]
      992 |       result = PyString_FromStringAndSize(medstr, len);
          |                                           ^~~~~~
          |                                           |
          |                                           lev_byte * {aka unsigned char *}
    In file included from /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/Python.h:88,
                     from Levenshtein/_levenshtein.c:99:
    /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/bytesobject.h:51:24: note: expected ‘const char *’ but argument is of type ‘lev_byte *’ {aka ‘unsigned char *’}
       51 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
          |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
    Levenshtein/_levenshtein.c: In function ‘median_improve_common’:
    /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/bytesobject.h:87:31: warning: pointer targets in initialization of ‘lev_byte *’ {aka ‘unsigned char *’} from ‘char *’ differ in signedness [-Wpointer-sign]
       87 | #define PyBytes_AS_STRING(op) (assert(PyBytes_Check(op)), \
          |                               ^
    Levenshtein/_levenshtein.c:106:28: note: in expansion of macro ‘PyBytes_AS_STRING’
      106 | #define PyString_AS_STRING PyBytes_AS_STRING
          |                            ^~~~~~~~~~~~~~~~~
    Levenshtein/_levenshtein.c:1071:19: note: in expansion of macro ‘PyString_AS_STRING’
     1071 |     lev_byte *s = PyString_AS_STRING(arg1);
          |                   ^~~~~~~~~~~~~~~~~~
    Levenshtein/_levenshtein.c:1077:43: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [-Wpointer-sign]
     1077 |       result = PyString_FromStringAndSize(medstr, len);
          |                                           ^~~~~~
          |                                           |
          |                                           lev_byte * {aka unsigned char *}
    In file included from /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/Python.h:88,
                     from Levenshtein/_levenshtein.c:99:
    /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/bytesobject.h:51:24: note: expected ‘const char *’ but argument is of type ‘lev_byte *’ {aka ‘unsigned char *’}
       51 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
          |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
    Levenshtein/_levenshtein.c: In function ‘extract_weightlist’:
    Levenshtein/_levenshtein.c:1115:41: warning: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
     1115 |     if (PySequence_Fast_GET_SIZE(wlist) != n) {
          |                                         ^~
    Levenshtein/_levenshtein.c: In function ‘extract_stringlist’:
    Levenshtein/_levenshtein.c:1201:16: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
     1201 |     strings[0] = PyString_AS_STRING(first);
          |                ^
    Levenshtein/_levenshtein.c:1213:18: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
     1213 |       strings[i] = PyString_AS_STRING(item);
          |                  ^
    Levenshtein/_levenshtein.c: In function ‘string_to_edittype’:
    Levenshtein/_levenshtein.c:1379:13: warning: unused variable ‘len’ [-Wunused-variable]
     1379 |   size_t i, len;
          |             ^~~
    Levenshtein/_levenshtein.c:1378:15: warning: unused variable ‘s’ [-Wunused-variable]
     1378 |   const char *s;
          |               ^
    Levenshtein/_levenshtein.c: In function ‘editops_py’:
    Levenshtein/_levenshtein.c:1650:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
     1650 |     string1 = PyString_AS_STRING(arg1);
          |             ^
    Levenshtein/_levenshtein.c:1651:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
     1651 |     string2 = PyString_AS_STRING(arg2);
          |             ^
    Levenshtein/_levenshtein.c: In function ‘opcodes_py’:
    Levenshtein/_levenshtein.c:1768:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
     1768 |     string1 = PyString_AS_STRING(arg1);
          |             ^
    Levenshtein/_levenshtein.c:1769:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
     1769 |     string2 = PyString_AS_STRING(arg2);
          |             ^
    Levenshtein/_levenshtein.c: In function ‘apply_edit_py’:
    Levenshtein/_levenshtein.c:1863:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
     1863 |     string1 = PyString_AS_STRING(arg1);
          |             ^
    Levenshtein/_levenshtein.c:1864:13: warning: pointer targets in assignment from ‘char *’ to ‘lev_byte *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
     1864 |     string2 = PyString_AS_STRING(arg2);
          |             ^
    Levenshtein/_levenshtein.c:1878:43: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [-Wpointer-sign]
     1878 |       result = PyString_FromStringAndSize(s, len);
          |                                           ^
          |                                           |
          |                                           lev_byte * {aka unsigned char *}
    In file included from /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/Python.h:88,
                     from Levenshtein/_levenshtein.c:99:
    /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/bytesobject.h:51:24: note: expected ‘const char *’ but argument is of type ‘lev_byte *’ {aka ‘unsigned char *’}
       51 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
          |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
    Levenshtein/_levenshtein.c:1894:43: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [-Wpointer-sign]
     1894 |       result = PyString_FromStringAndSize(s, len);
          |                                           ^
          |                                           |
          |                                           lev_byte * {aka unsigned char *}
    In file included from /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/Python.h:88,
                     from Levenshtein/_levenshtein.c:99:
    /home/guangzhi/anaconda3/envs/mtt/include/python3.6m/bytesobject.h:51:24: note: expected ‘const char *’ but argument is of type ‘lev_byte *’ {aka ‘unsigned char *’}
       51 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
          |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
    Levenshtein/_levenshtein.c: In function ‘subtract_edit_py’:
    Levenshtein/_levenshtein.c:2060:27: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
     2060 |           if (!orem && nr == -1) {
          |                           ^~
    At top level:
    Levenshtein/_levenshtein.c:6700:1: warning: ‘lev_opcodes_total_cost’ defined but not used [-Wunused-function]
     6700 | lev_opcodes_total_cost(size_t nb,
          | ^~~~~~~~~~~~~~~~~~~~~~
    Levenshtein/_levenshtein.c:6655:1: warning: ‘lev_editops_normalize’ defined but not used [-Wunused-function]
     6655 | lev_editops_normalize(size_t n,
          | ^~~~~~~~~~~~~~~~~~~~~
    Levenshtein/_levenshtein.c:6630:1: warning: ‘lev_editops_total_cost’ defined but not used [-Wunused-function]
     6630 | lev_editops_total_cost(size_t n,
          | ^~~~~~~~~~~~~~~~~~~~~~
    Levenshtein/_levenshtein.c:2550:1: warning: ‘lev_u_edit_distance_sod’ defined but not used [-Wunused-function]
     2550 | lev_u_edit_distance_sod(size_t len, const lev_wchar *string,
          | ^~~~~~~~~~~~~~~~~~~~~~~
    Levenshtein/_levenshtein.c:2371:1: warning: ‘lev_edit_distance_sod’ defined but not used [-Wunused-function]
     2371 | lev_edit_distance_sod(size_t len, const lev_byte *string,
          | ^~~~~~~~~~~~~~~~~~~~~
    gcc -pthread -shared -B /home/guangzhi/anaconda3/envs/mtt/compiler_compat -L/home/guangzhi/anaconda3/envs/mtt/lib -Wl,-rpath=/home/guangzhi/anaconda3/envs/mtt/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/Levenshtein/_levenshtein.o -o build/lib.linux-x86_64-3.6/Levenshtein/_levenshtein.cpython-36m-x86_64-linux-gnu.so
    /home/guangzhi/anaconda3/envs/mtt/compiler_compat/ld: build/temp.linux-x86_64-3.6/Levenshtein/_levenshtein.o: unable to initialize decompress status for section .debug_info
    /home/guangzhi/anaconda3/envs/mtt/compiler_compat/ld: build/temp.linux-x86_64-3.6/Levenshtein/_levenshtein.o: unable to initialize decompress status for section .debug_info
    /home/guangzhi/anaconda3/envs/mtt/compiler_compat/ld: build/temp.linux-x86_64-3.6/Levenshtein/_levenshtein.o: unable to initialize decompress status for section .debug_info
    /home/guangzhi/anaconda3/envs/mtt/compiler_compat/ld: build/temp.linux-x86_64-3.6/Levenshtein/_levenshtein.o: unable to initialize decompress status for section .debug_info
    build/temp.linux-x86_64-3.6/Levenshtein/_levenshtein.o: file not recognized: file format not recognized
    collect2: error: ld returned 1 exit status
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/guangzhi/anaconda3/envs/mtt/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qfsg9aen/python-levenshtein/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qfsg9aen/python-levenshtein/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ch5lrfxh/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.