Biostar Test Site

This is site is used for testing only. Visit: https://www.biostars.org to ask a question.

How to solve `obj/haplotype_indexer.o error` when i `make static`.
1
0
Entering edit mode
13 months ago
congruisun • 0

My operating system is CentOS, my CPU that supports SSE 4.2 and, GCC version is 5.3.0. I have solved several problems in vcflib, dozen, and DYNAMIC construction through google and github. Now I have no idea in obj/haplotype_indexer.o errors. please help me out!

. ./source_me.sh && /usr/bin/g++ -I/data/prosium/01.program/51.vg/BUILD/vg/include -I. -I/data/prosium/01.program/51.vg/BUILD/vg/src -I/data/prosium/01.program/51.vg/BUILD/vg/src/unittest -I/data/prosium/01.program/51.vg/BUILD/vg/src/subcommand -I/data/prosium/01.program/51.vg/BUILD/vg/include/dynamic -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -O3 -Werror=return-type -std=c++14 -ggdb -g -MMD -MP -I /data/prosium/01.program/51.vg/BUILD/vg/include -I/data/prosium/01.program/51.vg/BUILD/vg/include/dynamic -I /data/prosium/01.program/51.vg/BUILD/vg/include -I/data/prosium/01.program/51.vg/BUILD/vg/include/dynamic -I /data/prosium/01.program/51.vg/BUILD/vg/include -I/data/prosium/01.program/51.vg/BUILD/vg/include/dynamic -I /data/prosium/01.program/51.vg/BUILD/vg/include -I/data/prosium/01.program/51.vg/BUILD/vg/include/dynamic -I /data/prosium/01.program/51.vg/vg-v1.25.0/include -I/data/prosium/01.program/51.vg/vg-v1.25.0/include/dynamic -I /data/prosium/01.program/51.vg/vg-v1.25.0/include -I/data/prosium/01.program/51.vg/vg-v1.25.0/include/dynamic -I /data/prosium/01.program/51.vg/vg-v1.25.0/include -I/data/prosium/01.program/51.vg/vg-v1.25.0/include/dynamic -I /data/prosium/01.program/51.vg/vg-v1.25.0/include -I/data/prosium/01.program/51.vg/vg-v1.25.0/include/dynamic -I /data/prosium/01.program/51.vg/vg-v1.25.0/include -I/data/prosium/01.program/51.vg/vg-v1.25.0/include/dynamic  -fopenmp -msse4.2 -c -o obj/haplotype_indexer.o src/haplotype_indexer.cpp
In file included from src/haplotype_indexer.cpp:13:0:
src/haplotype_indexer.hpp:79:54: error: expected ‘;’ at end of member declaration
     pair<size_t, size_t> sample_range = pair<size_t, size_t>(0, numeric_limits<size_t>::max());
                                                      ^
src/haplotype_indexer.hpp:79:54: error: declaration of ‘std::pair<long unsigned int, long unsigned int> vg::HaplotypeIndexer::size_t’ [-fpermissive]
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/5/cwchar:44,
                 from /usr/include/c++/5/bits/postypes.h:40,
                 from /usr/include/c++/5/iosfwd:40,
                 from /usr/include/c++/5/ios:38,
                 from /usr/include/c++/5/ostream:38,
                 from /usr/include/c++/5/iostream:39,
                 from src/haplotype_indexer.cpp:5:
/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:216:23: error: changes meaning of ‘size_t’ from ‘typedef long unsigned int size_t’ [-fpermissive]
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from src/haplotype_indexer.cpp:13:0:
src/haplotype_indexer.hpp:79:60: error: expected unqualified-id before ‘>’ token
     pair<size_t, size_t> sample_range = pair<size_t, size_t>(0, numeric_limits<size_t>::max());
                                                            ^
src/haplotype_indexer.hpp:83:22: error: invalid use of non-static data member ‘vg::HaplotypeIndexer::size_t’
     map<string, pair<size_t, size_t>> regions;
                      ^
src/haplotype_indexer.hpp:79:54: note: declared here
     pair<size_t, size_t> sample_range = pair<size_t, size_t>(0, numeric_limits<size_t>::max());
                                                      ^
src/haplotype_indexer.hpp:83:22: error: invalid use of non-static data member ‘vg::HaplotypeIndexer::size_t’
     map<string, pair<size_t, size_t>> regions;
                      ^
src/haplotype_indexer.hpp:79:54: note: declared here
     pair<size_t, size_t> sample_range = pair<size_t, size_t>(0, numeric_limits<size_t>::max());
                                                      ^
