averdier@bioinfo:/tmp/alfred/alfred-0.2.1$ make all [102/316]
if [ -r src/htslib/Makefile ]; then cd src/htslib && autoheader && autoconf && ./configure --disable-s3 --disable-gcs --disable-libcurl --disable-plugins && make && make lib-static && cd ../../ && touch .htslib; fi
g++ -std=c++11 -isystem /tmp/alfred/alfred-0.2.1/src/jlib/ -isystem /tmp/alfred/alfred-0.2.1/src/htslib/ -pedantic -W -Wall -O3 -fno-tree-vectorize -DNDEBUG src/alfred.cpp -o src/alfred -L/tmp/alfred/alfred-0.2.1/src/htslib/ -L/tmp/a
lfred/alfred-0.2.1/src/htslib//lib -lboost_iostreams -lboost_filesystem -lboost_system -lboost_program_options -lboost_date_time -lhts -lz -llzma -lbz2 -Wl,-rpath,/tmp/alfred/alfred-0.2.1/src/htslib/
In file included from src/alfred.cpp:28:0:
src/bamstats.h: In function ‘int32_t bamstats::bamStatsRun(TConfig&)’:
src/bamstats.h:415:119: error: no matching function for call to ‘min(hts_pos_t&, int&)’
itRg->second.rc.brange[refIndex][psId].first = std::min(rec->core.pos, itRg->second.rc.brange[refIndex][psId].first);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from src/alfred.cpp:3:
/usr/include/c++/7/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed:
In file included from src/alfred.cpp:28:0:
src/bamstats.h:415:119: note: deduced conflicting types for parameter ‘const _Tp’ (‘long int’ and ‘int’)
itRg->second.rc.brange[refIndex][psId].first = std::min(rec->core.pos, itRg->second.rc.brange[refIndex][psId].first);
In file included from /usr/include/c++/7/bits/char_traits.h:39:0, [80/316]
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from src/alfred.cpp:3:
/usr/include/c++/7/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed:
In file included from src/alfred.cpp:28:0:
src/bamstats.h:415:119: note: deduced conflicting types for parameter ‘const _Tp’ (‘long int’ and ‘int’)
itRg->second.rc.brange[refIndex][psId].first = std::min(rec->core.pos, itRg->second.rc.brange[refIndex][psId].first);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/boost/any.hpp:17,
from /usr/include/boost/program_options/value_semantic.hpp:12,
from /usr/include/boost/program_options/options_description.hpp:13,
from src/alfred.cpp:9:
/usr/include/c++/7/bits/stl_algo.h:3450:5: note: candidate: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)
min(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3450:5: note: template argument deduction/substitution failed:
In file included from src/alfred.cpp:28:0:
src/bamstats.h:415:119: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘long int’
itRg->second.rc.brange[refIndex][psId].first = std::min(rec->core.pos, itRg->second.rc.brange[refIndex][psId].first);
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/boost/any.hpp:17,
from /usr/include/boost/program_options/value_semantic.hpp:12,
from /usr/include/boost/program_options/options_description.hpp:13,
from src/alfred.cpp:9:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: candidate: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: template argument deduction/substitution failed:
In file included from src/alfred.cpp:28:0:
src/bamstats.h:415:119: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘long int’
itRg->second.rc.brange[refIndex][psId].first = std::min(rec->core.pos, itRg->second.rc.brange[refIndex][psId].first);
^
Makefile:52: recipe for target 'src/alfred' failed
make: *** [src/alfred] Error 1
averdier@bioinfo:/tmp/alfred/alfred-0.2.1$ make all 2>&1 > compile_fail
In file included from src/alfred.cpp:28:0:
src/bamstats.h: In function ‘int32_t bamstats::bamStatsRun(TConfig&)’:
src/bamstats.h:415:119: error: no matching function for call to ‘min(hts_pos_t&, int&)’
itRg->second.rc.brange[refIndex][psId].first = std::min(rec->core.pos, itRg->second.rc.brange[refIndex][psId].first);
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from src/alfred.cpp:3:
/usr/include/c++/7/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed:
In file included from src/alfred.cpp:28:0:
src/bamstats.h:415:119: note: deduced conflicting types for parameter ‘const _Tp’ (‘long int’ and ‘int’)
itRg->second.rc.brange[refIndex][psId].first = std::min(rec->core.pos, itRg->second.rc.brange[refIndex][psId].first);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from src/alfred.cpp:3:
/usr/include/c++/7/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed:
In file included from src/alfred.cpp:28:0:
src/bamstats.h:415:119: note: deduced conflicting types for parameter ‘const _Tp’ (‘long int’ and ‘int’)
itRg->second.rc.brange[refIndex][psId].first = std::min(rec->core.pos, itRg->second.rc.brange[refIndex][psId].first);
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/boost/any.hpp:17,
from /usr/include/boost/program_options/value_semantic.hpp:12,
from /usr/include/boost/program_options/options_description.hpp:13,
from src/alfred.cpp:9:
/usr/include/c++/7/bits/stl_algo.h:3450:5: note: candidate: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)
min(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3450:5: note: template argument deduction/substitution failed:
In file included from src/alfred.cpp:28:0:
src/bamstats.h:415:119: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘long int’
itRg->second.rc.brange[refIndex][psId].first = std::min(rec->core.pos, itRg->second.rc.brange[refIndex][psId].first);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/boost/any.hpp:17,
from /usr/include/boost/program_options/value_semantic.hpp:12,
from /usr/include/boost/program_options/options_description.hpp:13,
from src/alfred.cpp:9:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: candidate: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: template argument deduction/substitution failed:
In file included from src/alfred.cpp:28:0:
src/bamstats.h:415:119: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘long int’
itRg->second.rc.brange[refIndex][psId].first = std::min(rec->core.pos, itRg->second.rc.brange[refIndex][psId].first);
^
make: *** [src/alfred] Error 1
However, cloning the repo then switching to the v0.2.1 tag before compiling work:
averdier@bioinfo:/tmp/alfred$ git clone --recursive https://github.com/tobiasrausch/alfred.git
Cloning into 'alfred'...
remote: Enumerating objects: 240, done.
remote: Counting objects: 100% (240/240), done.
remote: Compressing objects: 100% (180/180), done.
remote: Total 2866 (delta 113), reused 134 (delta 49), pack-reused 2626
Receiving objects: 100% (2866/2866), 20.88 MiB | 2.85 MiB/s, done.
Resolving deltas: 100% (1768/1768), done.
Submodule 'src/htslib' (https://github.com/samtools/htslib.git) registered for path 'src/htslib'
Cloning into '/tmp/alfred/alfred/src/htslib'...
remote: Enumerating objects: 75, done.
remote: Counting objects: 100% (75/75), done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 13238 (delta 35), reused 35 (delta 21), pack-reused 13163
Receiving objects: 100% (13238/13238), 9.89 MiB | 2.08 MiB/s, done.
Resolving deltas: 100% (9508/9508), done.
Submodule path 'src/htslib': checked out '1832d3a1b75133e55fb6abffc3f50f8a6ed5ceae'
averdier@bioinfo:/tmp/alfred$ cd alfred
averdier@bioinfo:/tmp/alfred/alfred$ git checkout tags/v0.2.1 -b v0.2.1-branch
Switched to a new branch 'v0.2.1-branch'
averdier@bioinfo:/tmp/alfred/alfred$ git log --oneline --decorate -n 5
2812b18 (HEAD -> v0.2.1-branch, tag: v0.2.1) autoconf
4cebee6 autoconf
d0d7208 v0.2.1
7798f6f xz removed
2c8ff68 xz
averdier@bioinfo:/tmp/alfred/alfred$ make all
if [ -r src/htslib/Makefile ]; then cd src/htslib && autoheader && autoconf && ./configure --disable-s3 --disable-gcs --disable-libcurl --disable-plugins && make && make lib-static && cd ../../ && touch .htslib; fi
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
[...]
make[1]: Leaving directory '/tmp/alfred/alfred/src/htslib'
make[1]: Entering directory '/tmp/alfred/alfred/src/htslib'
make[1]: Nothing to be done for 'lib-static'.
make[1]: Leaving directory '/tmp/alfred/alfred/src/htslib'
g++ -std=c++11 -isystem /tmp/alfred/alfred/src/jlib/ -isystem /tmp/alfred/alfred/src/htslib/ -pedantic -W -Wall -O3 -fno-tree-vectorize -DNDEBUG src/alfred.cpp -o src/alfred -L/tmp/alfred/alfred/src/htslib/ -L/tmp/alfred/alfred/src/htslib//lib -lboost_iostreams -lboost_filesystem -lboost_system -lboost_program_options -lboost_date_time -lhts -lz -llzma -lbz2 -Wl,-rpath,/tmp/alfred/alfred/src/htslib/
Like the error is pointing it out, the release tar is missing the htslib (alfred is the git clone, alfred-0.2.1 is the sources tar):