Closed blahah closed 9 years ago
Also this.
g++ -O3 -Wno-format -MMD -ISNAPLib -msse -c -o SNAPLib/Error.o SNAPLib/Error.cpp
SNAPLib/DataWriter.cpp:318:29: error: no matching function for call to 'min'
batches[current].used = min(bufferSize, batchOffset + bytes);
^~~
@sjackman see https://github.com/amplab/snap/pull/32
I am trying to compile on a Snow leopard Mac OSX. Running make works until reaching this command:
$ g++ -O3 -Wno-format -MMD -ISNAPLib -msse -c -o SNAPLib/DataWriter.o SNAPLib/DataWriter.cpp
SNAPLib/DataWriter.cpp: In member function 'virtual void AsyncDataWriter::advance(GenomeDistance, GenomeLocation)':
SNAPLib/DataWriter.cpp:318:64: error: no matching function for call to 'min(const size_t&, long long unsigned int)'
batches[current].used = min(bufferSize, batchOffset + bytes);
^
SNAPLib/DataWriter.cpp:318:64: note: candidates are:
In file included from /usr/local/homebrew/Cellar/gcc/4.9.2_1/include/c++/4.9.2/algorithm:61:0,
from SNAPLib/stdafx.h:13,
from SNAPLib/DataWriter.cpp:19:
/usr/local/homebrew/Cellar/gcc/4.9.2_1/include/c++/4.9.2/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/local/homebrew/Cellar/gcc/4.9.2_1/include/c++/4.9.2/bits/stl_algobase.h:240:5: note: template argument deduction/substitution failed:
SNAPLib/DataWriter.cpp:318:64: note: deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'long long unsigned int')
batches[current].used = min(bufferSize, batchOffset + bytes);
^
In file included from /usr/local/homebrew/Cellar/gcc/4.9.2_1/include/c++/4.9.2/algorithm:61:0,
from SNAPLib/stdafx.h:13,
from SNAPLib/DataWriter.cpp:19:
/usr/local/homebrew/Cellar/gcc/4.9.2_1/include/c++/4.9.2/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^
/usr/local/homebrew/Cellar/gcc/4.9.2_1/include/c++/4.9.2/bits/stl_algobase.h:194:5: note: template argument deduction/substitution failed:
SNAPLib/DataWriter.cpp:318:64: note: deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'long long unsigned int')
batches[current].used = min(bufferSize, batchOffset + bytes);
^
Any ideas what to try?
Thank you,
Paul
@pcantalupo yes, I fixed this bug in #32. See https://github.com/amplab/snap/pull/32/files.
Merged pull request into dev. We'll handle master by integrating dev changes back into it.
Just a heads up that the dev branch can't be compiled on OSX: