Skip to content

Make error when compling with opencv_contrib-3.4.16 #3216

Open
@LiShuaixin

Description

@LiShuaixin
System information (version)
  • OpenCV => 3.4.16
  • Operating System / Platform => Ubuntu 20.04 64-bit
  • Compiler => cmake
Detailed description

When compiled with opencv_contrib, it failed as:

[ 16%] Building CXX object modules/hdf/CMakeFiles/opencv_hdf.dir/src/hdf5.cpp.o
In file included from /usr/include/hdf5/mpich/hdf5.h:22,
                 from /home/lee/Library/opencv-3.4.16/opencv_contrib-3.4.17/modules/hdf/src/hdf5.cpp:37:
/usr/include/hdf5/mpich/H5public.h:60:13: fatal error: mpi.h: No such file or directory
   60 | #   include <mpi.h>
      |             ^~~~~~~
compilation terminated.
make[2]: *** [modules/hdf/CMakeFiles/opencv_hdf.dir/build.make:63: modules/hdf/CMakeFiles/opencv_hdf.dir/src/hdf5.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5661: modules/hdf/CMakeFiles/opencv_hdf.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 17%] Built target opencv_cudaarithm
[ 20%] Built target opencv_imgproc
[ 20%] Linking CXX static library ../../../../../../lib/libmultiview.a
[ 20%] Built target multiview
make: *** [Makefile:163: all] Error 2

I can make smoothly without contrib-module. It seems like an issue with hdf5 and openmpi.... How should I fix the issue? Many thanks!!!!

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