<p dir="auto">Something within OpenCV's NONFREE library is triggering a fatal make error.  The error message does not provide many clues:</p>
<p dir="auto">[ 51%] Linking CXX shared library ../../lib/libopencv_cudaarithm.so<br>
[ 51%] Built target opencv_cudaarithm<br>
Makefile:162: recipe for target 'all' failed<br>
make: *** [all] Error 2<br>
m@DarkMatter:/DM_Util/_INSTALL_LINUX/OpenCV_4/OpenCV_4.2.0_2020jan16/opencv/build$</p>
<p dir="auto">Line 162 in the Makefile is just the spec for make target, so no clues there either:</p>
<blockquote>
<p dir="auto">The main all target<br>
all: cmake_check_build_system<br>
$(CMAKE_COMMAND) -E cmake_progress_start<br>
...<br>
$(MAKE) -f CMakeFiles/Makefile2 all<br>
$(CMAKE_COMMAND) -E cmake_progress_start</p>
</blockquote>
<hr>
<p dir="auto">Additional notes:  Though I have not seen this consistently between build attempts,<br>
there is sometimes a non-fatal error re openGL.  But this related indirectly to rgbd in the contrib lib.</p>
<p dir="auto">[ 50%] Built target example_shape_shape_example<br>
[ 50%] Built target opencv_test_shape<br>
../../lib/libopencv_rgbd.so.4.2.0: undefined reference to <code class="notranslate">glRenderbufferStorageEXT' ../../lib/libopencv_rgbd.so.4.2.0: undefined reference to </code>glGenFramebuffersEXT'<br>
../../lib/libopencv_rgbd.so.4.2.0: undefined reference to <code class="notranslate">glBindRenderbufferEXT' ../../lib/libopencv_rgbd.so.4.2.0: undefined reference to </code>glGenRenderbuffersEXT'<br>
../../lib/libopencv_rgbd.so.4.2.0: undefined reference to <code class="notranslate">glFramebufferRenderbufferEXT' ../../lib/libopencv_rgbd.so.4.2.0: undefined reference to </code>glBindFramebufferEXT'<br>
collect2: error: ld returned 1 exit status<br>
modules/rgbd/CMakeFiles/opencv_test_rgbd.dir/build.make:192: recipe for target 'bin/opencv_test_rgbd' failed<br>
make[2]: *** [bin/opencv_test_rgbd] Error 1<br>
CMakeFiles/Makefile2:12517: recipe for target 'modules/rgbd/CMakeFiles/opencv_test_rgbd.dir/all' failed<br>
make[1]: *** [modules/rgbd/CMakeFiles/opencv_test_rgbd.dir/all] Error 2<br>
[ 50%] Built target opencv_datasets</p>
<p dir="auto">[end]</p>
<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; opencv.js 4.1.0-dev</li>
<li>Operating System / Platform =&gt; Version 74.0.3729.157 (Official Build) unknown (64-bit)</li>
<li>Compiler =&gt; opencv.js WASM build from master branch as described <a href="https://docs.opencv.org/master/d4/da1/tutorial_js_setup.html" rel="nofollow">here</a>.</li>
</ul>
<h5 dir="auto">Detailed description</h5>

<p dir="auto">Now the <a href="https://docs.opencv.org/master/d5/d86/tutorial_dnn_javascript.html" rel="nofollow">sample of face recognition with opencv.js</a> just work for the asm.js version of, and doesn't work for the WASM version of opencv.js, saying <code class="notranslate">cv.Mat is not a constructor</code> in the console.log. Seems we need <code class="notranslate">cv.onRuntimeInitialized=()=&gt;{}</code> for the loading of opencv.js WASM.</p>
<h5 dir="auto">Steps to reproduce</h5>

<p dir="auto">Go to <a href="https://docs.opencv.org/master/d4/da1/tutorial_js_setup.html" rel="nofollow">here</a></p>