FastANI icon indicating copy to clipboard operation
FastANI copied to clipboard

Compiling fastANI on macOS but using gcc (solved)

Open tseemann opened this issue 5 years ago • 2 comments

==> make install
g++-8 -O3 -DNDEBUG -std=c++11 -Isrc -I /usr/local/opt/boost/include -fopenmp -mmacosx-version-min=10.7 -stdlib=libc++ -DUSE_BOOST src/cgi/core_genome_identity.cpp -o fastANI /usr/local/opt/boost/lib/libboost_math_c99.a -lstdc++ -lz -lm  
g++-8: error: unrecognized command line option '-stdlib=libc++'
make: *** [fastANI] Error 1

It still seems to be passing clang++ specific parameters to g++ ie. mmacosx-version-min=10.7 -stdlib=libc++

Ok I now see in Makefile.in where it occurs:

ifeq ($(UNAME_S),Darwin)
	CXXFLAGS += -mmacosx-version-min=10.7 -stdlib=libc++
else
	CXXFLAGS += -include src/common/memcpyLink.h -Wl,--wrap=memcpy
	CFLAGS += -include src/common/memcpyLink.h
endif

Can you change the if Darwin to if Darwin and not GCC ?

tseemann avatar Aug 11 '18 21:08 tseemann

Ok, i figured out what needs to be doen https://github.com/brewsci/homebrew-bio/pull/363

  1. The if is for Darwin + Clang
  2. The `else is for Linux + GCC

You need a 3rd case:

  1. For Darwin + GCC, you need no options

tseemann avatar Aug 11 '18 22:08 tseemann

Any movement on this?

tseemann avatar Nov 08 '19 03:11 tseemann