refresh-bio / FAMSA

Algorithm for ultra-scale multiple sequence alignments (3M protein sequences in 5 minutes and 24 GB of RAM)
GNU General Public License v3.0
150 stars 25 forks source link

Compile error when STATIC_LINK=true #37

Closed davised closed 4 months ago

davised commented 1 year ago

Hi there,

I'm compiling using gcc 7 on centOS 7 using the STATIC_LINK=true flag.

$ make STATIC_LINK=true
*** Detecting g++ version 7 ***
*** x86-64 with AVX2 extensions***
make -C libs/libdeflate
make[1]: Entering directory '/nfs4/core/home/davised/opt/code/FAMSA/libs/libdeflate'
Rebuilding due to new settings
  CC       lib/deflate_decompress.o
  CC       lib/utils.o
  CC       lib/arm/cpu_features.o
  CC       lib/x86/cpu_features.o
  CC       lib/deflate_compress.o
  CC       lib/adler32.o
  CC       lib/zlib_decompress.o
  CC       lib/zlib_compress.o
  CC       lib/crc32.o
  CC       lib/gzip_decompress.o
  CC       lib/gzip_compress.o
  AR       libdeflate.a
  CC       lib/deflate_decompress.shlib.o
  CC       lib/utils.shlib.o
  CC       lib/arm/cpu_features.shlib.o
  CC       lib/x86/cpu_features.shlib.o
  CC       lib/deflate_compress.shlib.o
  CC       lib/adler32.shlib.o
  CC       lib/zlib_decompress.shlib.o
  CC       lib/zlib_compress.shlib.o
  CC       lib/crc32.shlib.o
  CC       lib/gzip_decompress.shlib.o
  CC       lib/gzip_compress.shlib.o
  CCLD     libdeflate.so.0
  GEN      programs/config.h
  CC       programs/gzip.o
  CC       programs/prog_util.o
  CC       programs/tgetopt.o
  CCLD     gzip
  LN       gunzip
make[1]: Leaving directory '/nfs4/core/home/davised/opt/code/FAMSA/libs/libdeflate'
g++ -Wall -Wno-char-subscripts -Wno-attributes -O3 --msse4 -DNO_PROFILE_PAR -DOLD_ATOMIC_FLAG -DSIMD=2 -DGIT_COMMIT=7eb7612  -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++14 -I libs -c src/famsa.cpp -o src/famsa.o
g++: error: unrecognized command line option ‘--msse4’; did you mean ‘-msse4’?
make: *** [makefile:227: src/famsa.o] Error 1

I fixed the error in the makefile, PR incoming.

davised commented 1 year ago

Incidentally, the gcc 4.8.5 was incorrectly determined to be g++ 12+ or something. Not sure how that happened, but it wasn't an issue when I used gcc 7 from devltoolset-7.

Two other things:

  1. There is extra whitespace in the makefile. Doesn't break anything but it bugs me. Maybe it doesn't bug you, and I didn't remove it in the PR though!
  2. If you download the source .tar.gz from a release, I get an error during compilation that there is no git repo in the directory. Compilation still continues. I assume this is because of the -DGIT_COMMIT part of the compilation.