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

<ul dir="auto">
<li>OpenCV =&gt; master, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/opencv/opencv/commit/834c99255320fb565259d3e9177edcb590d4a6be/hovercard" href="https://github.com/opencv/opencv/commit/834c99255320fb565259d3e9177edcb590d4a6be"><tt>834c992</tt></a></li>
<li>Operating System / Platform =&gt; Ubuntu 18.04, Power 9</li>
<li>Compiler =&gt; clang version 10.0.0 (<a href="mailto:git@github.com">git@github.com</a>:llvm/llvm-project.git 2f51a43f8c2b117e69a45eae6a7c849e035a793b)</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In file included from .../opencv/modules/core/src/arithm.cpp:50:
In file included from .../opencv/modules/core/src/precomp.hpp:49:
In file included from .../opencv/modules/core/include/opencv2/core/utility.hpp:56:
In file included from .../opencv/modules/core/include/opencv2/core.hpp:57:
In file included from .../opencv/modules/core/include/opencv2/core/matx.hpp:54:
In file included from .../opencv/modules/core/include/opencv2/core/saturate.hpp:49:         
.../opencv/modules/core/include/opencv2/core/fast_math.hpp:200:5: error: invalid instruction
    CV_INLINE_ROUND_DBL(value);                      
    ^                                                
.../opencv/modules/core/include/opencv2/core/fast_math.hpp:105:40: note: expanded from macro 'CV_INLINE_ROUND_DBL'
        __asm__( &quot;fctiw %[temp],%[in]\n\tmffprwz %[out],%[temp]\n\t&quot; : [out] &quot;=r&quot; (out), [temp] &quot;=d&quot; (temp) : [in] &quot;d&quot; ((double)(value)) : ); \
                                       ^
&lt;inline asm&gt;:2:2: note: instantiated into assembly here
        mffprwz 4,0                                                                                                                             
        ^~~~~~~"><pre class="notranslate"><code class="notranslate">In file included from .../opencv/modules/core/src/arithm.cpp:50:
In file included from .../opencv/modules/core/src/precomp.hpp:49:
In file included from .../opencv/modules/core/include/opencv2/core/utility.hpp:56:
In file included from .../opencv/modules/core/include/opencv2/core.hpp:57:
In file included from .../opencv/modules/core/include/opencv2/core/matx.hpp:54:
In file included from .../opencv/modules/core/include/opencv2/core/saturate.hpp:49:         
.../opencv/modules/core/include/opencv2/core/fast_math.hpp:200:5: error: invalid instruction
    CV_INLINE_ROUND_DBL(value);                      
    ^                                                
.../opencv/modules/core/include/opencv2/core/fast_math.hpp:105:40: note: expanded from macro 'CV_INLINE_ROUND_DBL'
        __asm__( "fctiw %[temp],%[in]\n\tmffprwz %[out],%[temp]\n\t" : [out] "=r" (out), [temp] "=d" (temp) : [in] "d" ((double)(value)) : ); \
                                       ^
&lt;inline asm&gt;:2:2: note: instantiated into assembly here
        mffprwz 4,0                                                                                                                             
        ^~~~~~~
</code></pre></div>
<p dir="auto">After investigating the most recent <a href="https://openpowerfoundation.org/?resource_lib=power-isa-version-3-0" rel="nofollow">Power ISA</a> (March 29, 2017. Page 131 of the pdf or 113 of the document) <code class="notranslate">mffprwz</code> is a mnemonic for <code class="notranslate">mfvsrwz</code>. Specifically:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Extended Mnemonics        Equivalent To
mffprwz      RA,FRS       mfvsrwz      RA,FRS
mfvrwz       RA,VRS       mfvsrwz      RA,VRS+32"><pre class="notranslate"><code class="notranslate">Extended Mnemonics        Equivalent To
mffprwz      RA,FRS       mfvsrwz      RA,FRS
mfvrwz       RA,VRS       mfvsrwz      RA,VRS+32
</code></pre></div>
<p dir="auto">After investigating clang, it <em>does not</em> implement <code class="notranslate">mffprwz</code>, instead only <code class="notranslate">mfvsrwz</code>. I will be passing this along to the llvm project as well but we can fix this here as well, probably faster. I've prepared a patch to follow as well.</p>
<h5 dir="auto">Steps to reproduce</h5>
<ol dir="auto">
<li>Checkout opencv.</li>
<li>Make build directory.</li>
<li><code class="notranslate">cmake &lt;path to source&gt; -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang</code></li>
<li><code class="notranslate">make -j###</code></li>
<li>Receive above error message.</li>
</ol>
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; 3.2.0-rc (from source)</li>
<li>Operating System / Platform =&gt; Ubuntu 16.10</li>
<li>Compiler =&gt; gcc 6.2.0</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">I'm trying to use the <code class="notranslate">ts</code> module in projects to use the same test functionalities as OpenCV. When I build OpenCV with  either</p>
<div class="highlight highlight-source-cmake notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="  -D BUILD_TESTS=ON 
  -D BUILD_PERF_TESTS=ON 
  -D BUILD_opencv_ts=ON "><pre class="notranslate">  -D BUILD_TESTS=ON 
  -D BUILD_PERF_TESTS=ON 
  -D BUILD_opencv_ts=ON </pre></div>
<p dir="auto">I see that the <code class="notranslate">ts</code> module is listed among the modules to built. However, it is never installed (not sure if that is intended).</p>
<p dir="auto">The library is created (although statically, regardless of <code class="notranslate">BUILD_SHARED_LIBS=ON</code>), but not installed, and not findable by <code class="notranslate">cmake</code>, for example.</p>
<h5 dir="auto">Steps to reproduce</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cmake \
  -D CMAKE_BUILD_TYPE=RELEASE \
  -D ENABLE_PRECOMPILED_HEADERS=OFF \
  -D CMAKE_INSTALL_PREFIX=/usr/local \
  -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
  -D BUILD_NEW_PYTHON_SUPPORT=ON \
  -D WITH_TBB=ON \
  -D WITH_QT=ON \
  -D WITH_OPENGL=ON \
  -D BUILD_TIFF=ON \
  -D BUILD_SHARED_LIBS=ON \
  -D BUILD_EXAMPLES=ON \
  -D BUILD_opencv_ts=ON \
  ..

make -j $(nproc)
sudo make install"><pre class="notranslate"><code class="notranslate">cmake \
  -D CMAKE_BUILD_TYPE=RELEASE \
  -D ENABLE_PRECOMPILED_HEADERS=OFF \
  -D CMAKE_INSTALL_PREFIX=/usr/local \
  -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
  -D BUILD_NEW_PYTHON_SUPPORT=ON \
  -D WITH_TBB=ON \
  -D WITH_QT=ON \
  -D WITH_OPENGL=ON \
  -D BUILD_TIFF=ON \
  -D BUILD_SHARED_LIBS=ON \
  -D BUILD_EXAMPLES=ON \
  -D BUILD_opencv_ts=ON \
  ..

make -j $(nproc)
sudo make install
</code></pre></div>
<p dir="auto">Then try to use it, for example with <code class="notranslate">cmake</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="find_package ( OpenCV REQUIRED ts )"><pre class="notranslate"><code class="notranslate">find_package ( OpenCV REQUIRED ts )
</code></pre></div>
<p dir="auto">fails to find the <code class="notranslate">ts</code> library.</p>
<h4 dir="auto">Related questions</h4>
<p dir="auto">Already ask for help before posting, <a href="http://answers.opencv.org/question/134337/missing-ts-from-release-build/" rel="nofollow">in here</a>. However, we couldn't find a problem.</p>