Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update abismal to build and run on Apple M1 #48

Open
melaniesilvis-epic opened this issue Dec 15, 2023 · 1 comment
Open

Update abismal to build and run on Apple M1 #48

melaniesilvis-epic opened this issue Dec 15, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@melaniesilvis-epic
Copy link

Hi! I'm having an issue installing on my MacOS following the instructions, not sure what's going on but I would really appreciate any help!

  • Installed all dependencies using homebrew
  • downloaded abismal-3.2.2
  • made build directory and config file
  • failing during make with error: '_MM_HINT_T0' was not declared in this scope
(dnmtools_env) melaniesilvis@Melanie-Silvis-MacBook-Air abismal-3.2.2 % ./configure --prefix=$(pwd) \
    CXX="g++-13" \
    CPPFLAGS="-I$(brew --prefix)/include" \
    LDFLAGS="-L$(brew --prefix)/lib"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C++... yes
checking whether g++-13 accepts -g... yes
checking for g++-13 option to enable C++11 features... none needed
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++-13... gcc3
checking whether g++-13 supports C++17 features with -std=c++17... yes
checking for gcc... gcc
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking for ranlib... ranlib
checking for library containing hts_version... -lhts
checking for g++-13 -std=c++17 option to support OpenMP... -fopenmp
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: linking data/md5sum.txt to tests/md5sum.txt
config.status: linking data/tRex1.fa to tests/tRex1.fa
config.status: executing depfiles commands
=== configuring in src/smithlab_cpp (/Users/melaniesilvis/Documents/GitHub/abismal-3.2.2/src/smithlab_cpp)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/Users/melaniesilvis/Documents/GitHub/abismal-3.2.2'  'CXX=g++-13' 'CPPFLAGS=-I/opt/homebrew/include' 'LDFLAGS=-L/opt/homebrew/lib' --cache-file=/dev/null --srcdir=.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C++... yes
checking whether g++-13 accepts -g... yes
checking for g++-13 option to enable C++11 features... none needed
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++-13... gcc3
checking whether g++-13 supports C++17 features with -std=c++17... yes
checking for gcc... gcc
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking for ranlib... ranlib
checking for zlibVersion in -lz... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands


