Open thisisamirv opened 1 year ago
It seems that the -std=c++98 flag is not supported by the boost version included (1.55.0).
In fact the whole RSEM code base seems to be c++11 ready except for a few implicit conversions of std::istream
to bool. A trivial patch like this will allow you to use -std=c++11
instead:
diff --git a/PairedEndHit.h b/PairedEndHit.h
index be3ea54..0bbf236 100644
--- a/PairedEndHit.h
+++ b/PairedEndHit.h
@@ -26,7 +26,7 @@ private:
bool PairedEndHit::read(std::istream& in) {
conprb = 0.0;
- return (in>>sid>>pos>>insertL);
+ return !!(in>>sid>>pos>>insertL);
}
void PairedEndHit::write(std::ostream& out) {
diff --git a/SingleHit.h b/SingleHit.h
index b157a15..f3c2d12 100644
--- a/SingleHit.h
+++ b/SingleHit.h
@@ -43,7 +43,7 @@ protected:
bool SingleHit::read(std::istream& in) {
conprb = 0.0;
- return (in>>sid>>pos);
+ return bool(in>>sid>>pos);
}
void SingleHit::write(std::ostream& out) {
diff --git a/buildReadIndex.cpp b/buildReadIndex.cpp
index 3837079..4f58022 100644
--- a/buildReadIndex.cpp
+++ b/buildReadIndex.cpp
@@ -37,15 +37,15 @@ void buildIndex(char* readF, int gap, bool hasQ) {
streampos pos = fin.tellg();
success = true;
- success = (getline(fin, line));
+ success = !!getline(fin, line);
if (!success) continue;
- success = (getline(fin, line));
+ success = !!getline(fin, line);
if (!success) continue;
if (hasQ) {
- success = (getline(fin, line));
+ success = !!getline(fin, line);
if (!success) continue;
- success = (getline(fin, line));
+ success = !!getline(fin, line);
if (!success) continue;
}
Otherwise you could find out how to make sure set BOOST_NO_CXX11_HDR_TUPLE
correctly for your platform (in which case Boost Tuple would be used). I don't have access to your compiler to test.
log.txt
I get the above errors while trying to make on mac. Please can anyone help?