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

Issue with newest cython version 3.0.0 #656

Open
DaBeIDS opened this issue Aug 7, 2023 · 2 comments
Open

Issue with newest cython version 3.0.0 #656

DaBeIDS opened this issue Aug 7, 2023 · 2 comments

Comments

@DaBeIDS
Copy link

DaBeIDS commented Aug 7, 2023

I use inside of a docker enviroment the following:

pip install cython --no-cache-dir
pip install "git+https://github.com/open-mmlab/cocoapi.git#subdirectory=pycocotools"

I did not had to rebuild the docker for a while and suddenly it fails. The reason is that cython is now on a new version 3.0.0. I can fix it via

pip install cython==0.29.36 --no-cache-dir
pip install "git+https://github.com/open-mmlab/cocoapi.git#subdirectory=pycocotools"

Any ideas how to fix that? Is that an error in cocoapi or an error in cython.

Here is the error message:

Building wheel for mmpycocotools (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-38
creating build/lib.linux-x86_64-cpython-38/pycocotools
copying pycocotools/init.py -> build/lib.linux-x86_64-cpython-38/pycocotools
copying pycocotools/coco.py -> build/lib.linux-x86_64-cpython-38/pycocotools
copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-cpython-38/pycocotools
copying pycocotools/mask.py -> build/lib.linux-x86_64-cpython-38/pycocotools
running build_ext
Compiling pycocotools/_mask.pyx because it changed.
[1/1] Cythonizing pycocotools/_mask.pyx
/opt/app-root/lib64/python3.8/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-req-build-gd3wjixu/pycocotools/pycocotools/_mask.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'pycocotools._mask' extension
creating build/common
creating build/temp.linux-x86_64-cpython-38
creating build/temp.linux-x86_64-cpython-38/common
creating build/temp.linux-x86_64-cpython-38/pycocotools
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/opt/app-root/lib64/python3.8/site-packages/numpy/core/include -Icommon -I/opt/app-root/include -I/usr/include/python3.8 -c ../common/maskApi.c -o build/temp.linux-x86_64-cpython-38/../common/maskApi.o
gcc: error: ../common/maskApi.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]

@LuisGF93
Copy link

LuisGF93 commented Sep 8, 2023

same problem here

@spdavern
Copy link

spdavern commented Oct 12, 2023

This issue was discussed in the cython Github repo. A pointer to this fix on a cocoapi fork worked for me. The commit message explains why it works too.
This is the offending line.

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