Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue with header files in OpenCV 2.4.3 on FreeBSD

I'm currently working on a study comparing the performance of different operating systems in image processing. Because of this, i have to install OpenCV 2.4.x (2.4.3 preferably) on a FreeBSD system.

The problem is that it includes asm/types.h, which is not a POSIX-compliant library but rather a Linux one.

So i run cmake with the standard flags suggested by the install guide:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..

Where .. points correctly to the source folder. Everything goes ok, so i run make:

[ 16%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_libv4l.cpp.o
/root/work/OpenCV-2.4.3/modules/highgui/src/cap_libv4l.cpp:238:54: error: asm/types.h: No such file or directory

The question is: what should i do in order to tell the compiler that it needs to include another header instead of the original header file?

like image 716
moscar Avatar asked Dec 31 '25 10:12

moscar


1 Answers

This problem was addressed at Bug#651872: opencv: FTBFS on kfreebsd

In modules/highgui/src/cap_libv4l.cpp, remove or comment out the following include:

#include <asm/types.h>

Do the same in modules/highgui/src/cap_v4l.cpp.

like image 187
karlphillip Avatar answered Jan 02 '26 16:01

karlphillip



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!