Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on fedora #84

Open
darakian opened this issue Sep 28, 2017 · 3 comments
Open

Build fails on fedora #84

darakian opened this issue Sep 28, 2017 · 3 comments

Comments

@darakian
Copy link

Error message is

Error compiling Cython file:
------------------------------------------------------------
...
    """Raise an OSError exception by errno.

    :Parameters:
        - `error_number`: The errno value to raise.
    """
    map_exception(OSError(error_number, libc.strerror(error_number)))
                                           ^
------------------------------------------------------------

coro/oserrors.pyx:54:44: cimported module has no attribute 'strerror'
building 'coro.oserrors' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c coro/oserrors.c -o build/temp.linux-x86_64-2.7/coro/oserrors.o
coro/oserrors.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
 #error Do not use this file, it is the result of a failed Cython compilation.
  ^~~~~
error: command 'gcc' failed with exit status 1
@bhch
Copy link
Contributor

bhch commented Oct 6, 2017

Same here. I tried installing via pip and source, and it fails both the times with the same error: coro/oserrors.pyx:54:44: cimported module has no attribute 'strerror'. Although, I'm using Ubuntu 14.04.

@roadk1ll
Copy link

in coro/oserrors.pyx change
cimport libc
to
from libc.string cimport strerror

and change
map_exception(OSError(error_number, libc.strerror(error_number)))
to
map_exception(OSError(error_number, strerror(error_number)))

@bhch
Copy link
Contributor

bhch commented Dec 21, 2017

@roadk1ll Wow, that works. Thanks.

samrushing added a commit to samrushing/shrapnel that referenced this issue Mar 11, 2019
use "from libc cimport strerror".
samrushing added a commit that referenced this issue Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants