autonomousvision / convolutional_occupancy_networks

[ECCV'20] Convolutional Occupancy Networks
https://pengsongyou.github.io/conv_onet
MIT License
830 stars 113 forks source link

Problems building pykdtree #46

Closed YishaiEArbe closed 2 years ago

YishaiEArbe commented 2 years ago

Hi,

I'm following your installation instructions, I'm having trouble with the build of pykdtree (the rest of the extensions build OK). Reproduction below, I'm on Ubuntu 20.04 with miniconda (not sure what else here is relevant). Is there a particular build tool that I need to install to get this to work?

With the conda env activated (built from the environment yaml), I run this from the project's root folder:

python setup.py build_ext --inplace

The output is this:

running build_ext
building 'src.utils.libkdtree.pykdtree.kdtree' extension
Emitting ninja build file /home/yishai/repos/convolutional_occupancy_networks/build/temp.linux-x86_64-3.8/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/1] c++ -MMD -MF /home/yishai/repos/convolutional_occupancy_networks/build/temp.linux-x86_64-3.8/src/utils/libkdtree/pykdtree/_kdtree_core.o.d -pthread -B /home/yishai/miniconda3/envs/conv_onet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/yishai/miniconda3/envs/conv_onet/lib/python3.8/site-packages/numpy/core/include -I/home/yishai/miniconda3/envs/conv_onet/include/python3.8 -c -c /home/yishai/repos/convolutional_occupancy_networks/src/utils/libkdtree/pykdtree/_kdtree_core.c -o /home/yishai/repos/convolutional_occupancy_networks/build/temp.linux-x86_64-3.8/src/utils/libkdtree/pykdtree/_kdtree_core.o -std=c99 -O3 -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=kdtree -D_GLIBCXX_USE_CXX11_ABI=1
FAILED: /home/yishai/repos/convolutional_occupancy_networks/build/temp.linux-x86_64-3.8/src/utils/libkdtree/pykdtree/_kdtree_core.o 
c++ -MMD -MF /home/yishai/repos/convolutional_occupancy_networks/build/temp.linux-x86_64-3.8/src/utils/libkdtree/pykdtree/_kdtree_core.o.d -pthread -B /home/yishai/miniconda3/envs/conv_onet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/yishai/miniconda3/envs/conv_onet/lib/python3.8/site-packages/numpy/core/include -I/home/yishai/miniconda3/envs/conv_onet/include/python3.8 -c -c /home/yishai/repos/convolutional_occupancy_networks/src/utils/libkdtree/pykdtree/_kdtree_core.c -o /home/yishai/repos/convolutional_occupancy_networks/build/temp.linux-x86_64-3.8/src/utils/libkdtree/pykdtree/_kdtree_core.o -std=c99 -O3 -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=kdtree -D_GLIBCXX_USE_CXX11_ABI=1
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-std=c99’ is valid for C/ObjC but not for C++
/home/yishai/repos/convolutional_occupancy_networks/src/utils/libkdtree/pykdtree/_kdtree_core.c:49:3: **error: conflicting declaration** ‘typedef struct Node_float Node_float’
   49 | } Node_float;
      |   ^~~~~~~~~~

.... etc. etc. more of these compiler errors.

YishaiEArbe commented 2 years ago

... Forget it, I found the issue - I was using an env that had all the strict version requirements removed (conda wouldn't install it because conflicts). Solved with mamba, built ok.

XiaoyanQian commented 1 year ago

... Forget it, I found the issue - I was using an env that had all the strict version requirements removed (conda wouldn't install it because conflicts). Solved with mamba, built ok.

Hi, I still can not build successfully even without any strict versions on these dependencies, any solution? It shows the error as follows: image