<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 7 Dec 2020 at 11:49, Nilesh Patra <<a href="mailto:npatra974@gmail.com">npatra974@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Michael</div><div><br></div><div>Thanks for the hint, I did this (not yet pushed):</div><div><br></div><div>-#include <xmmintrin.h><br>-<br> /* yes I know, the top of this file is quite ugly */<br> <br>+define SIMDE_ENABLE_NATIVE_ALIASES<br>+#include <simde/x86/sse.h><br></div><div><br></div><div>But I end up with the same error that I pasted earlier. Am I missing something in the hint?</div><div>Please let me know.</div></div></blockquote><div><br></div><div>This is because  upstream used a private symbol, __v4sf is not part of the public interface for any x86 SIMD: <a href="https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=v4sf">https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=v4sf</a></div><div><br></div><div>Looking at /usr/lib/gcc/x86_64-linux-gnu/9/include/xmmintrin.h we find the following definition</div><div><br></div><div>/* Internal data types for implementing the intrinsics.  */<br>typedef float __v4sf __attribute__ ((__vector_size__ (16)));</div><div><br></div><div>But this doesn't look very portable.<br></div><div> </div><div><br></div><div>Grepping through the SIMDe source for a portable version, we see that __vector_size__ is used in simde/simde-common.h</div><div><br></div><div>#  if \<br>    HEDLEY_GCC_VERSION_CHECK(4,8,0)<br>#    define SIMDE_VECTOR(size) __attribute__((__vector_size__(size)))</div><div><br></div><div>So we keep looking for a usage of SIMDE_VECTOR involving a float, and in simde/x86/sse.h we find</div><div><br></div><div>SIMDE_ALIGN_TO_16 simde_float32  f32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;</div><div><br></div><div>so the portable thing to emulate the private definition is to do</div><div><br></div><div>typedef simde_float32 __v4sf SIMDE_VECTOR(16);</div><div><br></div><div>I've done so in a branch at <a href="https://salsa.debian.org/med-team/scrappie/-/tree/mr-c-wip">https://salsa.debian.org/med-team/scrappie/-/tree/mr-c-wip</a></div><div><br></div><div>FYI, you mentioned using the porterbox to test, you can also cross-build for arm64 on an amd64 system using cowbuilder-dist. <br></div><div><br></div><div>We can check <a href="http://crossqa.debian.net/src/scrappie">http://crossqa.debian.net/src/scrappie</a> (The "cross" link on the right side of <a href="https://tracker.debian.org/pkg/scrappie">https://tracker.debian.org/pkg/scrappie</a>) to confirm that cross-building has worked in the past.<br></div><div><div><br></div><div>cowbuilder-dist sid build scrappie_1.4.2-3.dsc --host-arch arm64<br></div></div><div><br></div><div>If you have qemu-user-static installed it can even run build-time tests via "--no-auto-cross"<br></div><div><br></div><div>cowbuilder-dist sid build scrappie_1.4.2-3.dsc --host-arch arm64 --no-auto-cross</div><div> </div></div></div>