facebookresearch / DeepSDF

Learning Continuous Signed Distance Functions for Shape Representation
MIT License
1.41k stars 259 forks source link

mpark/variant Error when running make #29

Closed HM102 closed 5 years ago

HM102 commented 5 years ago

All the requirement are already installed, and running cmake .. succeed, however when runningmake -j I get the following error:


DeepSDF/src/SampleVisibleMeshSurface.cpp:11:
/usr/local/include/pangolin/compat/variant.h:10:13: fatal error: mpark/variant.hpp: No such file or directory
 #   include <mpark/variant.hpp>
             ^~~~~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/SampleVisibleMeshSurface.dir/build.make:62: recipe for target 'CMakeFiles/SampleVisibleMeshSurface.dir/src/SampleVisibleMeshSurface.cpp.o' failed
make[2]: *** [CMakeFiles/SampleVisibleMeshSurface.dir/src/SampleVisibleMeshSurface.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs.
HM102 commented 5 years ago

ok, it appears passing -DCMAKE_CXX_STANDARD=17 to cmake .. fixes the problem

SilvioGiancola commented 5 years ago

Hi @HM102 , Have you done something else apart from using -DCMAKE_CXX_STANDARD=17 with cmake ..? I tried adding the c++17 standard, both while installing DeepSDF than for Pangolin (just in case), but I still have an issue with mpark/variant.hpp :

$ make
[ 14%] Built target cnpy
[ 21%] Building CXX object CMakeFiles/SampleVisibleMeshSurface.dir/src/SampleVisibleMeshSurface.cpp.o
In file included from /usr/local/include/pangolin/geometry/geometry.h:35:0,
                 from /home/giancos/git/DeepSDF/src/SampleVisibleMeshSurface.cpp:11:
/usr/local/include/pangolin/compat/variant.h:10:32: fatal error: mpark/variant.hpp: No such file or directory
compilation terminated.
CMakeFiles/SampleVisibleMeshSurface.dir/build.make:62: recipe for target 'CMakeFiles/SampleVisibleMeshSurface.dir/src/SampleVisibleMeshSurface.cpp.o' failed
make[2]: *** [CMakeFiles/SampleVisibleMeshSurface.dir/src/SampleVisibleMeshSurface.cpp.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/SampleVisibleMeshSurface.dir/all' failed
make[1]: *** [CMakeFiles/SampleVisibleMeshSurface.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

anyone else got similar issue?

apchenstu commented 4 years ago

copy this folder to /usr/local/include/ works for me.

zhuyinheng commented 4 years ago

Hi @HM102 , Have you done something else apart from using -DCMAKE_CXX_STANDARD=17 with cmake ..? I tried adding the c++17 standard, both while installing DeepSDF than for Pangolin (just in case), but I still have an issue with mpark/variant.hpp :

$ make
[ 14%] Built target cnpy
[ 21%] Building CXX object CMakeFiles/SampleVisibleMeshSurface.dir/src/SampleVisibleMeshSurface.cpp.o
In file included from /usr/local/include/pangolin/geometry/geometry.h:35:0,
                 from /home/giancos/git/DeepSDF/src/SampleVisibleMeshSurface.cpp:11:
/usr/local/include/pangolin/compat/variant.h:10:32: fatal error: mpark/variant.hpp: No such file or directory
compilation terminated.
CMakeFiles/SampleVisibleMeshSurface.dir/build.make:62: recipe for target 'CMakeFiles/SampleVisibleMeshSurface.dir/src/SampleVisibleMeshSurface.cpp.o' failed
make[2]: *** [CMakeFiles/SampleVisibleMeshSurface.dir/src/SampleVisibleMeshSurface.cpp.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/SampleVisibleMeshSurface.dir/all' failed
make[1]: *** [CMakeFiles/SampleVisibleMeshSurface.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

anyone else got similar issue?

Yes, I solved it by deactivate conda python env.

Yxs-160 commented 3 years ago

@apchenstu Well,can you send link again?this link cannot be used.

1999kevin commented 2 years ago

Same bug for me but different place. I have tried -DCMAKE_CXX_STANDARD=17 and deactivate conda python env. But neither works for me. Any suggestions?

sudo make -j [ 7%] Building CXX object third-party/cnpy/CMakeFiles/cnpy.dir/cnpy.cpp.o [ 14%] Building CXX object third-party/cnpy/CMakeFiles/cnpy-static.dir/cnpy.cpp.o [ 21%] Linking CXX static library libcnpy.a [ 28%] Linking CXX shared library libcnpy.so [ 28%] Built target cnpy-static [ 28%] Built target cnpy [ 35%] Building CXX object third-party/cnpy/CMakeFiles/example1.dir/example1.cpp.o [ 42%] Building CXX object CMakeFiles/PreprocessMesh.dir/src/ShaderProgram.cpp.o [ 50%] Building CXX object CMakeFiles/PreprocessMesh.dir/src/PreprocessMesh.cpp.o [ 57%] Building CXX object CMakeFiles/SampleVisibleMeshSurface.dir/src/SampleVisibleMeshSurface.cpp.o [ 64%] Building CXX object CMakeFiles/PreprocessMesh.dir/src/Utils.cpp.o [ 71%] Building CXX object CMakeFiles/SampleVisibleMeshSurface.dir/src/Utils.cpp.o [ 78%] Building CXX object CMakeFiles/SampleVisibleMeshSurface.dir/src/ShaderProgram.cpp.o In file included from /usr/local/include/pangolin/geometry/geometry.h:35:0, from /data0/liuke/research/DeepSDF/src/PreprocessMesh.cpp:11: /usr/local/include/pangolin/compat/variant.h:10:32: fatal error: mpark/variant.hpp: No such file or directory compilation terminated.**** CMakeFiles/PreprocessMesh.dir/build.make:75: recipe for target 'CMakeFiles/PreprocessMesh.dir/src/PreprocessMesh.cpp.o' failed make[2]: [CMakeFiles/PreprocessMesh.dir/src/PreprocessMesh.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... In file included from /usr/local/include/pangolin/geometry/geometry.h:35:0, from /data0/liuke/research/DeepSDF/src/Utils.h:9, from /data0/liuke/research/DeepSDF/src/Utils.cpp:3: /usr/local/include/pangolin/compat/variant.h:10:32: fatal error: mpark/variant.hpp: No such file or directory compilation terminated. CMakeFiles/PreprocessMesh.dir/build.make:103: recipe for target 'CMakeFiles/PreprocessMesh.dir/src/Utils.cpp.o' failed make[2]: [CMakeFiles/PreprocessMesh.dir/src/Utils.cpp.o] Error 1 In file included from /usr/local/include/pangolin/geometry/geometry.h:35:0, from /data0/liuke/research/DeepSDF/src/SampleVisibleMeshSurface.cpp:11: /usr/local/include/pangolin/compat/variant.h:10:32: fatal error: mpark/variant.hpp: No such file or directory compilation terminated. CMakeFiles/SampleVisibleMeshSurface.dir/build.make:75: recipe for target 'CMakeFiles/SampleVisibleMeshSurface.dir/src/SampleVisibleMeshSurface.cpp.o' failed make[2]: [CMakeFiles/SampleVisibleMeshSurface.dir/src/SampleVisibleMeshSurface.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... In file included from /usr/local/include/pangolin/geometry/geometry.h:35:0, from /data0/liuke/research/DeepSDF/src/Utils.h:9, from /data0/liuke/research/DeepSDF/src/Utils.cpp:3: /usr/local/include/pangolin/compat/variant.h:10:32: fatal error: mpark/variant.hpp: No such file or directory compilation terminated. CMakeFiles/SampleVisibleMeshSurface.dir/build.make:103: recipe for target 'CMakeFiles/SampleVisibleMeshSurface.dir/src/Utils.cpp.o' failed make[2]: [CMakeFiles/SampleVisibleMeshSurface.dir/src/Utils.cpp.o] Error 1 [ 85%] Linking CXX executable example1 [ 85%] Built target example1 CMakeFiles/Makefile2:131: recipe for target 'CMakeFiles/SampleVisibleMeshSurface.dir/all' failed make[1]: [CMakeFiles/SampleVisibleMeshSurface.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... CMakeFiles/Makefile2:105: recipe for target 'CMakeFiles/PreprocessMesh.dir/all' failed make[1]: [CMakeFiles/PreprocessMesh.dir/all] Error 2 Makefile:135: recipe for target 'all' failed make: [all] Error 2

1999kevin commented 2 years ago

Solved it by installing a package from https://github.com/mpark/variant.git. I guess it is an extra third-party package,