parasail icon indicating copy to clipboard operation
parasail copied to clipboard

Parasail on recent M1 Mac?

Open pb-cdunn opened this issue 4 years ago • 3 comments

Have you tried to use parasail on a recent Mac with the M1 processor? I have hit this:

ccache cc -Isubprojects/parasail/contrib/libssw.a.p -Isubprojects/parasail/contrib -I../subprojects/parasail/contrib -Isubprojects/parasail -I../subprojects/parasail -Isubprojects/parasail/src -I../subprojects/parasail/src -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu11 -O3 -MD -MQ subprojects/parasail/contrib/libssw.a.p/ssw_ssw.c.o -MF subprojects/parasail/contrib/libssw.a.p/ssw_ssw.c.o.d -o subprojects/parasail/contrib/libssw.a.p/ssw_ssw.c.o -c ../subprojects/parasail/contrib/ssw/ssw.c
In file included from ../subprojects/parasail/contrib/ssw/ssw.c:41:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/emmintrin.h:13:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/xmmintrin.h:13:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/mmintrin.h:50:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Same problem for BWA:

  • https://stackoverflow.com/questions/65555170/unable-to-run-make-command-for-bwa-on-apple-m1-on-mac-os-big-sur

How about utilizing this wrapper?

  • https://github.com/simd-everywhere/simde

pb-cdunn avatar Feb 19 '21 01:02 pb-cdunn

I do not have a mac so I haven't tested it, no. However, I do have some mac builds as part of travis ci. The stackoverflow question indicates neon should be supported. I do have neon support via the simde library, but the support is based on a very old simde version. There's a PR open to update simde, but I haven't had time to properly review it (#82).

Which build tool are you using on mac? cmake? autotools?

jeffdaily avatar Feb 19 '21 15:02 jeffdaily

Curious why the configure- or cmake-time check for SSE2 is successful but then later fails to compile. Perhaps if you could share a full output log of your build?

jeffdaily avatar Feb 19 '21 15:02 jeffdaily

Which build tool are you using on mac? cmake? autotools?

meson

Curious why the configure- or cmake-time check for SSE2 is successful but then later fails to compile.

We have different meson.build for the parent and subproject.

This might be tricky to solve because whatever you do for parasail, we might also need to do in the parent project. But we might have reasons for not doing that. (Lots of devs here with different opinions.) Anyway, if you get it working on Mac, we might be able to adapt it for use in our other tools.

pb-cdunn avatar Apr 17 '21 14:04 pb-cdunn