[Solved] How to run opencv-samples installed from Arch Linux repo?

asked 2015-12-30 07:57:37 -0500

freshlypicked gravatar image

updated 2015-12-30 09:42:13 -0500

Hi. I've taken interest on OpenCV and installed it on my machine with pacman package manager as I'm running with Arch Linux directly from the repository including the samples which is in a separate package. I tried compiling the source found in the /usr/share/opencv/samples directory with cmake . and then make. It compiles some of the examples, but it stops at 3% and shows the following error:

/usr/bin/ld: CMakeFiles/example_contours.dir/contours.c.o: undefined reference to symbol 'lrint@@GLIBC_2.1'
/usr/lib/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
c/CMakeFiles/example_contours.dir/build.make:109: recipe for target 'c/c-example-contours' failed
make[2]: *** [c/c-example-contours] Error 1
CMakeFiles/Makefile2:236: recipe for target 'c/CMakeFiles/example_contours.dir/all' failed
make[1]: *** [c/CMakeFiles/example_contours.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

I've already tried searching the web, but I couldn't find any answers on how to deal with this error. Can anyone please point me into the right direction, as all I wanted was to run the samples.

edit retag flag offensive close merge delete


berak gravatar imageberak ( 2015-12-30 08:23:48 -0500 )edit

thanks for guiding me @berak.

freshlypicked gravatar imagefreshlypicked ( 2015-12-30 09:18:19 -0500 )edit