Installation with local libdivsufsort
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
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
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
Please note that you have to replace $PATHTOLIBDIVSUFSORT with wherever you did build libdivsufsort. That should do the trick.
i tried installing phylonium, i install libdivsufsort dependency. i installed it from package, everything went smoothly.
while i tried installing phylonius after this faced this error
$ sudo ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a race-free 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 the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... none needed checking whether gcc understands -c and -o together... yes checking whether make supports the include directive... yes (GNU style) checking dependency style of gcc... gcc3 checking for g++... g++ checking whether the compiler supports GNU C++... yes checking whether g++ accepts -g... yes checking for g++ option to enable C++11 features... none needed 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++17 features with -std=gnu++17... yes checking for gcc option to support OpenMP... -fopenmp checking for attribute((ifunc))... yes checking for cos in -lm... yes checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for divsufsort64.h... no checking for divsufsort64 in -ldivsufsort64... no configure: error: Missing libdivsufsort64.
i am also facing similiar issues.
tried several methods like
adding this in .bashrc
if [ -d "/home/mrstrange/libdivsufsort-master" ]; then export PATH="/home/mrstrange/libdivsufsort-master/bin:$PATH" export LD_LIBRARY_PATH="/home/mrstrange/libdivsufsort-master/lib:$LD_LIBRARY_PATH" export C_INCLUDE_PATH="/home/mrstrange/libdivsufsort-master/include:$C_INCLUDE_PATH" export CPLUS_INCLUDE_PATH="/home/mrstrange/libdivsufsort-master/include:$CPLUS_INCLUDE_PATH" fi
also
sudo ./configure --with-libdivsufsort=/lib/x86_64-linux-gnu/
faced the same error
Please let me know how to rectify this error
CPPFLAGS="-I/$PATHTOLIBDIVSUFSORT/include" LDFLAGS="-L/$PATHTOLIBDIVSUFSORT/lib" ./configure
I tried this it didn't work.
libdivsufsort was installed properly though.
any other suggestions
Hi, could you try CPPFLAGS="-I/home/mrstrange/libdivsufsort-master/include" LDFLAGS="-L/home/mrstrange/libdivsufsort-master/lib" ./configure?
Phylonium is available through a number of package managers (apt, pacman, brew, conda) have you tried those first?