Martinsos / edlib

Lightweight, super fast C/C++ (& Python) library for sequence alignment using edit (Levenshtein) distance.
http://martinsos.github.io/edlib
MIT License
505 stars 165 forks source link

gcc (GCC) 8.2.1 20181127 compile problem via pip install #125

Closed daveuu closed 4 years ago

daveuu commented 5 years ago

I was able to install edlib with python bindings via pip3 install edlib when the system gcc was 7.2.0-3, but after system upgrade to gcc 8.2.1 got an error when trying to reinstall edlib with pip:

    building 'edlib' extension
    creating build
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/edlib
    creating build/temp.linux-x86_64-3.7/edlib/src
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86
-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -flto=4 -fuse-linker-plugin
-ffat-lto-objects -flto-partition=none -g -march=x86-64 -mtune=generic -O3 -pipe -fstack-pr
otector-strong -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fn
o-plt -fPIC -Iedlib/include -I/home/play/VRD/Docker/dev_venv/include -I/usr/include/python3
.7m -c edlib.bycython.cpp -o build/temp.linux-x86_64-3.7/edlib.bycython.o -O3 -std=c++11
    edlib.bycython.cpp: In function PyObject* __Pyx_PyCFunction_FastCall(PyObject*, PyObje
ct**, Py_ssize_t):
    edlib.bycython.cpp:2259:69: error: too many arguments to function
         return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
                                                                         ^
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/home/play/VRD/Docker/dev_venv/bin/python3 -u -c "import setuptools, tokenize;__fi
le__='/tmp/pip-install-293oegzm/edlib/setup.py';f=getattr(tokenize, 'open', open)(__file__)
;code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" insta
ll --record /tmp/pip-record-dnw196mx/install-record.txt --single-version-externally-managed
 --compile --install-headers /home/play/VRD/Docker/dev_venv/include/site/python3.7/edlib" f
ailed with error code 1 in /tmp/pip-install-293oegzm/edlib/
$ gcc --version
gcc (GCC) 8.2.1 20181127
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I'm guessing a change in GCC caused this because it works fine on an old Ubuntu system running gcc 5.4.0 20160609 . . .

Martinsos commented 5 years ago

Thanks for the report! Ok, so instead of properly understanding the problem I did quick googling :D and found this https://github.com/pysam-developers/pysam/issues/697, I am guessing the cause is the same, so I will try doing following: Upgrading Cython to the most recent version on my local development machine, building Edlib for python and releasing new version of python package. Hopefully that should fix the problem! Will let you soon when I have it done.

Martinsos commented 5 years ago

@daveuu I rebuilt edlib for python and submitted new version to PyPi, 1.2.4. Pls try it out and let me know if the problem still persists, I believe now it should be fine.

Martinsos commented 4 years ago

Closing, since there was no further information and I will assume it is solved! Reopen/comment if not.