<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; 4.0.0 / 3.4.4</li>
<li>Operating System / Platform =&gt; Ubuntu 16.04</li>
<li>Compiler =&gt; Emscripten 1.38.20</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">I was trying to build the opencv.js with the wasm output. I just followed the steps on the opencv.js tutorial and the build was completed with no error (some warnings), but I could not find the .wasm output in the bin folder, there were only two files opencv.js and opencv_js.js. I want to use the feature2d module so I tried the latest versions 4.0.0 and 3.4.4, both of them did not output the wasm file. Below is the output in the terminal console for your reference:<br>
<a href="https://github.com/opencv/opencv/files/2642471/log.txt">log.txt</a></p>
<p dir="auto">Then I also tried 3.4.3 version, and this time I was able to get the opencv_js.wasm file together with opencv.js and opencv_js.js. But it seems that 3.4.3 version does not include features2d in the js binding.</p>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">cd opencv<br>
python ./platforms/js/build_js.py build_wasm --build_wasm</p>
<p dir="auto">Transferred from <a href="http://code.opencv.org/issues/4214" rel="nofollow">http://code.opencv.org/issues/4214</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="|| Pablo Vasquez on 2015-02-24 03:41
|| Priority: Normal
|| Affected: branch '2.4' (2.4-dev)
|| Category: build/install
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: Any / iOS"><pre class="notranslate"><code class="notranslate">|| Pablo Vasquez on 2015-02-24 03:41
|| Priority: Normal
|| Affected: branch '2.4' (2.4-dev)
|| Category: build/install
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: Any / iOS
</code></pre></div>
<h2 dir="auto">Missing symbols in iOS framework</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Linking against the OpenCV iOS framework for 2.4.10 available for download at XXXX throws the following linker errors:

@Undefined symbols for architecture arm64:
  &quot;_jpeg_free_small&quot;, referenced from:
      _free_pool in opencv2(jmemmgr.o)
      _self_destruct in opencv2(jmemmgr.o)
  &quot;_jpeg_mem_available&quot;, referenced from:
      _realize_virt_arrays in opencv2(jmemmgr.o)
  &quot;_jpeg_free_large&quot;, referenced from:
      _free_pool in opencv2(jmemmgr.o)
  &quot;_jpeg_open_backing_store&quot;, referenced from:
      _realize_virt_arrays in opencv2(jmemmgr.o)
  &quot;_jpeg_get_large&quot;, referenced from:
      _alloc_large in opencv2(jmemmgr.o)
      _alloc_barray in opencv2(jmemmgr.o)
  &quot;_jpeg_mem_term&quot;, referenced from:
      _jinit_memory_mgr in opencv2(jmemmgr.o)
      _self_destruct in opencv2(jmemmgr.o)
  &quot;_jpeg_mem_init&quot;, referenced from:
      _jinit_memory_mgr in opencv2(jmemmgr.o)
  &quot;_jpeg_get_small&quot;, referenced from:
      _jinit_memory_mgr in opencv2(jmemmgr.o)
      _alloc_small in opencv2(jmemmgr.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@

This happens no matter which arch I am building for, and even when building my own framework from the 2.4.10.1 tag, using the build_framework.py script.
Investigation shows that for some reason, jmemansi.o from 3rdparty/libjpeg is not being included in the final binary, even though it is being compiled into liblibjpeg.a"><pre class="notranslate"><code class="notranslate">Linking against the OpenCV iOS framework for 2.4.10 available for download at XXXX throws the following linker errors:

@Undefined symbols for architecture arm64:
  "_jpeg_free_small", referenced from:
      _free_pool in opencv2(jmemmgr.o)
      _self_destruct in opencv2(jmemmgr.o)
  "_jpeg_mem_available", referenced from:
      _realize_virt_arrays in opencv2(jmemmgr.o)
  "_jpeg_free_large", referenced from:
      _free_pool in opencv2(jmemmgr.o)
  "_jpeg_open_backing_store", referenced from:
      _realize_virt_arrays in opencv2(jmemmgr.o)
  "_jpeg_get_large", referenced from:
      _alloc_large in opencv2(jmemmgr.o)
      _alloc_barray in opencv2(jmemmgr.o)
  "_jpeg_mem_term", referenced from:
      _jinit_memory_mgr in opencv2(jmemmgr.o)
      _self_destruct in opencv2(jmemmgr.o)
  "_jpeg_mem_init", referenced from:
      _jinit_memory_mgr in opencv2(jmemmgr.o)
  "_jpeg_get_small", referenced from:
      _jinit_memory_mgr in opencv2(jmemmgr.o)
      _alloc_small in opencv2(jmemmgr.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@

This happens no matter which arch I am building for, and even when building my own framework from the 2.4.10.1 tag, using the build_framework.py script.
Investigation shows that for some reason, jmemansi.o from 3rdparty/libjpeg is not being included in the final binary, even though it is being compiled into liblibjpeg.a
</code></pre></div>
<h2 dir="auto">History</h2>
<h5 dir="auto">Pablo Vasquez on 2015-02-24 03:45</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Sorry. That was a misfire, the link should obviously have been: http://opencv.org/downloads.html"><pre class="notranslate"><code class="notranslate">Sorry. That was a misfire, the link should obviously have been: http://opencv.org/downloads.html
</code></pre></div>