(dnmtools_env) melaniesilvis@Melanie-Silvis-MacBook-Air abismal-3.2.2 % make
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in src/smithlab_cpp
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
depbase=`echo src/abismal.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	g++-13 -std=c++17 -DHAVE_CONFIG_H -I.  -I ./src/smithlab_cpp -I ./src/bamxx -I/opt/homebrew/include -fopenmp -O3  -MT src/abismal.o -MD -MP -MF $depbase.Tpo -c -o src/abismal.o src/abismal.cpp &&\
	mv -f $depbase.Tpo $depbase.Po
src/abismal.cpp: In function 'void check_hits(uint32_t, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, const std::vector<unsigned int>::const_iterator&, std::vector<unsigned int>::const_iterator, result_type&)':
src/abismal.cpp:1006:18: error: '_MM_HINT_T0' was not declared in this scope
 1006 |                  _MM_HINT_T0);
      |                  ^~~~~~~~~~~
src/abismal.cpp:1005:5: error: there are no arguments to '_mm_prefetch' that depend on a template parameter, so a declaration of '_mm_prefetch' must be available [-fpermissive]
 1005 |     _mm_prefetch(&(*(genome_st + ((*(start_idx + 10) - offset) >> 4))),
      |     ^~~~~~~~~~~~
src/abismal.cpp:1005:5: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
src/abismal.cpp: In instantiation of 'void check_hits(uint32_t, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, const std::vector<unsigned int>::const_iterator&, std::vector<unsigned int>::const_iterator, result_type&) [with short unsigned int strand_code = 0; bool specific = true; result_type = se_candidates; uint32_t = unsigned int; std::vector<long unsigned int>::const_iterator = std::vector<long unsigned int>::const_iterator; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator]':
src/abismal.cpp:1188:36:   required from 'void process_seeds(uint32_t, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, genome_iterator, const Read&, const PackedRead&, result_type&) [with short unsigned int strand_code = 0; result_type = se_candidates; uint32_t = unsigned int; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator; genome_iterator = genome_four_bit_itr; Read = std::vector<unsigned char>; PackedRead = std::vector<long unsigned int>]'
src/abismal.cpp:1531:52:   required from here
src/abismal.cpp:1006:29: error: '_mm_prefetch' was not declared in this scope
 1006 |                  _MM_HINT_T0);
      |                             ^
src/abismal.cpp: In instantiation of 'void check_hits(uint32_t, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, const std::vector<unsigned int>::const_iterator&, std::vector<unsigned int>::const_iterator, result_type&) [with short unsigned int strand_code = 4096; bool specific = true; result_type = se_candidates; uint32_t = unsigned int; std::vector<long unsigned int>::const_iterator = std::vector<long unsigned int>::const_iterator; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator]':
src/abismal.cpp:1188:36:   required from 'void process_seeds(uint32_t, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, genome_iterator, const Read&, const PackedRead&, result_type&) [with short unsigned int strand_code = 4096; result_type = se_candidates; uint32_t = unsigned int; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator; genome_iterator = genome_four_bit_itr; Read = std::vector<unsigned char>; PackedRead = std::vector<long unsigned int>]'
src/abismal.cpp:1538:52:   required from here
src/abismal.cpp:1006:29: error: '_mm_prefetch' was not declared in this scope
src/abismal.cpp: In instantiation of 'void check_hits(uint32_t, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, const std::vector<unsigned int>::const_iterator&, std::vector<unsigned int>::const_iterator, result_type&) [with short unsigned int strand_code = 4112; bool specific = true; result_type = se_candidates; uint32_t = unsigned int; std::vector<long unsigned int>::const_iterator = std::vector<long unsigned int>::const_iterator; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator]':
src/abismal.cpp:1188:36:   required from 'void process_seeds(uint32_t, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, genome_iterator, const Read&, const PackedRead&, result_type&) [with short unsigned int strand_code = 4112; result_type = se_candidates; uint32_t = unsigned int; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator; genome_iterator = genome_four_bit_itr; Read = std::vector<unsigned char>; PackedRead = std::vector<long unsigned int>]'
src/abismal.cpp:1546:52:   required from here
src/abismal.cpp:1006:29: error: '_mm_prefetch' was not declared in this scope
src/abismal.cpp: In instantiation of 'void check_hits(uint32_t, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, const std::vector<unsigned int>::const_iterator&, std::vector<unsigned int>::const_iterator, result_type&) [with short unsigned int strand_code = 16; bool specific = true; result_type = se_candidates; uint32_t = unsigned int; std::vector<long unsigned int>::const_iterator = std::vector<long unsigned int>::const_iterator; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator]':
src/abismal.cpp:1188:36:   required from 'void process_seeds(uint32_t, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, genome_iterator, const Read&, const PackedRead&, result_type&) [with short unsigned int strand_code = 16; result_type = se_candidates; uint32_t = unsigned int; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator; genome_iterator = genome_four_bit_itr; Read = std::vector<unsigned char>; PackedRead = std::vector<long unsigned int>]'
src/abismal.cpp:1553:52:   required from here
src/abismal.cpp:1006:29: error: '_mm_prefetch' was not declared in this scope
src/abismal.cpp: In instantiation of 'void check_hits(uint32_t, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, const std::vector<unsigned int>::const_iterator&, std::vector<unsigned int>::const_iterator, result_type&) [with short unsigned int strand_code = 0; bool specific = true; result_type = pe_candidates; uint32_t = unsigned int; std::vector<long unsigned int>::const_iterator = std::vector<long unsigned int>::const_iterator; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator]':
src/abismal.cpp:1188:36:   required from 'void process_seeds(uint32_t, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, genome_iterator, const Read&, const PackedRead&, result_type&) [with short unsigned int strand_code = 0; result_type = pe_candidates; uint32_t = unsigned int; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator; genome_iterator = genome_four_bit_itr; Read = std::vector<unsigned char>; PackedRead = std::vector<long unsigned int>]'
src/abismal.cpp:1778:32:   required from 'bool map_fragments(uint32_t, const std::string&, const std::string&, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, genome_iterator, Read&, Read&, PackedRead&, bam_cigar_t&, bam_cigar_t&, AbismalAlignSimple&, pe_candidates&, pe_candidates&, std::vector<short int>&, se_candidates&, se_candidates&, pe_element&) [with bool cmp = false; bool swap_ends = false; short unsigned int strand_code1 = 0; short unsigned int strand_code2 = 4112; uint32_t = unsigned int; std::string = std::__cxx11::basic_string<char>; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator; genome_iterator = genome_four_bit_itr; Read = std::vector<unsigned char>; PackedRead = std::vector<long unsigned int>; bam_cigar_t = std::vector<unsigned int>; AbismalAlignSimple = AbismalAlign<simple_aln::mismatch_score, -4>]'
src/abismal.cpp:2058:52:   required from here
src/abismal.cpp:1006:29: error: '_mm_prefetch' was not declared in this scope
src/abismal.cpp: In instantiation of 'void check_hits(uint32_t, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, const std::vector<unsigned int>::const_iterator&, std::vector<unsigned int>::const_iterator, result_type&) [with short unsigned int strand_code = 4112; bool specific = true; result_type = pe_candidates; uint32_t = unsigned int; std::vector<long unsigned int>::const_iterator = std::vector<long unsigned int>::const_iterator; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator]':
src/abismal.cpp:1188:36:   required from 'void process_seeds(uint32_t, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, genome_iterator, const Read&, const PackedRead&, result_type&) [with short unsigned int strand_code = 4112; result_type = pe_candidates; uint32_t = unsigned int; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator; genome_iterator = genome_four_bit_itr; Read = std::vector<unsigned char>; PackedRead = std::vector<long unsigned int>]'
src/abismal.cpp:1787:32:   required from 'bool map_fragments(uint32_t, const std::string&, const std::string&, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, genome_iterator, Read&, Read&, PackedRead&, bam_cigar_t&, bam_cigar_t&, AbismalAlignSimple&, pe_candidates&, pe_candidates&, std::vector<short int>&, se_candidates&, se_candidates&, pe_element&) [with bool cmp = false; bool swap_ends = false; short unsigned int strand_code1 = 0; short unsigned int strand_code2 = 4112; uint32_t = unsigned int; std::string = std::__cxx11::basic_string<char>; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator; genome_iterator = genome_four_bit_itr; Read = std::vector<unsigned char>; PackedRead = std::vector<long unsigned int>; bam_cigar_t = std::vector<unsigned int>; AbismalAlignSimple = AbismalAlign<simple_aln::mismatch_score, -4>]'
src/abismal.cpp:2058:52:   required from here
src/abismal.cpp:1006:29: error: '_mm_prefetch' was not declared in this scope
src/abismal.cpp: In instantiation of 'void check_hits(uint32_t, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, const std::vector<unsigned int>::const_iterator&, std::vector<unsigned int>::const_iterator, result_type&) [with short unsigned int strand_code = 4096; bool specific = true; result_type = pe_candidates; uint32_t = unsigned int; std::vector<long unsigned int>::const_iterator = std::vector<long unsigned int>::const_iterator; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator]':
src/abismal.cpp:1188:36:   required from 'void process_seeds(uint32_t, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, genome_iterator, const Read&, const PackedRead&, result_type&) [with short unsigned int strand_code = 4096; result_type = pe_candidates; uint32_t = unsigned int; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator; genome_iterator = genome_four_bit_itr; Read = std::vector<unsigned char>; PackedRead = std::vector<long unsigned int>]'
src/abismal.cpp:1778:32:   required from 'bool map_fragments(uint32_t, const std::string&, const std::string&, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, genome_iterator, Read&, Read&, PackedRead&, bam_cigar_t&, bam_cigar_t&, AbismalAlignSimple&, pe_candidates&, pe_candidates&, std::vector<short int>&, se_candidates&, se_candidates&, pe_element&) [with bool cmp = true; bool swap_ends = true; short unsigned int strand_code1 = 4096; short unsigned int strand_code2 = 16; uint32_t = unsigned int; std::string = std::__cxx11::basic_string<char>; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator; genome_iterator = genome_four_bit_itr; Read = std::vector<unsigned char>; PackedRead = std::vector<long unsigned int>; bam_cigar_t = std::vector<unsigned int>; AbismalAlignSimple = AbismalAlign<simple_aln::mismatch_score, -4>]'
src/abismal.cpp:2066:52:   required from here
src/abismal.cpp:1006:29: error: '_mm_prefetch' was not declared in this scope
src/abismal.cpp: In instantiation of 'void check_hits(uint32_t, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, std::vector<long unsigned int>::const_iterator, const std::vector<unsigned int>::const_iterator&, std::vector<unsigned int>::const_iterator, result_type&) [with short unsigned int strand_code = 16; bool specific = true; result_type = pe_candidates; uint32_t = unsigned int; std::vector<long unsigned int>::const_iterator = std::vector<long unsigned int>::const_iterator; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator]':
src/abismal.cpp:1188:36:   required from 'void process_seeds(uint32_t, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, genome_iterator, const Read&, const PackedRead&, result_type&) [with short unsigned int strand_code = 16; result_type = pe_candidates; uint32_t = unsigned int; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator; genome_iterator = genome_four_bit_itr; Read = std::vector<unsigned char>; PackedRead = std::vector<long unsigned int>]'
src/abismal.cpp:1787:32:   required from 'bool map_fragments(uint32_t, const std::string&, const std::string&, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator, genome_iterator, Read&, Read&, PackedRead&, bam_cigar_t&, bam_cigar_t&, AbismalAlignSimple&, pe_candidates&, pe_candidates&, std::vector<short int>&, se_candidates&, se_candidates&, pe_element&) [with bool cmp = true; bool swap_ends = true; short unsigned int strand_code1 = 4096; short unsigned int strand_code2 = 16; uint32_t = unsigned int; std::string = std::__cxx11::basic_string<char>; std::vector<unsigned int>::const_iterator = std::vector<unsigned int>::const_iterator; genome_iterator = genome_four_bit_itr; Read = std::vector<unsigned char>; PackedRead = std::vector<long unsigned int>; bam_cigar_t = std::vector<unsigned int>; AbismalAlignSimple = AbismalAlign<simple_aln::mismatch_score, -4>]'
src/abismal.cpp:2066:52:   required from here
src/abismal.cpp:1006:29: error: '_mm_prefetch' was not declared in this scope
make[2]: *** [src/abismal.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
```
@andrewdavidsmith
Copy link
Contributor

@melaniesilvis-epic I think this is because of the M1 hardware. Currently abismal won't build on M1 and I can't fix it because my mac is x86. I'll get a new one probably in the next month or so and should be able to fix this. I was able to see it in action using the github runner for macos with M1. I'll update this issue accordingly.

@andrewdavidsmith andrewdavidsmith changed the title issue with make on MacOS Update abismal to build and run on Apple M1 Apr 7, 2024
@andrewdavidsmith andrewdavidsmith added the bug Something isn't working label Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants