ParBLiSS / FastANI

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

Error in CMakeLists.txt #130

Open lokyimandy opened 8 months ago

lokyimandy commented 8 months ago

Hello, I downloaded the FastANI v1.34 from source code, I got this error when running the command line cmake .. -DCMAKE_BUILD_TYPE=Release -DGSL_ROOT_DIR=/path/gsl

CMake Error at CMakeLists.txt:59 (add_subdirectory):
The source directory

 /home/lokyitang/Desktop/FastANI/FastANI-1.34/ext/Catch2

does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:61 (include):
include could not find requested file:

 Catch

CMake Error at CMakeLists.txt:72 (catch_discover_tests):
  Unknown CMake command "catch_discover_tests"

I can't find the missing files in the respective directories. How can I solve the problem? Thank you.

yexianingyue commented 8 months ago

hi, You can do it another way, like this.

cd /home/lokyitang/Desktop/FastANI/FastANI-1.34
autoconf
./configure --prefix=/path/to/install
make
make install
lokyimandy commented 8 months ago

I ran autoconf && ./configure --with-gsl=/home/lokyitang/gsl without problem, but after running make, it gives the following error:

g++ -O3 -DNDEBUG -std=c++11 -Isrc -I /home/lokyitang/gsl/include -fopenmp -include src/common/memcpyLink.h -Wl,--wrap=memcpy  src/cgi/core_genome_identity.cpp src/cgi/main.cpp -o fastANI -L/home/lokyitang/gsl/lib -lgsl -lgslcblas -lstdc++ -lz -lm  
/usr/bin/ld: /tmp/cc2JllJw.o: in function `ks_getuntil2(__kstream_t*, int, __kstring_t*, int*, int) [clone .constprop.0]':
core_genome_identity.cpp:(.text+0xe8): undefined reference to `memcpy@GLIBC_2.2.5'
/usr/bin/ld: /tmp/cc2JllJw.o: in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) [clone .isra.0]':
core_genome_identity.cpp:(.text+0x64c): undefined reference to `memcpy@GLIBC_2.2.5'
/usr/bin/ld: /tmp/cc2JllJw.o: in function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .isra.0]':
core_genome_identity.cpp:(.text+0x79c): undefined reference to `memcpy@GLIBC_2.2.5'
/usr/bin/ld: /tmp/cc2JllJw.o: in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) [clone .isra.0]':
core_genome_identity.cpp:(.text+0xdc0): undefined reference to `memcpy@GLIBC_2.2.5'
/usr/bin/ld: /tmp/cc2JllJw.o: in function `kseq_read(kseq_t*)':
core_genome_identity.cpp:(.text+0x10a4): undefined reference to `memcpy@GLIBC_2.2.5'
/usr/bin/ld: /tmp/cc2JllJw.o:core_genome_identity.cpp:(.text+0x1bfc): more undefined references to `memcpy@GLIBC_2.2.5' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:18: fastANI] Error 1
yexianingyue commented 7 months ago

Have you tried running ./configure without any parameters?

lokyimandy commented 7 months ago

I only ran ./configure, it gave the error configure: error: GNU Scientific Library headers not found.

yexianingyue commented 7 months ago

I downloaded gsl-2.7.1.tar.gz, here, and after extracting it, I was able to run it successfully. You might want to check if it's an issue with the version.

./configure --with-gsl /path/to/gsl-2.7.1/
make

Here's the version information for my make:

GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
lokyimandy commented 7 months ago

I also use the gsl-2.7.1 and the GNU make version is 4.3.

yexianingyue commented 7 months ago

It's quite strange. I have two servers using the same storage, but while the compilation is successful on Server A, on Server B the command ./configure --with-gsl=/path/to/gsl/ surprisingly prompts:

checking for gsl/gsl_cdf.h... no
configure: error: GNU Scientific Library headers not found.

If it really doesn't work, you can install it using mamba install fastANI -c bioconda or conda install fastANI -c bioconda, although it feels a bit unworthy to use conda for this.