RapidNJ for M1 macs
RapidNJ is a really nice program for making neighbour-joining trees from distance matrices or alignment data.
If you try and compile on an M1 Mac however, you’ll get errors that look like this:
In file included from src/main.cpp:1:
In file included from src/stdinclude.h:9:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/emmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
These Intel intrinsics in emmintrin.h
aren’t supported on ARM CPUs, such as the M1/M2
seen in recent Macbooks. Fortunately there’s an easy enough three step solution,
thanks to sse2neon: