npm-opencv-build icon indicating copy to clipboard operation
npm-opencv-build copied to clipboard

Support OpenCV built with CUDA extensions

Open cjntaylor opened this issue 6 years ago • 1 comments

https://github.com/justadudewhohacks/npm-opencv-build/blob/1228a60fb4b5b58abf099638939cf958b22fa815/libs.js#L44

Similar to the above, a CUDA based build also produces a libopencv_cudaobjdetect.so (or platform specific equivalent), which will cause the resulting opencv4nodejs module to fail to load at runtime (due to node-gyp missing symbol shenanigans, it builds just fine without the right libraries linked).

For now, it looks like another dirty hack of .filter(file => !file.includes('cuda')) is sufficient to get the right libraries linked. However, these hacks are a byproduct of a flawed approach to how you find the libraries in the first place. I've put more details along with a suggestion here: https://github.com/justadudewhohacks/opencv4nodejs/issues/162 (the issue that I actually encountered)

This is not a request to actually support CUDA-based modules, just that their presence doesn't cause the module to fail to load.

cjntaylor avatar Mar 27 '18 02:03 cjntaylor