phylonium icon indicating copy to clipboard operation
phylonium copied to clipboard

Installation with local libdivsufsort

Open RenzoTale88 opened this issue 2 years ago • 3 comments

Hello, I'm trying to compile the code using a local installation of libdivsufsort without success. I've proceeded compiling the library as follow:

git clone https://github.com/y-256/libdivsufsort.git
cd libdivsufsort 
mkdir build
mkdir dist
cd build
cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="../dist" ..
make && make install
cd ../dist
export LD_INCLUDE_PATH=${PWD}/include:$LD_INCLUDE_PATH
export LD_LIBRARY_PATH=${PWD}/lib:$LD_LIBRARY_PATH

I then compile phylonium using the commands:

git clone https://github.com/EvolBioInf/phylonium && cd phylonium 
autoreconf -fi -Im4
./configure
make

But this fails at the configure with the following errors:

$ autoreconf -fi -Im4
libs/Makefile.am:7: warning: compiling 'pfasta.c' with per-target flags requires 'AM_PROG_CC_C_O' in 'configure.ac'

$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for ar... ar
checking the archiver (ar) interface... ar
checking for g++ option to support OpenMP... -fopenmp
checking whether g++ supports C++14 features with -std=gnu++14... yes
checking for gcc option to support OpenMP... -fopenmp
checking for __attribute__((ifunc))... yes
checking for cos in -lm... yes
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 divsufsort.h usability... no
checking divsufsort.h presence... no
checking for divsufsort.h... no
checking for divsufsort in -ldivsufsort... no
configure: error: Missing libdivsufsort.

Am I missing something? Thank you in advance Andrea

RenzoTale88 avatar Sep 15 '21 12:09 RenzoTale88

Hi Andrea,

Building with a local library is always a bit tricky. You can try the following. Instead of LD_LINCLUDE_PATH which is not a thing use C_INCLUDE_PATH. Then try to ./configure phylonium again.

If that didn't help we need to add the paths directly to the compilation parameters: CPPFLAGS="-I/$PATHTOLIBDIVSUFSORT/include" LDFLAGS="-L/$PATHTOLIBDIVSUFSORT/lib" ./configure.

Hope this helps, Fabian

kloetzl avatar Sep 16 '21 20:09 kloetzl

Hello

I was wondering whether the issue was resolved? I am trying to use the program and i get the same error, but none of the solutions above have worked for me

GM110Z avatar Mar 22 '22 00:03 GM110Z

Please note that you have to replace $PATHTOLIBDIVSUFSORT with wherever you did build libdivsufsort. That should do the trick.

kloetzl avatar Mar 23 '22 14:03 kloetzl