Compilation and Installation
Prerequisites
You have obtained the sse2neon.h file, which is available at https://github.com/DLTcollab/sse2neon/blob/master/sse2neon.h.
Procedure
- Run the following command to decompress the installation package:
unzip hisat-0.1.6-beta-source.zip
- Run the following command to go to the directory generated after decompression:
cd hisat-0.1.6-beta
- Run the following command to set environment variables:
export NO_TBB=1
export POPCNT_CAPABILITY=0
- Run the following command to modify the Makefile file:
- Open Makefile.
vi Makefile
- Press i to go to the edit mode. Modify the AArch64 branch of BITS=64 in the Makefile file. Specifically, between line 143 and line 144, insert the following content in bold: (BITS=64 supports x86 only and does not support AArch64. You need to add an AArch64 branch.)
Before the modification:
BITS=32 ifeq (x86_64,$(shell uname -m)) BITS=64 endif
After the modification:
BITS=32 ifeq (x86_64,$(shell uname -m)) BITS=64 endif ifeq (aarch64,$(shell uname -m)) BITS=64 endif
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open Makefile.
- Run the following commands to modify the Makefile file:
- Open Makefile.
vi Makefile
- Press i to go to the insert mode. Modify the AArch64 branches of -m64 and -msse2 in the Makefile file. Specifically, between line 165 and line 168, insert the following content in bold: The compilation options -m64 and -msse2 in Makefile support x86 only and do not support AArch64. You need to add AArch64 branches.
Before the modification: (lines 152 to 159 in the original file)
ifeq (32,$(BITS)) BITS_FLAG = -m32 endif ifeq (64,$(BITS)) BITS_FLAG = -m64 endif SSE_FLAG=-msse2
After the modification:
ifeq (32,$(BITS)) BITS_FLAG = -m32 endif ifeq (64,$(BITS)) BITS_FLAG = -m64 endif SSE_FLAG=-msse2 ifeq (aarch64,$(shell uname -m)) BITS_FLAG = SSE_FLAG = endif - Press Esc, type :wq!, and press Enter to save the file and exit.
- Open Makefile.
- Run the following commands to modify the Makefile file:
- Open Makefile.
vi Makefile
- Press i to go to the insert mode and modify the FLAGS parameters in the Makefile file.
Before the modification:
DEBUG_FLAGS = -O0 -g3 $(BIToS_FLAG) $(SSE_FLAG) DEBUG_DEFS = -DCOMPILER_OPTIONS="\"$(DEBUG_FLAGS) $(EXTRA_FLAGS)\"" RELEASE_FLAGS = -O3 $(BITS_FLAG) $(SSE_FLAG) -funroll-loops -g3 RELEASE_DEFS = -DCOMPILER_OPTIONS="\"$(RELEASE_FLAGS) $(EXTRA_FLAGS)\"" NOASSERT_FLAGS = -DNDEBUG FILE_FLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
After the modification:
DEBUG_FLAGS = -O0 -g3 $(BIToS_FLAG) $(SSE_FLAG) -funroll-loops -std=c++98 DEBUG_DEFS = -DCOMPILER_OPTIONS="\"$(DEBUG_FLAGS) $(EXTRA_FLAGS)\"" RELEASE_FLAGS = -O3 $(BITS_FLAG) $(SSE_FLAG) -funroll-loops -g3 -std=c++98 -Xlinker --allow-multiple-definition RELEASE_DEFS = -DCOMPILER_OPTIONS="\"$(RELEASE_FLAGS) $(EXTRA_FLAGS)\"" NOASSERT_FLAGS = -DNDEBUG FILE_FLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open Makefile.
- Run the following command to copy sse2neon.h to the installation directory of the compiler.
cp sse2neon.h /path/to/GNU/include
- Run the following commands to modify the aligner_sw.h and sse_util.h header files:
- Open aligner_sw.h.
vi aligner_sw.h
- Press i to go to the insert mode. Modify the aligner_sw.h file by replacing #include <emmintrin.h> with #include <sse2neon.h>.
Before the modification:
#include <emmintrin.h>
After the modification:
#include <sse2neon.h>
- Press Esc, type :wq!, and press Enter to save the file and exit.
Modify the sse_util.h file in the same way.
- Open aligner_sw.h.
- Run the following command to perform compilation and installation:
make
- Run the following command to add the environment variable:
export PATH=/path/to/HISAT/hisat-0.1.6-beta:$PATH
Parent topic: HISAT 0.1.6 Porting Guide (CentOS 7.6)