Error while trying to install caffe2

Hi,
I try to install Caffe2 from source. I followed that installation guide:
https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=compile

Because of previous problems with lmdb i use following command to build Caffe2:
USE_LMDB=ON python setup.py install

After some time it stops with the output:

[ 85%] Linking CXX executable …/bin/dlconvertor_test
[ 85%] Built target dlconvertor_test
Scanning dependencies of target cast_test
[ 85%] Building CXX object caffe2/CMakeFiles/cast_test.dir/utils/cast_test.cc.o
[ 86%] Linking CXX executable …/bin/common_subexpression_elimination_test
[ 86%] Linking CXX executable …/bin/common_test
[ 86%] Built target common_subexpression_elimination_test
Scanning dependencies of target verify_api_visibility
[ 86%] Building CXX object caffe2/CMakeFiles/verify_api_visibility.dir/__/aten/src/ATen/test/verify_api_visibility.cpp.o
[ 86%] Built target common_test
Scanning dependencies of target device_test
[ 86%] Building CXX object caffe2/CMakeFiles/device_test.dir/opt/device_test.cc.o
[ 86%] Linking CXX executable …/bin/inline_container_test
[ 86%] Built target inline_container_test
Scanning dependencies of target test_parallel
[ 86%] Building CXX object caffe2/CMakeFiles/test_parallel.dir/__/aten/src/ATen/test/test_parallel.cpp.o
[ 86%] Linking CXX executable …/bin/cast_test
[ 86%] Built target cast_test
Scanning dependencies of target reshape_op_gpu_test
[ 86%] Building CXX object caffe2/CMakeFiles/reshape_op_gpu_test.dir/operators/reshape_op_gpu_test.cc.o
[ 86%] Linking CXX executable …/bin/verify_api_visibility
[ 86%] Built target verify_api_visibility
[ 86%] Building NVCC (Device) object caffe2/CMakeFiles/cuda_packedtensoraccessor_test.dir/__/aten/src/ATen/test/cuda_packedtensoraccessor_test_generated_cuda_packedtensoraccessor_test.cu.o
[ 86%] Linking CXX executable …/bin/device_test
[ 86%] Built target device_test
[ 86%] Building NVCC (Device) object caffe2/CMakeFiles/cuda_half_test.dir/__/aten/src/ATen/test/cuda_half_test_generated_cuda_half_test.cu.o
[ 86%] Linking CXX executable …/bin/test_parallel
…/…/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so:(IND+0x0): Mehrfachdefinition von »omp_get_place_num«
…/…/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so:(IND+0x0): Mehrfachdefinition von »omp_get_partition_num_places«
…/…/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so:(IND+0x0): Mehrfachdefinition von »omp_get_partition_place_nums«
…/…/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so:(IND+0x0): Mehrfachdefinition von »omp_get_max_task_priority_«
…/…/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so:(IND+0x0): Mehrfachdefinition von »omp_get_place_num_procs«
…/…/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so:(IND+0x0): Mehrfachdefinition von »omp_get_num_places_«
…/…/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so:(IND+0x0): Mehrfachdefinition von »omp_get_place_proc_ids_«
…/…/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so:(IND+0x0): Mehrfachdefinition von »omp_get_place_num_procs_«
…/…/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so:(IND+0x0): Mehrfachdefinition von »omp_get_partition_place_nums_«
…/…/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so:(IND+0x0): Mehrfachdefinition von »omp_get_partition_num_places_«
…/…/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so:(IND+0x0): Mehrfachdefinition von »omp_get_max_task_priority«
…/…/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so:(IND+0x0): Mehrfachdefinition von »omp_get_place_num_«
…/…/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so:(IND+0x0): Mehrfachdefinition von »omp_get_num_places«
…/…/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so:(IND+0x0): Mehrfachdefinition von »omp_get_place_proc_ids«
collect2: error: ld returned 1 exit status
caffe2/CMakeFiles/test_parallel.dir/build.make:97: recipe for target ‘bin/test_parallel’ failed
make[2]: *** [bin/test_parallel] Error 1
CMakeFiles/Makefile2:5535: recipe for target ‘caffe2/CMakeFiles/test_parallel.dir/all’ failed
make[1]: *** [caffe2/CMakeFiles/test_parallel.dir/all] Error 2
make[1]: *** Auf noch nicht beendete Prozesse wird gewartet …
[ 86%] Linking CXX executable …/bin/reshape_op_gpu_test
[ 86%] Built target reshape_op_gpu_test
Scanning dependencies of target cuda_half_test
[ 86%] Linking CXX executable …/bin/cuda_half_test
Scanning dependencies of target cuda_packedtensoraccessor_test
[ 86%] Linking CXX executable …/bin/cuda_packedtensoraccessor_test
[ 86%] Built target cuda_half_test
[ 86%] Built target cuda_packedtensoraccessor_test
Makefile:140: recipe for target ‘all’ failed
make: *** [all] Error 2
Traceback (most recent call last):
File “setup.py”, line 710, in
build_deps()
File “setup.py”, line 282, in build_deps
build_dir=‘build’)
File “/home/niklas/pytorch/tools/build_pytorch_libs.py”, line 259, in build_caffe2
check_call([‘make’, ‘-j’, str(max_jobs), ‘install’], cwd=build_dir, env=my_env)
File “/usr/lib/python2.7/subprocess.py”, line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘make’, ‘-j’, ‘4’, ‘install’]’ returned non-zero exit status 2

I couldnt find any solution to this problem. I hope someone can help me.

After upgrading my cmake version and installing mxnet-mkl via pip command, it works now.
This topic can be closed.