anuradhawick / LRBinner

LRBinner is a long-read binning tool published in WABI 2021 proceedings and AMB.
https://doi.org/10.4230/LIPIcs.WABI.2021.11
GNU General Public License v2.0
29 stars 5 forks source link

build failure #7

Closed wn835166087 closed 2 years ago

wn835166087 commented 2 years ago

Hi,

I tried to install the LRBinner with the code provided:
source $HOME/miniconda3/bin/activate
conda create -n lrbinner -y python=3.7 numpy scipy seaborn h5py tabulate pytorch hdbscan gcc openmp tqdm biopython
conda activate lrbinner 
git clone https://github.com/anuradhawick/LRBinner.git
cd LRBinner
sh build.sh 

however, I got error when build it (see attached). Terminal Saved Output.txt The system info is here: Dell PowerEdge M600 8 cores; 16GB RAM; 1TB HDD; VM supported Any hints on overcome that?

wn835166087 commented 2 years ago

I tried to install again, with specify the package version when build conda env.

conda create -n lrbinner -y python=3.7 numpy=1.16.4 scipy=1.3.0 seaborn=0.9.0 h5py=2.9.0 tabulate=0.8.7 pytorch=1.4.0 hdbscan gcc=9.1.0 openmp=4.5 tqdm biopython

however, got the same error when building. The first error is

/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

I'm not familiar with c++ at all and have no clue how to fix that. Any hint?

wn835166087 commented 2 years ago

in case anyone meet the same problem, add -std=c++11 to build.sh lines started with g++ see below

g++ mbcclr_utils/search-15mers.cpp -fopenmp -lpthread -Wall -o mbcclr_utils/bin/search-15mers -lz -O3 -std=c++11
g++ mbcclr_utils/count-15mers.cpp -fopenmp -lpthread -Wall -o mbcclr_utils/bin/count-15mers -lz -O3 -std=c++11
echo "BUILDING THE MetaBCC-LR 3 MER COMPUTATIONS"
g++ mbcclr_utils/count-kmers.cpp -Wall -fopenmp -lpthread -o mbcclr_utils/bin/count-kmers -lz -O3 -std=c++11
dimovskik commented 2 years ago

Hi @wn835166087 and @anuradhawick I'm also getting an error after running the sh build.sh command that I think is related to this. The error I have is:

Linux Build
BUILDING THE MetaBCC-LR 15 MER COMPUTATIONS
build.sh: line 38: g++: command not found
build.sh: line 39: g++: command not found
BUILDING THE MetaBCC-LR 3 MER COMPUTATIONS
build.sh: line 41: g++: command not found
BUILD FINISHED

I checked the build.sh file and it already has -std=c++11 added to build.sh lines starting with g++ as suggested above. When I check my gcc version I have gcc=11.2.0 I'm very new to command line and not experienced with c++ or gcc so any suggestions on how to overcome this are much appreciated.

Thanks! K

anuradhawick commented 2 years ago

Hi K,

this means your system does not have g++. You can try to install it using sudo apt install g++

give this a try and let me know.

dimovskik commented 2 years ago

Hi @anuradhawick

I don't have permission to use sudo but installed using conda install gxx I now have a zlib error:

Linux Build
BUILDING THE MetaBCC-LR 15 MER COMPUTATIONS
In file included from mbcclr_utils/search-15mers.cpp:11:
mbcclr_utils/io_utils.h:5:10: fatal error: zlib.h: No such file or directory
  5 | #include <zlib.h>
   |     ^~~~~~~~
compilation terminated.

It looks like it needs zlib library but can't find it. I'm working in a conda env and have installed zlib Have you seen this before? Any suggestions?

Thanks, K

anuradhawick commented 2 years ago

Zlib is quite essential. Following website from conda might be helpful.

https://anaconda.org/anaconda/zlib

if you’re using a super computer most of these are available as Linux modules. Anyway, if this does not resolve your issue, kindly let me know what environment are you using and few more information.

Cheers.

dimovskik commented 2 years ago

Hi @anuradhawick

Thanks for your help with this! I'm new to command line so it may be that I'm missing something simple.

I am working on a linux server and have installed zlib using conda install -c anaconda zlib in my lrbinner conda env

The absolute path for zlib.h in my conda env is /home/dimovski/miniconda3/envs/lrbinner/include/zlib.h I'm running sh build.sh in /home/dimovski/LRBinner with lrbinner env active

As far as I can tell, zlib is available and I've installed all dependencies in my conda env but still getting the above error. Any ideas? Have I done something wrong?

Thanks, K

dimovskik commented 2 years ago

I've had a look at some of my other conda envs and there does not seem to be any differences in how zlib is installed. I've also spoke with with a few of our bioinformaticians andthere does not seem to an obvious problem. Are you able to share a copy of LRBinner env in .yml file?

anuradhawick commented 2 years ago

Hi, this is my conda env (this may have unwanted stuff as I use this for other work) py37.zip not sure if this could help, but let me know.