ERROR when installing RATTLE
angus821 opened this issue · 13 comments
I encounter this code when I try to build RATTLE
~/RATTLE$ ./build.sh
mkdir: build: File exists
./build.sh: line 5: cmake: command not found
make: *** No targets specified and no makefile found. Stop.
g++ -o rattle -Wall -Wextra -std=c++14 -O3 -pthread -Ispoa/include main.cpp fasta.o -lz cluster.o utils.o kmer.o similarity.o correct.o spoa/build/lib/libspoa.a
clang: error: no such file or directory: 'spoa/build/lib/libspoa.a'
make: *** [rattle] Error 1
Hi,
Download RATTLE with the following command
git clone --recurse-submodules https://github.com/comprna/RATTLE
and ensure you can find spoa
folder and this folder is not empty.
Eileen
Hi
I did the git clone bit.
13 warnings generated.
g++ -o rattle -Wall -Wextra -std=c++14 -O3 -pthread -Ispoa/include main.cpp fasta.o -lz cluster.o utils.o kmer.o similarity.o correct.o spoa/build/lib/libspoa.a
clang: error: no such file or directory: 'spoa/build/lib/libspoa.a'
make: *** [rattle] Error 1
I am not sure how to ensure you can find spoa folder and this folder is not empty.
Thank you so much.
Angus
It starts with this... then a bunch of warning
d-i89-143-21:~/RATTLE$ ./build.sh
./build.sh: line 5: cmake: command not found
make: *** No targets specified and no makefile found. Stop.
g++ -c -Wall -Wextra -std=c++14 -O3 -pthread fasta.cpp
Ignore the warnings. Can you see a folder name spoa
? Is it empty? If it is empty, try to download RATTLE again. Sometimes git will meet this issue that it cannot download all the files in the repository.
ls -lh spoa
If this command doesn't list anything, please download RATTLE again.
Eileen
~/RATTLE$ ls -lh spoa
total 40
-rw-r--r-- 1 angusli staff 2.6K 25 Nov 15:49 CMakeLists.txt
-rw-r--r-- 1 angusli staff 1.1K 25 Nov 15:49 LICENSE
-rw-r--r-- 1 angusli staff 5.7K 25 Nov 15:49 README.md
drwxr-xr-x 2 angusli staff 64B 25 Nov 15:50 build
drwxr-xr-x 3 angusli staff 96B 25 Nov 15:49 include
-rw-r--r-- 1 angusli staff 264B 25 Nov 15:49 spoa.pc.in
drwxr-xr-x 11 angusli staff 352B 25 Nov 15:49 src
drwxr-xr-x 5 angusli staff 160B 25 Nov 15:49 test
drwxr-xr-x 4 angusli staff 128B 25 Nov 15:49 vendor
It seems you are using clang as the compiler. We recommend using cmake and gcc/g++(version before10.0). Install cmake
and gcc
to install RATTLE correctly.
Eileen
Hi @eileen-xue,
I'm a Linux newbie, so please forgive me as I'm sure I'll write something wrong. I'm trying to install RATTLE in my user area in an LSF environment without root privileges. The area has cmake 2.8.12.2 and gcc 7.3.0. So I created a conda environment with cmake 3.26.4, but I can't downgrade gcc/g++ from 11.2.0 to <10. I followed the installation instructions, but I got a lot of errors. Attached is what I got after these commands:
conda list (to check the cmake and gcc version of the environment)
git clone --recurse-submodules https://github.com/comprna/RATTLE
cd RATTLE
./build.sh
./build.sh (second try)
I hope you can help me understand how to proceed.
Thanks in advance
Elio
Hi Eilo,
You should be able to install RATTLE on your LSF environment.
If you are keen to install RATTLE on conda. Instead of downgrade gcc, you can search about how to install the second gcc compiler and use the new one to compile program. RATTLE cannot be installed using gcc11.2.0.
I hope this helps.
Cheers,
Eileen
Hi Eileen,
thanks for your reply. I found modules in LSF with cmake 3.19.4 and gcc 7.30 or 9.30. So I restart the RATTLE installation outside of conda. However, during the first run of build.sh I still got a lot of warnings after
g++ -c -Wall -Wextra -std=c++14 -O3 -pthread fasta.cpp
These warnings disappear when the script is repeated a second time, leaving these messages:
mkdir: cannot create directory ‘build’: File exists
-- Configuring done
-- Generating done
-- Build files have been written to: /gporq3/store_2/project/triomics/software/RATTLE/spoa/build
[ 20%] Building CXX object CMakeFiles/spoa.dir/src/alignment_engine.cpp.o
pgc++-Error-Unknown switch: -Wextra
pgc++-Error-Unknown switch: -march=native
make[2]: *** [CMakeFiles/spoa.dir/src/alignment_engine.cpp.o] Error 1
make[1]: *** [CMakeFiles/spoa.dir/all] Error 2
make: *** [all] Error 2
g++ -o rattle -Wall -Wextra -std=c++14 -O3 -pthread -Ispoa/include main.cpp fasta.o -lz cluster.o utils.o kmer.o similarity.o correct.o spoa/build/lib/libspoa.a
g++: error: spoa/build/lib/libspoa.a: No such file or directory
make: *** [rattle] Error 1
I followed a suggestion from this post #22 to include stdexcept in line 14 of graph.hpp, but nothing changes.
I have tried both gcc 7.30 and 9.30.
What am I doing wrong?
Thanks again.
Cheers,
Elio
Ignore the warnings, as long as there is no error.
Try to clean the previously built binary files and rebuild it
cd RATTLE
make clean
cd spoa/build
make clean
cd ../..
./build.sh
Or to remove the whole RATTLE folder, redownload and rebuild it.
rm -rf RATTLE
git clone --recurse-submodules https://github.com/comprna/RATTLE
cd RATTLE
./build.sh
Thanks for the suggestion, but I have already tried both methods without success. In the end, I got the same messages as in my previous post.
The problem is still coming from the compiler. You are using the pgc++
compiler which is different from g++
.
Considering disabling pgc++
or forcing to use g++
when compiling RATTLE should solve the problem.
Thank you Eileen, problem solved. I unloaded the module pgi/pgi_20.4 from the area in the LSF environment.
Cheers,
Elio