src/haplotype_indexer.hpp:83:22: error: invalid use of non-static data member ‘vg::HaplotypeIndexer::size_t’
     map<string, pair<size_t, size_t>> regions;
                      ^
                                             ^
src/haplotype_indexer.hpp:161:36: error: template argument 1 is invalid
         const function<void(size_t)>& bit_width_ready, const function<void(const gbwt::vector_type&, const gbwt::size_type (&)[4])>& each_thread);
                                    ^
src/haplotype_indexer.hpp:79:46: error: wrong number of template arguments (1, should be 2)
     pair<size_t, size_t> sample_range = pair<size_t, size_t>(0, numeric_limits<size_t>::max());
                                              ^
In file included from /usr/include/c++/5/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/5/bits/char_traits.h:39,
                 from /usr/include/c++/5/ios:40,
                 from /usr/include/c++/5/ostream:38,
                 from /usr/include/c++/5/iostream:39,
                 from src/haplotype_indexer.cpp:5:
/usr/include/c++/5/bits/stl_pair.h:96:12: note: provided for ‘template<class _T1, class _T2> struct std::pair’
     struct pair
            ^
src/haplotype_indexer.cpp:27:233: error: invalid use of non-static data member ‘vg::HaplotypeIndexer::size_t’
 size_t HaplotypeIndexer::parse_vcf(const PathHandleGraph* graph, map<string, Path>& alt_paths, const vector<path_handle_t>& contigs, vcflib::VariantCallFile& variant_file, std::vector<std::string>& sample_names, const function<void(size_t, const gbwt::VariantPaths&, gbwt::PhasingInformation&)>& handle_contig_haplotype_batch) {
                                                                                                                                                                                                                                         ^
In file included from src/haplotype_indexer.cpp:13:0:
src/haplotype_indexer.hpp:79:54: note: declared here
     pair<size_t, size_t> sample_range = pair<size_t, size_t>(0, numeric_limits<size_t>::max());
                                                      ^
src/haplotype_indexer.cpp:27:293: error: expression list treated as compound expression in functional cast [-fpermissive]
 size_t HaplotypeIndexer::parse_vcf(const PathHandleGraph* graph, map<string, Path>& alt_paths, const vector<path_handle_t>& contigs, vcflib::VariantCallFile& variant_file, std::vector<std::string>& sample_names, const function<void(size_t, const gbwt::VariantPaths&, gbwt::PhasingInformation&)>& handle_contig_haplotype_batch) {

In file included from src/haplotype_indexer.cpp:13:0:
src/haplotype_indexer.hpp:79:54: note: declared here
     pair<size_t, size_t> sample_range = pair<size_t, size_t>(0, numeric_limits<size_t>::max());
                                                      ^
src/haplotype_indexer.cpp:27:293: error: expression list treated as compound expression in functional cast [-fpermissive]
 size_t HaplotypeIndexer::parse_vcf(const PathHandleGraph* graph, map<string, Path>& alt_paths, const vector<path_handle_t>& contigs, vcflib::VariantCallFile& variant_file, std::vector<std::string>& sample_names, const function<void(size_t, const gbwt::VariantPaths&, gbwt::PhasingInformation&)>& handle_contig_haplotype_batch) {
                                                                                                                                                                                                                                                                                                     ^
src/haplotype_indexer.cpp:27:294: error: template argument 1 is invalid
 size_t HaplotypeIndexer::parse_vcf(const PathHandleGraph* graph, map<string, Path>& alt_paths, const vector<path_handle_t>& contigs, vcflib::VariantCallFile& variant_file, std::vector<std::string>& sample_names, const function<void(size_t, const gbwt::VariantPaths&, gbwt::PhasingInformation&)>& handle_contig_haplotype_batch) {
                                                                                                                                                                                                                                                                                                      ^
src/haplotype_indexer.cpp:27:233: error: invalid use of non-static data member ‘vg::HaplotypeIndexer::size_t’
 size_t HaplotypeIndexer::parse_vcf(const PathHandleGraph* graph, map<string, Path>& alt_paths, const vector<path_handle_t>& contigs, vcflib::VariantCallFile& variant_file, std::vector<std::string>& sample_names, const function<void(size_t, const gbwt::VariantPaths&, gbwt::PhasingInformation&)>& handle_contig_haplotype_batch) {
                                                                                                                                                                                                                                         ^
In file included from src/haplotype_indexer.cpp:13:0:
src/haplotype_indexer.hpp:79:54: note: declared here
     pair<size_t, size_t> sample_range = pair<size_t, size_t>(0, numeric_limits<size_t>::max());
                                                      ^
src/haplotype_indexer.cpp:27:293: error: expression list treated as compound expression in functional cast [-fpermissive]
 size_t HaplotypeIndexer::parse_vcf(const PathHandleGraph* graph, map<string, Path>& alt_paths, const vector<path_handle_t>& contigs, vcflib::VariantCallFile& variant_file, std::vector<std::string>& sample_names, const function<void(size_t, const gbwt::VariantPaths&, gbwt::PhasingInformation&)>& handle_contig_haplotype_batch) {
                                                                                                                                                                                                                                                                                                     ^
src/haplotype_indexer.cpp:27:294: error: template argument 1 is invalid
 size_t HaplotypeIndexer::parse_vcf(const PathHandleGraph* graph, map<string, Path>& alt_paths, const vector<path_handle_t>& contigs, vcflib::VariantCallFile& variant_file, std::vector<std::string>& sample_names, const function<void(size_t, const gbwt::VariantPaths&, gbwt::PhasingInformation&)>& handle_contig_haplotype_batch) {

src/haplotype_indexer.cpp:27:294: error: template argument 1 is invalid
 size_t HaplotypeIndexer::parse_vcf(const PathHandleGraph* graph, map<string, Path>& alt_paths, const vector<path_handle_t>& contigs, vcflib::VariantCallFile& variant_file, std::vector<std::string>& sample_names, const function<void(size_t, const gbwt::VariantPaths&, gbwt::PhasingInformation&)>& handle_contig_haplotype_batch) {
                                                                                                                                                                                                                                                                                                      ^
src/haplotype_indexer.cpp:27:219: error: invalid use of template-name ‘std::function’ without an argument list
 size_t HaplotypeIndexer::parse_vcf(const PathHandleGraph* graph, map<string, Path>& alt_paths, const vector<path_handle_t>& contigs, vcflib::VariantCallFile& variant_file, std::vector<std::string>& sample_names, const function<void(size_t, const gbwt::VariantPaths&, gbwt::PhasingInformation&)>& handle_contig_haplotype_batch) {
                                                                   ^
src/haplotype_indexer.cpp:513:6: error: no matching function for call to ‘vg::HaplotypeIndexer::generate_threads(const PathHandleGraph*&, std::map<std::__cxx11::basic_string<char>, vg::Path>&, bool&, const string&, const std::vector<std::__cxx11::basic_string<char> >&, const string&, vg::HaplotypeIndexer::build_gbwt(const PathHandleGraph*, std::map<std::__cxx11::basic_string<char>, vg::Path>&, bool, const string&, const std::vector<std::__cxx11::basic_string<char> >&, const string&)::<lambda(int)>, vg::HaplotypeIndexer::build_gbwt(const PathHandleGraph*, std::map<std::__cxx11::basic_string<char>, vg::Path>&, bool, const string&, const std::vector<std::__cxx11::basic_string<char> >&, const string&)::<lambda(const vector_type&, const size_type (&)[4])>)’
     });
      ^
In file included from src/haplotype_indexer.cpp:13:0:
src/haplotype_indexer.hpp:159:51: note: candidate: int vg::HaplotypeIndexer::generate_threads(const PathHandleGraph*, std::map<std::__cxx11::basic_string<char>, vg::Path>&, bool, const string&, const std::vector<std::__cxx11::basic_string<char> >&, const string&, const int&, const std::function<void(const std::vector<unsigned int>&, const long unsigned int (&)[4])>&)
     tuple<vector<string>, size_t, vector<string>> generate_threads(const PathHandleGraph* graph, map<string, Path>& alt_paths,
                                                   ^
src/haplotype_indexer.hpp:159:51: note:   no known conversion for argument 7 from ‘vg::HaplotypeIndexer::build_gbwt(const PathHandleGraph*, std::map<std::__cxx11::basic_string<char>, vg::Path>&, bool, const string&, const std::vector<std::__cxx11::basic_string<char> >&, const string&)::<lambda(int)>’ to ‘const int&’
Makefile:702: recipe for target 'obj/haplotype_indexer.o' failed
make: *** [obj/haplotype_indexer.o] Error 1
vg • 334 views
ADD COMMENT
0
Entering edit mode

I guess you are trying to install the VG program, for that I recommend to use bioconda.

ADD REPLY
0
Entering edit mode
13 months ago
congruisun • 0

Wow, yes, conda is the best! thanks for your reply. It very helps for me.

ADD COMMENT

Login before adding your answer.

Traffic: 158 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6