ofxCv examples not compiling (make, ubuntu 16.04, of 0.10.0)

Hi everybody,
I’m trying to compile the ofxCv examples under ubuntu 16.04, and of 0.10.0 for gcc5.
Other addons are working fine, but I cannot manage to get ofxCv compiling.
I just cloned the repo, and I’m using the master branch.

I’ve got a few errors after running the make command:

/usr/bin/ld.gold: error: cannot find -lippicv
collect2: error: ld returned 1 exit status

and then

/mypath/of_v0.10.0_linux64gcc5_release/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:403: recipe for target 'bin/example-background' failed

/mypath/of_v0.10.0_linux64gcc5_release/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:124: recipe for target 'Release' failed

Any hints?

can you post the output of typing in a terminal:

pkg-config opencv --libs


-L/usr/local/lib -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn -lopencv_dpm -lopencv_fuzzy -lopencv_line_descriptor -lopencv_optflow -lopencv_plot -lopencv_reg -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_rgbd -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_face -lopencv_xfeatures2d -lopencv_shape -lopencv_video -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_xobjdetect -lopencv_objdetect -lopencv_ml -lopencv_xphoto -lippicv -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_photo -lopencv_imgproc -lopencv_core

Not sure what’s going on but sounds like a bug in opencv config in your install. The package config is listing -lippicv as a dependency but it’s then not finding it on the system. Perhaps try to see if you can install that library independently using apt

I’ll try to install lippicv using apt-get.
In the meantime, I’ve found this issue:

and this question:

yes that sounds right, if libippcv is not in apt then this: https://github.com/opencv/opencv/issues/5841#issuecomment-166230444 should do.

Solved thanks to this: https://stackoverflow.com/a/34859763, but honestly I don’t know how future proof is this approach.

So basically I downloaded the ippicv library from here (https://sourceforge.net/projects/opencvlibrary/files/3rdparty/ippicv/) , went into the intel64 directory and then sudo cp libippicv.a /usr/local/lib

1 Like

that should work fine. i doubt the opencv library is going to be modified in ubuntu 16.04 and that dependency doesn’t seem to exist in 18.04 anymore so even if you updated to the next LTS it should be fine

1 Like