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

Cython related error when building extensions #4

Closed
zhaoyuanyuan2011 opened this issue Apr 6, 2022 · 5 comments
Closed

Cython related error when building extensions #4

zhaoyuanyuan2011 opened this issue Apr 6, 2022 · 5 comments

Comments

@zhaoyuanyuan2011
Copy link

zhaoyuanyuan2011 commented Apr 6, 2022

Hi, I completely followed the instructions, using cuda11.1 and Ubuntu, but still having this issue
gcc: error: /usr/POCO/build/temp.linux-x86_64-3.7/eval/src/utils/libkdtree/pykdtree/kdtree.o: No such file or directory gcc: error: /usr/POCO/build/temp.linux-x86_64-3.7/eval/src/utils/libkdtree/pykdtree/_kdtree_core.o: No such file or directory
It's asking to link .o files before it is generated.
But looks like required Cython 0.27.3 is not compatible with Python 3.7.10, which is required by this project.
I'm wondering does anyone have a working combination of the version of the packages? Thank you!

@aboulch
Copy link
Collaborator

aboulch commented Apr 7, 2022

Hello,
I used cython 0.29.28, see #3

@zhaoyuanyuan2011
Copy link
Author

Thank you. I previously looked at this link https://github.com/valeoai/POCO/issues/1#issuecomment-1043413315 and it looks like the pykdtree issue might not be resulted by Cython version. I'm using the same Cython version as you but still get the issue I mentioned above.

@zhaoyuanyuan2011
Copy link
Author

zhaoyuanyuan2011 commented Apr 11, 2022

Thank you. I previously looked at this link https://github.com/valeoai/POCO/issues/1#issuecomment-1043413315 and it looks like the pykdtree issue might not be resulted by Cython version. I'm using the same Cython version as you but still get the issue I mentioned above.

To be specific, the error is
running build_ext Compiling eval/src/utils/libmesh/triangle_hash.pyx because it changed. [1/1] Cythonizing eval/src/utils/libmesh/triangle_hash.pyx /home/usr/.local/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /usr/POCO/eval/src/utils/libmesh/triangle_hash.pyx tree = Parsing.p_module(s, pxd, full_module_name) running build_ext building 'eval.src.utils.libkdtree.pykdtree.kdtree' extension creating /usr/POCO/build creating /usr/POCO/build/temp.linux-x86_64-3.7 creating /usr/POCO/build/temp.linux-x86_64-3.7/eval creating /usr/POCO/build/temp.linux-x86_64-3.7/eval/src creating /usr/POCO/build/temp.linux-x86_64-3.7/eval/src/utils creating /usr/POCO/build/temp.linux-x86_64-3.7/eval/src/utils/libkdtree creating /usr/POCO/build/temp.linux-x86_64-3.7/eval/src/utils/libkdtree/pykdtree Emitting ninja build file /usr/POCO/build/temp.linux-x86_64-3.7/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) 1.10.1 creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/eval creating build/lib.linux-x86_64-3.7/eval/src creating build/lib.linux-x86_64-3.7/eval/src/utils creating build/lib.linux-x86_64-3.7/eval/src/utils/libkdtree creating build/lib.linux-x86_64-3.7/eval/src/utils/libkdtree/pykdtree gcc -pthread -shared -B /opt/apps/anaconda/3.7/compiler_compat -L/opt/apps/anaconda/3.7/lib -Wl,-rpath=/opt/apps/anaconda/3.7/lib -Wl,--no-as-needed -Wl,--sysroot=/ /usr/POCO/build/temp.linux-x86_64-3.7/eval/src/utils/libkdtree/pykdtree/kdtree.o /usr/POCO/build/temp.linux-x86_64-3.7/eval/src/utils/libkdtree/pykdtree/_kdtree_core.o -o build/lib.linux-x86_64-3.7/eval/src/utils/libkdtree/pykdtree/kdtree.cpython-37m-x86_64-linux-gnu.so -lgomp gcc: error: /usr/POCO/build/temp.linux-x86_64-3.7/eval/src/utils/libkdtree/pykdtree/kdtree.o: No such file or directory gcc: error: /usr/POCO/build/temp.linux-x86_64-3.7/eval/src/utils/libkdtree/pykdtree/_kdtree_core.o: No such file or directory error: command 'gcc' failed with exit status 1

And the environment to reproduce this is:
`# packages in environment at /path/to/anaconda3/envs/poco:

Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 1_gnu conda-forge
ca-certificates 2020.10.14 0 anaconda
certifi 2020.6.20 py37_0 anaconda
cudatoolkit 11.1.1 h6406543_10 conda-forge
ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libgcc-ng 11.2.0 h1d223b6_15 conda-forge
libgomp 11.2.0 h1d223b6_15 conda-forge
libnsl 2.0.0 h7f98852_0 conda-forge
libstdcxx-ng 11.2.0 he4da1e4_15 conda-forge
libzlib 1.2.11 h166bdaf_1014 conda-forge
ncurses 6.2 he6710b0_1 anaconda
openssl 3.0.2 h166bdaf_1 conda-forge
pip 20.2.4 py37_0 anaconda
python 3.7.10 hf930737_104_cpython conda-forge
readline 8.1 h46c0cb4_0 conda-forge
setuptools 50.3.0 py37hb0f4dca_1 anaconda
sqlite 3.37.0 h9cd32fc_0 conda-forge
tk 8.6.12 h27826a3_0 conda-forge
wheel 0.35.1 py_0 anaconda
xz 5.2.5 h7b6447c_0 anaconda
zlib 1.2.11 h166bdaf_1014 conda-forge`

I'm using cuda 11.1 on a 18.04.3 LTS (GNU/Linux 4.15.0-167-generic x86_64).

Thank you in advance for any suggestions!

@zhaoyuanyuan2011
Copy link
Author

Issue solved by compiling with a lower version torch==1.4.0

@aboulch
Copy link
Collaborator

aboulch commented Apr 14, 2022

Thank you, nice to know.

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

2 participants