Problem compiling
Hi, I´m trying to use metabat however i have a coupe of problems. I have downloaded the binary static version provided here but it looks like some libraries are still shared...
#!
./metabat
./metabat: /usr/lib64/libgomp.so.1: version `GOMP_4.0' not found (required by ./metabat)
I have tried to compile myself downloading the master release from here as well. I have libboost_1_5-9 properly installed and found.
Got this problem:
#!
g++ -o src/metabat.o -c -O3 -Wall -g -fopenmp -DNDEBUG -I/home/david/work/libs/include src/metabat.cpp
src/metabat.cpp:55: error: using ‘typename’ outside of template
src/metabat.cpp:56: error: using ‘typename’ outside of template
src/metabat.cpp:57: error: using ‘typename’ outside of template
scons: *** [src/metabat.o] Error 1
scons: building terminated because of errors.
How can i move forward ?
Comments (9)
-
-
reporter #! cd berkeleylab-metabat-5583d6a5ce3d scons PREFIX=/home/david/work/david/sources/metabat install
#! scons: Reading SConscript files ... Building with custom install of htslib / samtools 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 ranlib... ranlib checking for zlib.h... yes checking for inflate in -lz... yes configure: creating ./config.status config.status: creating config.mk make: Nothing to be done for `all'. mkdir -p -m 755 /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/bin /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/include /home/david/work/david/source s/berkeleylab-metabat-5583d6a5ce3d/samtools/include/htslib /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/lib /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/sam tools/share/man/man1 /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/share/man/man5 /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/lib/pkgconfig install -p -m 644 libhts.so /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/lib/libhts.so.1.2.1 ln -sf libhts.so.1.2.1 /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/lib/libhts.so ln -sf libhts.so.1.2.1 /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/lib/libhts.so.1 sed -e 's#@includedir@#/home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/include#g;s#@libdir@#/home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/lib#g;s#@PACK AGE_VERSION@#1.2.1#g' htslib.pc.in > /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/lib/pkgconfig/htslib.pc chmod 644 /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/lib/pkgconfig/htslib.pc install -p bgzip htsfile tabix /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/bin install -p -m 644 htslib/*.h /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/include/htslib install -p -m 644 libhts.a /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/lib/libhts.a install -p -m 644 htsfile.1 tabix.1 /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/share/man/man1 install -p -m 644 faidx.5 sam.5 vcf.5 /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/share/man/man5 make: Nothing to be done for `all'. mkdir -p -m 755 /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/bin /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/share/man/man1 install -p samtools misc/ace2sam misc/maq2sam-long misc/maq2sam-short misc/md5fa misc/md5sum-lite misc/wgsim misc/blast2sam.pl misc/bowtie2sam.pl misc/export2sam.pl misc/interpolate_sam.pl misc/novo2sam. pl misc/plot-bamstats misc/psl2sam.pl misc/sam2vcf.pl misc/samtools.pl misc/seq_cache_populate.pl misc/soap2sam.pl misc/varfilter.py misc/wgsim_eval.pl misc/zoom2sam.pl /home/david/work/david/sources/ber keleylab-metabat-5583d6a5ce3d/samtools/bin install -p -m 644 samtools.1 /home/david/work/david/sources/berkeleylab-metabat-5583d6a5ce3d/samtools/share/man/man1 Found from environment BOOST_ROOT=/home/david/work/lib/ Found boost libs in /home/david/work/lib//lib setting boost include to /home/david/work/lib//include setting boost lib to /home/david/work/lib//lib Found static library boost_program_options as /home/david/work/lib//lib/libboost_program_options.a Found static library boost_serialization as /home/david/work/lib//lib/libboost_serialization.a Found static library boost_graph as /home/david/work/lib//lib/libboost_graph.a Found static library bam as samtools/lib/libbam.a Found static library hts as samtools/lib/libhts.a Found static library boost_system as /home/david/work/lib//lib/libboost_system.a Found static library bam as samtools/lib/libbam.a Found static library hts as samtools/lib/libhts.a scons: done reading SConscript files. scons: Building targets ... /home/david/work/sources/berkeleylab-metabat-5583d6a5ce3d/jgi_summarize_bam_contig_depths --outputDepth test/contigs.fa.depth.txt test/contigs-1000.fastq.bam Output depth matrix to test/contigs.fa.depth.txt Output matrix to test/contigs.fa.depth.txt Opening bam: test/contigs-1000.fastq.bam Consolidating headers Processing bam files Thread 0 processing: contigs-1000.fastq.bam Thread 0 finished: contigs-1000.fastq.bam with 1000 reads and 1000 readsWellMapped Creating depth matrix file: test/contigs.fa.depth.txt Closing most bam files Closing last bam file Finished g++ -o src/metabat.o -c -O3 -Wall -g -fopenmp -DNDEBUG -I/home/dvilanova/work/lib/include src/metabat.cpp src/metabat.cpp:55: error: using ‘typename’ outside of template src/metabat.cpp:56: error: using ‘typename’ outside of template src/metabat.cpp:57: error: using ‘typename’ outside of template scons: *** [src/metabat.o] Error 1
#! g++ --version g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Looks like a compiler sort of standard issue ?
-
Yes. It needs g++ >= 4.6
-
I just pushed a change to allow it to compile further, but without g++ >=4.6 the application will not be multi-threaded. We don't have g++4.4 installed anywhere easy to check whether this fully fixes your issue.
-
reporter good to know. I will follow your recommendations and will compile with higher version >=4.6 thanks
-
reporter Had another install with g++4.9.1 and compiled properly. Great !!!
-
- changed status to resolved
-
Is there any solution for osx?
I get the following problem with the to prebuild libraries:
dyld: Library not loaded: /usr/local/opt/gcc@4.9/lib/gcc/4.9/libgomp.1.dylib Referenced from: /Users/silas/Documents/Debug_atlas/conda_envs/66f3e419/bin/jgi_summarize_bam_contig_depths Reason: image not found
-
Hi Silas, I can not reproduce the error you see. And I suspect that you may be running a different version of OSX than I have access to at the moment. Have you tried running the docker container? That should work and is the easiest path to executing, imo.
- Log in to comment
Can you paste your command line and entire output for building MetaBAT?