Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation problem with google-sparsehash #164

Open
AndreaQ7 opened this issue Jul 29, 2020 · 5 comments
Open

installation problem with google-sparsehash #164

AndreaQ7 opened this issue Jul 29, 2020 · 5 comments

Comments

@AndreaQ7
Copy link

Hello everyone I am getting some truble with SGA installation cause of google-sparsehash.
I have downloaded it from this link (https://anaconda.org/bioconda/google-sparsehash/files), then at SGA folder i write

./configure --with-sparsehash=../../google-sparsehash/ --with-bamtools=/opt/bamtools

and it goes well, but then, when I perform the make install , I get the following message and I really do not understand why

g++ -DHAVE_CONFIG_H -I. -I..  -I../Util -I../Thirdparty -I../SQG -fopenmp -I../../google-sparsehash//include -I/opt/bamtools/include -I/opt/bamtools/include/bamtools -Wall -Wextra  -Wno-unknown-pragmas -std=c++98 -O3 -MT libbigraph_a-Bigraph.o -MD -MP -MF .deps/libbigraph_a-Bigraph.Tpo -c -o libbigraph_a-Bigraph.o `test -f 'Bigraph.cpp' || echo './'`Bigraph.cpp
In file included from Bigraph.h:19:0,
                 from Bigraph.cpp:13:
../Util/HashMap.h:53:34: fatal error: google/sparse_hash_map: File o directory non esistente
 #include <google/sparse_hash_map>
 

but sparse_hash_map is present in the folder google-sparsehash/include/sparse_hash_map

Can someone explain me why? thanks a lot

@Rohit-Satyam
Copy link

Even I am trying to solve this issue. In it's read me they say

If bamtools and the sparsehash have been installed in standard locations (like /usr/local) you
can run configure without any parameters then run make:

./configure
make

If bamtools or the sparsehash are installed elsewhere, you can specify their locations as follows:

./configure --with-sparsehash=/home/jsimpson/ --with-bamtools=/home/jsimpson/software/bamtools

These directories should be the root of the install (in other words, the directories have
include/ and lib/ as subdirectories contained the header files and libraries, respectively).

According to that the sparsehash must be installed in /usr/local directory so that t can have access to /include /bin directories too. However, when you use

./configure --help while compiling the sparsehash, it states

By default, make install will install all the files in
/usr/local/bin, /usr/local/lib etc. You can specify
an installation prefix other than /usr/local using --prefix',
for instance --prefix=$HOME.

If the sparsehash doesn't allow installation in /usr/local isn't making that mandate for installation baseless.

In case if you figure it out please help me too.

@Rohit-Satyam
Copy link

I got some success but now configure says it can't compile

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
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 /home/baadalvm/miniconda3/bin/x86_64-conda-linux-gnu-c++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of /home/baadalvm/miniconda3/bin/x86_64-conda-linux-gnu-c++... gcc3
checking for x86_64-conda-linux-gnu-gcc... /home/baadalvm/miniconda3/bin/x86_64-conda-linux-gnu-cc
checking whether we are using the GNU C compiler... yes
checking whether /home/baadalvm/miniconda3/bin/x86_64-conda-linux-gnu-cc accepts -g... yes
checking for /home/baadalvm/miniconda3/bin/x86_64-conda-linux-gnu-cc option to accept ISO C89... none needed
checking whether /home/baadalvm/miniconda3/bin/x86_64-conda-linux-gnu-cc understands -c and -o together... yes
checking dependency style of /home/baadalvm/miniconda3/bin/x86_64-conda-linux-gnu-cc... gcc3
checking for x86_64-conda-linux-gnu-ranlib... /home/baadalvm/miniconda3/bin/x86_64-conda-linux-gnu-ranlib
checking how to run the C++ preprocessor... /home/baadalvm/miniconda3/bin/x86_64-conda-linux-gnu-c++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /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 zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for library containing gzopen... -lz
checking for library containing clock_gettime... -lrt
checking for OpenMP flag of C++ compiler... -fopenmp
checking for host type... you are not using osx so multi-threading should work.
checking google/sparse_hash_set usability... no
checking google/sparse_hash_set presence... yes
configure: WARNING: google/sparse_hash_set: present but cannot be compiled
configure: WARNING: google/sparse_hash_set: check for missing prerequisite headers?
configure: WARNING: google/sparse_hash_set: see the Autoconf documentation
configure: WARNING: google/sparse_hash_set: section "Present But Cannot Be Compiled"
configure: WARNING: google/sparse_hash_set: proceeding with the compiler's result
configure: WARNING: ## -------------------------------- ##
configure: WARNING: ## Report this to [email protected] ##
configure: WARNING: ## -------------------------------- ##
checking for google/sparse_hash_set... no
configure: error: google sparse hash library is required: http://code.google.com/p/google-sparsehash/

@Rohit-Satyam
Copy link

Rohit-Satyam commented Sep 12, 2020

Okay so finally after compiling it for hours I'll leave it now and use someone's generous efforts put in making the conda package. I thought I would crack it but seems sparsehash requires c++ version 3 and I have 7.5.0 as stated here which is whole another exercise.

conda install mamba -c conda-forge

mamba install -c bioconda sga

@jts
Copy link
Owner

jts commented Nov 17, 2020

Hi,

Sorry for this. Here is how you can compile SGA using conda to install the dependencies (you'll have to change the conda paths):

conda create --name sga
conda activate sga
conda install -c bioconda google-sparsehash
conda install -c bioconda bamtools
./configure --with-sparsehash=/home/jsimpson/miniconda3/envs/sga/ --with-bamtools=/home/jsimpson/miniconda3/envs/sga/

@Damianyangyang
Copy link

Okay so finally after compiling it for hours I'll leave it now and use someone's generous efforts put in making the conda package. I thought I would crack it but seems sparsehash requires c++ version 3 and I have 7.5.0 as stated here which is whole another exercise.

Hi~,I got this error too, how did you solve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants