iqtree / decenttree

Fast Neighbor-Joining and other distance-based methods for phylogenetics
GNU General Public License v2.0
10 stars 5 forks source link

How to compile and run on Linux #5

Closed linda5mith closed 1 year ago

linda5mith commented 1 year ago

Some documentation on this would be super lovely for C++ noobs like myself.

git clone https://github.com/iqtree/decenttree.git

cd decenttree
mkdir build
cd build
cmake ..
CMAKE_VERSION       : 3.22.1
DECENTTREE_FLAGS    : 
Build mode          : Release
Target OS           : Unix
Using C++11
CMAKE_CXX_COMPILER_ID was GNU
CMAKE_CXX_COMPILER was /usr/bin/c++
Compiler            : GNU Compiler (gcc)
Compiler path       : /usr/bin/c++
Compiler version    : 11.3.0
Target binary       : 64-bit
OpenMP              : Yes
OpenMP Flags        : -fopenmp
OpenMP C++ Flags    : -fopenmp
OpenMP Linker Flags : 
Vectorization : SSE3/AVX/AVX2
Using own zlib-1.2.7
CMake build type    : Release
CMake source dir    : /home/linda/decenttree
C flags             :  -fopenmp -fopenmp  -O3 -DNDEBUG -O2 -g -ffunction-sections -fdata-sections
CXX flags           :  -std=c++11 -fopenmp -fopenmp  -O3 -DNDEBUG -O2 -g -ffunction-sections -fdata-sections
LINKER flags        :  -rdynamic   -Wl,--gc-sections,--no-whole-archive
Compiler defns      : _USE_PTHREADS;USE_PROGRESS_DISPLAY=1;USE_VECTORCLASS_LIBRARY=1;USE_GZSTREAM=1;DECENT_TREE=1
Binary directory    : /home/linda/decenttree/build
Python Available: FALSE
Python3 Not Found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/linda/decenttree/build

I'm guessing I need python3 to be available?

I tried to build by specifying path to python installation:

cmake -DPython3_EXECUTABLE=/home/linda/programs/anaconda3/bin/python ..

but can't find the command in the CMakeLists.txt to specifically find_package(PYTHON)

If I try to run decenttree inside build folder I get decenttree: command not found

Do I need to troubleshoot the python3 build or can I bypass that? Any guidance greatly appreciated!


EDIT: Steps for installation on Linux

git clone https://github.com/iqtree/decenttree.git

cd decenttree
mkdir build
cd build
cmake ..
make
./decenttree 

..and it works! :)

p.s. thanks for adding additional info in Algorithms.md - really appreciate it!