I can not build OpenCV3.1.0 with FreeBSD11.1.

asked 2018-04-05 06:11:29 -0600

sikkoku20 gravatar image
unzip opencv-3.1.0.zip
 git clone https://github.com/opencv/opencv_contrib
 cd opencv-3.1.0
 mkdir build
 cd build cmake -D CMAKE_BUILD_TYPE=RELEASE -D
 CMAKE_INSTALL_PREFIX=/usr/local -D
 OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ..

An error occurred when executing the above command.

Error Statement CMake Error at samples/gpu/CMakeLists.txt:100 (list):

Configuring incomplete, errors occurred! See also "/home/user/support/src/opencv/opencv-3.1.0/build/CMakeFiles/CMakeOutput.log". See also "/home/user/support/src/opencv/opencv-3.1.0/build/CMakeFiles/CMakeError.log".

list sub-command REMOVE_ITEM requires list to be present.

edit retag flag offensive close merge delete

Comments

why do you try with outdated 3.1 ? if you already make an effort, you should use latest 3.4.1

and which cmake version is it ? (problem seems to nbe there)

berak gravatar imageberak ( 2018-04-05 06:39:54 -0600 )edit

There is a program using opencv3.1 and makes a version the same to follow it. Cmake version is 3.10.2.

sikkoku20 gravatar imagesikkoku20 ( 2018-04-05 08:46:16 -0600 )edit

try to disable the samples by adding -D BUILD_EXAMPLES=OFF

(also using latest opencv_contrib with outdated 3.1.0 is asking for trouble. make sure you're using exactly the same version for both (e.g. by git checkout 3.1.0 there))

berak gravatar imageberak ( 2018-04-06 03:17:18 -0600 )edit

As I said, the build with cmake succeeded. However, it will fail with the next make.

# make
Scanning dependencies of target gen-pkgconfig
[  0%] Generate opencv.pc
[  0%] Built target gen-pkgconfig
Scanning dependencies of target ippiw
[  0%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_core.c.o
In file included from /home/user/support/src/opencv/opencv-3.4.1/build/3rdparty/ippicv/ippiw_lnx/src/iw_core.c:58:
/usr/include/malloc.h:3:2: error: "<malloc.h> has been replaced by <stdlib.h>"
#error "<malloc.h> has been replaced by <stdlib.h>"
 ^
1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /home/user/support/src/opencv/opencv-3.4.1/build
*** Error code 1

Stop.
make[1]: stopped in /hom
sikkoku20 gravatar imagesikkoku20 ( 2018-04-08 02:46:14 -0600 )edit