ParBLiSS / FastANI

Fast Whole-Genome Similarity (ANI) Estimation
Apache License 2.0
374 stars 67 forks source link

Cannot compile FastANI #66

Closed MrTomRod closed 4 years ago

MrTomRod commented 4 years ago

Hi!

I experienced the bug #49. You recommend in bug #52 to recompile FastANI. So I wanted to try this:

git clone https://github.com/ParBLiSS/FastANI.git
cd FastANI
mkdir bnry
sudo ./bootstrap.sh
sudo ./configure --prefix=/home/username/FastANI/bnry --with-boost=/usr/include/boost

But no binary was produced in /home/username/FastANI/bnry! This is the output:

$ git clone https://github.com/ParBLiSS/FastANI.git
...
$ cd FastANI
$ mkdir bnry
$ sudo ./bootstrap.sh
[sudo] password for username:
$ sudo ./configure --prefix=/home/username/FastANI/bnry --with-boost=/usr/include/boost
checking for g++... g++
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 we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for g++ option to support OpenMP... -fopenmp
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking boost/math/distributions/binomial.hpp usability... yes
checking boost/math/distributions/binomial.hpp presence... yes
checking for boost/math/distributions/binomial.hpp... yes
configure: creating ./config.status
config.status: creating Makefile
$ ls bnry/
$

I'm on Fedora 32 (boost-devel 1.69.0, gcc 10.1.1 20200507)

This is more related to #49, but: May I recommend that FastANI follows proper design-by-contract:

Best, MrTomRod

cjain7 commented 4 years ago

I'll follow up on the other issue later, but for compiling, you need to run the last step make too.

MrTomRod commented 4 years ago

crap, i was in a hurry when writing the report. i ran make and got this error:

$sudo make
g++ -O3 -DNDEBUG -std=c++11 -Isrc -I /usr/include/boost/include -fopenmp -include src/common/memcpyLink.h -Wl,--wrap=memcpy -DUSE_BOOST src/cgi/core_genome_identity.cpp -o fastANI /usr/include/boost/lib/libboost_math_c99.a -lstdc++ -lz -lm  
g++: error: /usr/include/boost/lib/libboost_math_c99.a: No such file or directory
make: *** [Makefile:18: fastANI] Error 1

sorry for the confusion!

cjain7 commented 4 years ago

I think the error conveys the issue. /usr/include/boost/lib/libboost_math_c99.a is probably not the correct location for libboost_math_c99.a. You probably need to tweak the path you are specifying for boost during configure step.

On my system for example, boost is installed in /opt/sw/software/libs/boost/1.59, inside which folder include contains all header files and folder lib contains the library files.

MrTomRod commented 4 years ago

Thanks for the hint. I had dnf install boost-math changed the following line in configure:

    mathlib=/usr/lib64/libboost_math_c99.a

Btw, the last command (make install / sudo make install) is missing from INSTALL.txt. Now, it compiles. However, it didn't fix bug #49 .