Open hyunynim opened 4 years ago
When I remove all "restrict" keyword in _kdtree_code.c, setup.py working well. But I have new error in generate.py
Traceback (most recent call last):
File "generate.py", line 11, in <module>
from im2mesh import config
File "/home/hongza/lab/differentiable_volumetric_rendering/im2mesh/config.py", line 3, in <module>
from im2mesh import dvr
File "/home/hongza/lab/differentiable_volumetric_rendering/im2mesh/dvr/__init__.py", line 1, in <module>
from im2mesh.dvr import (
File "/home/hongza/lab/differentiable_volumetric_rendering/im2mesh/dvr/config.py", line 3, in <module>
from im2mesh.encoder import encoder_dict
File "/home/hongza/lab/differentiable_volumetric_rendering/im2mesh/encoder/__init__.py", line 1, in <module>
from im2mesh.encoder import conv
File "/home/hongza/lab/differentiable_volumetric_rendering/im2mesh/encoder/conv.py", line 3, in <module>
from im2mesh.common import normalize_imagenet
File "/home/hongza/lab/differentiable_volumetric_rendering/im2mesh/common.py", line 2, in <module>
from im2mesh.utils.libkdtree import KDTree
File "/home/hongza/lab/differentiable_volumetric_rendering/im2mesh/utils/libkdtree/__init__.py", line 1, in <module>
from .pykdtree.kdtree import KDTree
ImportError: /home/hongza/lab/differentiable_volumetric_rendering/im2mesh/utils/libkdtree/pykdtree/kdtree.cpython-38-x86_64-linux-gnu.so: undefined symbol: construct_tree_double
And I also edit name of struct in _kdtree_core.c
typedef struct
{
...
} Node_float;
to
typedef struct Node_float
{
...
} Node_float;
When I replace all "restrict" to "__restrict", it also working well. But I still get an error in generate.py.
Hi, have you in the meantime found a way to solve this issue?
Hi, have you in the meantime found a way to solve this issue?
No I don't yet
Pytorch tries to use c++ compiler to compile a c project.
an easy hack for this is to set your CXX to gcc
CC=gcc CXX=gcc python setup.py build_ext --inplace
of course, this may cause errors on other modules. try to compile them separately.
i.e. comment out pykdtree first and run
python setup.py build_ext --inplace
,
then comment out all others except pykdtree and run again with
CC=gcc CXX=gcc python setup.py build_ext --inplace
I have the same error. Unfortunately, easy hack mentioned above doesn't work either. I've managed to run python setup.py build_ext --inplace
after commenting pykdtree
in ext_modules
, but i am unable to build kdtree separately.
Thank you for your great working. I get this error messge when i run setup.py
I use conda and my envirnment is below.