Edward Clark
Joined
10 Experience
0 Lessons Completed
0 Questions Solved
Activity
The issue is that opencv_contrib is not a real standalone library. It is only a collection of extra OpenCV modules, so there is no libopencv_contrib.so to link against. The ruby-opencv gem is very old and incorrectly expects this library to exist, which is why the build fails even though other OpenCV libraries are found.
The practical fix is to use OpenCV 2.4.x, which is the last version properly compatible with ruby-opencv. Newer OpenCV versions (3.x/4.x) are not supported by this gem. Also, if possible, build OpenCV inside the Linux filesystem (for example under /home) instead of /mnt/c, as native extensions are more reliable in WSL that way.