mpark/variant Error when running make
HM102 opened this issue · 7 comments
All the requirement are already installed, and running cmake ..
succeed, however when running make -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.
ok, it appears passing -DCMAKE_CXX_STANDARD=17
to cmake ..
fixes the problem
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?
Hi @HM102 , Have you done something else apart from using
-DCMAKE_CXX_STANDARD=17
withcmake ..
? 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.
@apchenstu Well,can you send link again?this link cannot be used.
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
Solved it by installing a package from https://github.com/mpark/variant.git. I guess it is an extra third-party package,