opencv_contrib icon indicating copy to clipboard operation
opencv_contrib copied to clipboard

fatal error: mpi.h:No such file or directory (when compile opencv4.6)

Open LF177 opened this issue 2 years ago • 1 comments

System Information

OPENCV4.6.0 Ubuntu22.04 GCC 11.3.0

Detailed description

I compile the opencv4.6 and sudo make it then the following error happen:

In file included from /usr/include/hdf5/openmpi/hdf5.h:22, from /home/lyf/Work/Opencv/opencv_contrib-4.6.0/modules/hdf/src/hdf5.cpp:37: /usr/include/hdf5/openmpi/H5public.h:63:13: fatal error: mpi.h: No such file or directory 63 | # include <mpi.h> | ^~~~~~~ compilation terminated. make[2]: *** [modules/hdf/CMakeFiles/opencv_hdf.dir/build.make:76:modules/hdf/CMakeFiles/opencv_hdf.dir/src/hdf5.cpp.o] error 1 make[1]: *** [CMakeFiles/Makefile2:3885:modules/hdf/CMakeFiles/opencv_hdf.dir/all] error 2

Steps to reproduce

it is a small problem but i can not fix it

Issue submission checklist

  • [X] I report the issue, it's not a question
  • [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • [X] I updated to the latest OpenCV version and the issue is still there
  • [ ] There is reproducer code and related data files (videos, images, onnx, etc)

LF177 avatar Feb 27 '23 12:02 LF177

duplicate of #3216

alalek avatar Feb 27 '23 13:02 alalek