Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opencv build for python crashes on link to hdf5.h on ubuntu 15.10 #6050

Closed
dickkniep opened this issue Feb 2, 2016 · 7 comments
Closed

Opencv build for python crashes on link to hdf5.h on ubuntu 15.10 #6050

dickkniep opened this issue Feb 2, 2016 · 7 comments
Labels

Comments

@dickkniep
Copy link

@dickkniep dickkniep commented Feb 2, 2016

[ 87%] Building CXX object modules/optflow/CMakeFiles/opencv_test_optflow.dir/test/ocl/test_motempl.cpp.o
Linking CXX executable ../../bin/opencv_test_optflow
[ 87%] Built target opencv_test_optflow
[ 87%] Built target opencv_perf_stitching_pch_dephelp
[ 87%] Built target pch_Generate_opencv_perf_stitching
[ 88%] Built target opencv_stitching_pch_dephelp
[ 88%] Built target pch_Generate_opencv_stitching
[ 89%] Built target opencv_stitching
[ 89%] Built target opencv_perf_stitching
[ 89%] Built target opencv_test_stitching_pch_dephelp
[ 89%] Built target pch_Generate_opencv_test_stitching
[ 89%] Built target opencv_test_stitching
[ 89%] Building CXX object modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.o
In file included from /tmp/opencv/opencv/build/modules/python2/pyopencv_generated_include.h:11:0,
from /tmp/opencv/opencv/modules/python/src2/cv2.cpp:12:
/tmp/opencv/opencv_contrib/modules/hdf/include/opencv2/hdf/hdf5.hpp:40:18: fatal error: hdf5.h: No such file or directory
compilation terminated.

The following packages are installed:
dick@dick-thuis:~/PycharmProjects/cctools/scripts_linux$ dpkg -l | grep hdf5
ii hdf5-helpers 1.8.15-patch1+docs-4 amd64 Hierarchical Data Format 5 (HDF5) - Helper tools
ii libhdf5-10:amd64 1.8.15-patch1+docs-4 amd64 Hierarchical Data Format 5 (HDF5) - runtime files - serial version
ii libhdf5-cpp-10:amd64 1.8.15-patch1+docs-4 amd64 Hierarchical Data Format 5 (HDF5) - C++ libraries
ii libhdf5-dev 1.8.15-patch1+docs-4 amd64 Hierarchical Data Format 5 (HDF5) - development files - serial version
d

@alalek alalek added the duplicate label Feb 2, 2016
@alalek

This comment has been minimized.

Copy link
Contributor

@alalek alalek commented Feb 2, 2016

Same problem here: #6016

@alalek alalek closed this Feb 2, 2016
@shreyashag

This comment has been minimized.

Copy link

@shreyashag shreyashag commented Jun 5, 2016

Any fix? I'm on Ubuntu 16.04

@Joshi-Harsh

This comment has been minimized.

Copy link

@Joshi-Harsh Joshi-Harsh commented Sep 21, 2016

I faced the same issue. I am on Ubuntu 16.04.1 x64

@kleinash

This comment has been minimized.

Copy link

@kleinash kleinash commented Oct 5, 2016

Any solution to this?

EDIT:

#6016 @avtomatons solution worked for me, add:

find_package(HDF5)
include_directories(${HDF5_INCLUDE_DIRS})

into modules/python/common.cmake

(I just put it at the bottom)

daveselinger added a commit to daveselinger/opencv that referenced this issue Dec 13, 2016
blogle added a commit to blogle/opencv that referenced this issue Mar 8, 2017
@jansila

This comment has been minimized.

Copy link

@jansila jansila commented Dec 5, 2017

Still works well on Ubuntu 16.04 LTS as of today.

@veniceskatepark

This comment has been minimized.

Copy link

@veniceskatepark veniceskatepark commented Jun 26, 2018

Worked perfectly! Thank you!:

#6016 @avtomatons solution worked for me, add:

find_package(HDF5)
include_directories(${HDF5_INCLUDE_DIRS})

into modules/python/common.cmake

(I just put it at the bottom)

@deepakpradhan5

This comment has been minimized.

Copy link

@deepakpradhan5 deepakpradhan5 commented Sep 13, 2019

Thank you. It worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
8 participants
You can’t perform that action at this time.