Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"make" error on mac (log attached) #189

Open
thisisamirv opened this issue Sep 28, 2022 · 1 comment
Open

"make" error on mac (log attached) #189

thisisamirv opened this issue Sep 28, 2022 · 1 comment

Comments

@thisisamirv
Copy link

log.txt

I get the above errors while trying to make on mac. Please can anyone help?

@sehe
Copy link

sehe commented Jan 1, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants