Skip to content

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

@LF177

Description

@LF177

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

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • 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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions