Kingsford-Group / sad

BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

unrecognized options: --with-gurobi #1

Open dktanwar opened 4 years ago

dktanwar commented 4 years ago

Hello,

I am trying to install sad on Ubuntu.

Steps:

  1. git clone sad
  2. ./install-dependencies.sh

Message

To configure with CLP, run: configure PKG_CONFIG_PATH=/downloads/sad/external/pkgconfig/:./external/pkgconfig/
To configure with gurobi, run: configure PKG_CONFIG_PATH=/downloads/sad/external/pkgconfig/:./external/pkgconfig/ --with-gurobi=<path to gurobi linux64 folder>
  1. configure PKG_CONFIG_PATH=/downloads/sad/external/pkgconfig/:./external/pkgconfig/ --with-gurobi=/downloads/gurobi901/linux64/

Error:

configure PKG_CONFIG_PATH=/downloads/sad/external/pkgconfig/:./external/pkgconfig/ --with-gurobi=/downloads/gurobi901/linux64
configure: WARNING: unrecognized options: --with-gurobi
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
configure: error: source directory already configured; run "make distclean" there first
  1. make

Error:

make
g++ -std=c++11 -I external/boost_1_69_0/Installation/include -I external/eigen_3.3.7 -I/anaconda3/include -I /opt/local/stow/gurobi800/linux64/include -I/downloads/sad/include/jellyfish-2.2.10 -I/anaconda3/include -I external/spline -g -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /anaconda3/include  -c -o src/main.o src/main.cpp
g++ -std=c++11 -I external/boost_1_69_0/Installation/include -I external/eigen_3.3.7 -I/anaconda3/include -I /opt/local/stow/gurobi800/linux64/include -I/downloads/sad/include/jellyfish-2.2.10 -I/anaconda3/include -I external/spline -g -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /anaconda3/include  -c -o src/DistTest.o src/DistTest.cpp
g++ -std=c++11 -I external/boost_1_69_0/Installation/include -I external/eigen_3.3.7 -I/anaconda3/include -I /opt/local/stow/gurobi800/linux64/include -I/downloads/sad/include/jellyfish-2.2.10 -I/anaconda3/include -I external/spline -g -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /anaconda3/include  -c -o src/Transcript.o src/Transcript.cpp
g++ -std=c++11 -I external/boost_1_69_0/Installation/include -I external/eigen_3.3.7 -I/anaconda3/include -I /opt/local/stow/gurobi800/linux64/include -I/downloads/sad/include/jellyfish-2.2.10 -I/anaconda3/include -I external/spline -g -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /anaconda3/include  -c -o src/LPReassign.o src/LPReassign.cpp
g++ -std=c++11 -I external/boost_1_69_0/Installation/include -I external/eigen_3.3.7 -I/anaconda3/include -I /opt/local/stow/gurobi800/linux64/include -I/downloads/sad/include/jellyfish-2.2.10 -I/home/ubuntu/softwares/anaconda3/include -I external/spline -g -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /anaconda3/include  -c -o src/IO.o src/IO.cpp
ls: cannot access '/opt/local/stow/gurobi800/linux64/lib/libgurobi*': No such file or directory
mkdir -p bin
g++ -o bin/SAD src/main.o src/DistTest.o src/Transcript.o src/LPReassign.o src/IO.o -lz -lm -fopenmp -Lexternal/boost_1_69_0/Installation/lib -lboost_iostreams -L/opt/local/stow/gurobi800/linux64/lib -lgurobi_g++5.2 -l -lpthread -L/anaconda3/lib -lgsl -lgslcblas -lm -lcblas -lm -L/anaconda3/lib -lhts -Wl,-rpath,external/boost_1_69_0/Installation/lib:/opt/local/stow/gurobi800/linux64/lib:/anaconda3/lib:/anaconda3/lib
/usr/bin/ld: cannot find -lgurobi_g++5.2
/usr/bin/ld: cannot find -l-lpthread
collect2: error: ld returned 1 exit status
make: *** [Makefile:31: bin/SAD] Error 1
dktanwar commented 4 years ago

It seems like I solved the above issue somehow, however, I have another problem:

g++ -std=c++11 -I external/boost_1_69_0/Installation/include -I external/eigen_3.3.7 -Ianaconda3/include -I /downloads/gurobi901/linux64/include -Idownloads/sad/./include/jellyfish-2.2.10 -I/anaconda3/include -I external/spline -g -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /anaconda3/include  -c -o src/ReadSalmonBias.o src/ReadSalmonBias.cpp
src/ReadSalmonBias.cpp:20:33: fatal error: jellyfish/mer_dna.hpp: No such file or directory
compilation terminated.
make: *** [<builtin>: src/ReadSalmonBias.o] Error 1
Congm12 commented 4 years ago

The error message suggests that there is something wrong with the path to jellyfish library. The path downloads/sad/./include/jellyfish-2.2.10 doesn't contain the jellyfish header file jellyfish/mer_dna.hpp. Did you input the -I paths by yourself or using make?

It is likely that the include path -Idownloads/sad/./include/jellyfish-2.2.10 should be -I/downloads/sad/./include/jellyfish-2.2.10 instead.

dktanwar commented 4 years ago

I just ran make. The only thing I changed in the Makefile is the path to Gurobi libraries

dktanwar commented 4 years ago

So, I tried again from scratch:

git clone git@github.com:Kingsford-Group/sad.git
cd sad/

./install-dependencies.sh

configure PKG_CONFIG_PATH=/home/ubuntu/softwares/downloads/sad/external/pkgconfig/:

Error:

configure: command not found

So, export?

export PKG_CONFIG_PATH=/home/ubuntu/softwares/downloads/sad/external/pkgconfig/:

change path of gurobi in Makefile

nano Makefile

GUROBI_INCLUDE_DIR = /home/ubuntu/softwares/downloads/gurobi901/linux64/include
GUROBI_LIB_DIR = /home/ubuntu/softwares/downloads/gurobi901/linux64/lib

make

make
g++ -std=c++11 -I external/boost_1_69_0/Installation/include -I external/eigen_3.3.7 -I/home/ubuntu/softwares/anaconda3/include -I /home/ubuntu/softwares/downloads/gurobi901/linux64/include -I/home/ubuntu/softwares/downloads/sad/include/jellyfish-2.2.10 -I/home/ubuntu/softwares/anaconda3/include -I external/spline -g -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/ubuntu/softwares/anaconda3/include  -c -o src/main.o src/main.cpp
g++ -std=c++11 -I external/boost_1_69_0/Installation/include -I external/eigen_3.3.7 -I/home/ubuntu/softwares/anaconda3/include -I /home/ubuntu/softwares/downloads/gurobi901/linux64/include -I/home/ubuntu/softwares/downloads/sad/include/jellyfish-2.2.10 -I/home/ubuntu/softwares/anaconda3/include -I external/spline -g -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/ubuntu/softwares/anaconda3/include  -c -o src/DistTest.o src/DistTest.cpp
g++ -std=c++11 -I external/boost_1_69_0/Installation/include -I external/eigen_3.3.7 -I/home/ubuntu/softwares/anaconda3/include -I /home/ubuntu/softwares/downloads/gurobi901/linux64/include -I/home/ubuntu/softwares/downloads/sad/include/jellyfish-2.2.10 -I/home/ubuntu/softwares/anaconda3/include -I external/spline -g -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/ubuntu/softwares/anaconda3/include  -c -o src/Transcript.o src/Transcript.cpp
g++ -std=c++11 -I external/boost_1_69_0/Installation/include -I external/eigen_3.3.7 -I/home/ubuntu/softwares/anaconda3/include -I /home/ubuntu/softwares/downloads/gurobi901/linux64/include -I/home/ubuntu/softwares/downloads/sad/include/jellyfish-2.2.10 -I/home/ubuntu/softwares/anaconda3/include -I external/spline -g -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/ubuntu/softwares/anaconda3/include  -c -o src/LPReassign.o src/LPReassign.cpp
g++ -std=c++11 -I external/boost_1_69_0/Installation/include -I external/eigen_3.3.7 -I/home/ubuntu/softwares/anaconda3/include -I /home/ubuntu/softwares/downloads/gurobi901/linux64/include -I/home/ubuntu/softwares/downloads/sad/include/jellyfish-2.2.10 -I/home/ubuntu/softwares/anaconda3/include -I external/spline -g -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/ubuntu/softwares/anaconda3/include  -c -o src/IO.o src/IO.cpp
mkdir -p bin
g++ -o bin/SAD src/main.o src/DistTest.o src/Transcript.o src/LPReassign.o src/IO.o -lz -lm -fopenmp -Lexternal/boost_1_69_0/Installation/lib -lboost_iostreams -L/home/ubuntu/softwares/downloads/gurobi901/linux64/lib -lgurobi_g++5.2 -lgurobi90 -lpthread -L/home/ubuntu/softwares/anaconda3/lib -lgsl -lgslcblas -lm -lcblas -lm -L/home/ubuntu/softwares/anaconda3/lib -lhts -Wl,-rpath,external/boost_1_69_0/Installation/lib:/home/ubuntu/softwares/downloads/gurobi901/linux64/lib:/home/ubuntu/softwares/anaconda3/lib:/home/ubuntu/softwares/anaconda3/lib
g++ -std=c++11 -I external/boost_1_69_0/Installation/include -I external/eigen_3.3.7 -I/home/ubuntu/softwares/anaconda3/include -I /home/ubuntu/softwares/downloads/gurobi901/linux64/include -I/home/ubuntu/softwares/downloads/sad/include/jellyfish-2.2.10 -I/home/ubuntu/softwares/anaconda3/include -I external/spline -g -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/ubuntu/softwares/anaconda3/include  -c -o src/ReadSalmonBias.o src/ReadSalmonBias.cpp
src/ReadSalmonBias.cpp:20:33: fatal error: jellyfish/mer_dna.hpp: No such file or directory
compilation terminated.
make: *** [<builtin>: src/ReadSalmonBias.o] Error 1
dktanwar commented 4 years ago

Let me know if you would like to have a log of ./install-dependencies.sh

Congm12 commented 4 years ago

Please ignore the default Makefile in the git repo. You should generate the configure file and a new Makefile by

cd sad/
autoreconf -i
# after autoreconf, a configure file should be generated.
./configure <options>
# the options are indicated in the output of install-dependencies.sh. You can also indicate a local installation path by appending --prefix=<local installation path> to ./configure
make
make install

Try this procedure and let us know whether the compilation succeeds. I apologize that the new compiling instructions are not updated in the README file, and we will update it later.

dktanwar commented 4 years ago

Work till this:

./configure PKG_CONFIG_PATH=/home/ubuntu/softwares/downloads/sad/external/pkgconfig/:./external/pkgconfig/ --with-gurobi=/home/ubuntu/softwares/downloads/gurobi901/linux64

Does not work:

$  make
make  all-am
make[1]: Entering directory '/home/ubuntu/softwares/downloads/sad'
  CXX      src/main.o
In file included from src/main.cpp:8:0:
src/IO.hpp:19:10: fatal error: Eigen/Dense: No such file or directory
 #include "Eigen/Dense"
          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:653: src/main.o] Error 1
make[1]: Leaving directory '/home/ubuntu/softwares/downloads/sad'
make: *** [Makefile:456: all] Error 2
dktanwar commented 4 years ago

config.log

Congm12 commented 4 years ago

Your pkg-config says the eigen3 library is located in /home/ubuntu/softwares/downloads/sad/include/eigen3, which is not where eigen3 library is installed in install-dependencies.sh. Could you share the log of ./install-dependencies.sh?

dktanwar commented 4 years ago

Here are the log files:

autoreconf -i ./install-dependencies.sh make

Congm12 commented 4 years ago

Can you show the result of

cat external/eigen_3.3.7/Installation/share/pkgconfig/eigen3.pc

and

cat external/pkgconfig/eigen3.pc
dktanwar commented 4 years ago

Yes:

cat external/eigen_3.3.7/Installation/share/pkgconfig/eigen3.pc
prefix=/home/ubuntu/softwares/downloads/sad/external/eigen_3.3.7/Installation
exec_prefix=${prefix}

Name: Eigen3
Description: A C++ template library for linear algebra: vectors, matrices, and related algorithms
Requires:
Version: 3.3.7
Libs:
Cflags: -I${prefix}/include/eigen3

cat external/pkgconfig/eigen3.pc
prefix=/home/ubuntu/softwares/downloads/sad/external/eigen_3.3.7/Installation
exec_prefix=${prefix}

Name: Eigen3
Description: A C++ template library for linear algebra: vectors, matrices, and related algorithms
Requires:
Version: 3.3.7
Libs:
Cflags: -I${prefix}/include/eigen3
dktanwar commented 4 years ago

Hi @Congm12

Any update on this?

dktanwar commented 4 years ago

Hi @Congm12

Any update?

Congm12 commented 4 years ago

Hi,

We just release a cleaned version of installation tarball and a compiled binary of SAD that should be directly executable on linux machine. Please try whether you can directly run the binary. Otherwise, try install from scratch using the tarball.

dktanwar commented 4 years ago

Hi @Congm12 I am able to build the tool from tar file.

dktanwar commented 4 years ago

Forgot to mention:

You would have to update https://github.com/Kingsford-Group/sad/blob/master/install-dependencies.sh#L34

Instead of 3.3.7.tar.gz, eigen-3.3.7.tar.gz