deweylab / RSEM

RSEM: accurate quantification of gene and isoform expression from RNA-Seq data
http://deweylab.biostat.wisc.edu/rsem/
GNU General Public License v3.0
417 stars 118 forks source link

failure to build from source with GCC6 #18

Closed mr-c closed 8 years ago

mr-c commented 8 years ago

Hello,

The next stable release of Debian will include GCC version 6 as the default compiler. Currently RSEM fails to build with the following error:

> sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on dl580gen9-02.hlinux
...
> g++ -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -O3 -Wall scanForPairedEndReads.cpp /usr/lib/libbam.a -lz -lpthread -o rsem-scan-for-paired-end-reads
> buildReadIndex.cpp: In function 'void buildIndex(char*, int, bool)':
> buildReadIndex.cpp:38:32: error: cannot convert 'std::basic_istream<char>' to 'bool' in assignment
>    success = (getline(fin, line));
>                                 ^
> 
> buildReadIndex.cpp:40:32: error: cannot convert 'std::basic_istream<char>' to 'bool' in assignment
>    success = (getline(fin, line));
>                                 ^
> 
> buildReadIndex.cpp:44:33: error: cannot convert 'std::basic_istream<char>' to 'bool' in assignment
>     success = (getline(fin, line));
>                                  ^
> 
> buildReadIndex.cpp:46:33: error: cannot convert 'std::basic_istream<char>' to 'bool' in assignment
>     success = (getline(fin, line));
>                                  ^
> 
> Makefile:59: recipe for target 'rsem-build-read-index' failed
> make[2]: *** [rsem-build-read-index] Error 1
> make[2]: *** Waiting for unfinished jobs....
> In file included from getUnique.cpp:12:0:
> utils.h:26:13: warning: 'verbose' defined but not used [-Wunused-variable]
>  static bool verbose = true; // show detail intermediate outputs
>              ^~~~~~~
> 
> In file included from wiggle.cpp:10:0:
> utils.h:26:13: warning: 'verbose' defined but not used [-Wunused-variable]
>  static bool verbose = true; // show detail intermediate outputs
>              ^~~~~~~
> 
> In file included from samValidator.cpp:12:0:
> utils.h:26:13: warning: 'verbose' defined but not used [-Wunused-variable]
>  static bool verbose = true; // show detail intermediate outputs
>              ^~~~~~~
> 
> In file included from parseIt.cpp:22:0:
> SingleHit.h: In member function 'bool SingleHit::read(std::istream&)':
> SingleHit.h:46:22: error: cannot convert 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' to 'bool' in return
>   return (in>>sid>>pos);
>                       ^
> 
> In file included from parseIt.cpp:23:0:
> PairedEndHit.h: In member function 'bool PairedEndHit::read(std::istream&)':
> PairedEndHit.h:29:34: error: cannot convert 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' to 'bool' in return
>      return (in>>sid>>pos>>insertL);
>                                   ^
> 
> In file included from scanForPairedEndReads.cpp:13:0:
> utils.h:26:13: warning: 'verbose' defined but not used [-Wunused-variable]
>  static bool verbose = true; // show detail intermediate outputs
>              ^~~~~~~
> 
> Makefile:55: recipe for target 'parseIt.o' failed
> make[2]: *** [parseIt.o] Error 1
> In file included from tbam2gbam.cpp:5:0:
> utils.h:26:13: warning: 'verbose' defined but not used [-Wunused-variable]
>  static bool verbose = true; // show detail intermediate outputs
>              ^~~~~~~
> 
> In file included from EM.cpp:24:0:
> SingleHit.h: In member function 'bool SingleHit::read(std::istream&)':
> SingleHit.h:46:22: error: cannot convert 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' to 'bool' in return
>   return (in>>sid>>pos);
>                       ^
> 
> In file included from EM.cpp:25:0:
> PairedEndHit.h: In member function 'bool PairedEndHit::read(std::istream&)':
> PairedEndHit.h:29:34: error: cannot convert 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' to 'bool' in return
>      return (in>>sid>>pos>>insertL);
>                                   ^
> 
> In file included from SingleModel.h:26:0,
>                  from simulation.cpp:22:
> SingleHit.h: In member function 'bool SingleHit::read(std::istream&)':
> SingleHit.h:46:22: error: cannot convert 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' to 'bool' in return
>   return (in>>sid>>pos);
>                       ^
> 
> In file included from PairedEndModel.h:27:0,
>                  from simulation.cpp:24:
> PairedEndHit.h: In member function 'bool PairedEndHit::read(std::istream&)':
> PairedEndHit.h:29:34: error: cannot convert 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' to 'bool' in return
>      return (in>>sid>>pos>>insertL);
>                                   ^
> 
> In file included from SingleModel.h:26:0,
>                  from Gibbs.cpp:15:
> SingleHit.h: In member function 'bool SingleHit::read(std::istream&)':
> SingleHit.h:46:22: error: cannot convert 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' to 'bool' in return
>   return (in>>sid>>pos);
>                       ^
> 
> In file included from SingleModel.h:26:0,
>                  from calcCI.cpp:16:
> SingleHit.h: In member function 'bool SingleHit::read(std::istream&)':
> SingleHit.h:46:22: error: cannot convert 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' to 'bool' in return
>   return (in>>sid>>pos);
>                       ^
> 
> In file included from PairedEndModel.h:27:0,
>                  from Gibbs.cpp:17:
> PairedEndHit.h: In member function 'bool PairedEndHit::read(std::istream&)':
> PairedEndHit.h:29:34: error: cannot convert 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' to 'bool' in return
>      return (in>>sid>>pos>>insertL);
>                                   ^
> 
> In file included from PairedEndModel.h:27:0,
>                  from calcCI.cpp:18:
> PairedEndHit.h: In member function 'bool PairedEndHit::read(std::istream&)':
> PairedEndHit.h:29:34: error: cannot convert 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' to 'bool' in return
>      return (in>>sid>>pos>>insertL);
>                                   ^
> 
> Makefile:104: recipe for target 'simulation.o' failed
> make[2]: *** [simulation.o] Error 1
> Makefile:111: recipe for target 'Gibbs.o' failed
> make[2]: *** [Gibbs.o] Error 1
> Makefile:120: recipe for target 'calcCI.o' failed
> make[2]: *** [calcCI.o] Error 1
> Makefile:84: recipe for target 'EM.o' failed
> make[2]: *** [EM.o] Error 1

(Original report at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811615#5 )

bli25wisc commented 8 years ago

Hi Michael,

Thanks for letting us know this incompatibility issue. I guess the easiest way to resolve this is to add "-std=gnu++98" into the Makefile. I have updated RSEM to reflect this change. Please clone "https://github.com/deweylab/RSEM.git" and try if it works for you.

Thanks, Bo

On 2016-02-03 09:35, Michael R. Crusoe wrote:

Hello,

The next stable release of Debian will include GCC version 6 as the default compiler. Currently RSEM fails to build with the following error:

sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on dl580gen9-02.hlinux ... g++ -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -O3 -Wall scanForPairedEndReads.cpp /usr/lib/libbam.a -lz -lpthread -o rsem-scan-for-paired-end-reads buildReadIndex.cpp: In function 'void buildIndex(char*, int, bool)': buildReadIndex.cpp:38:32: error: cannot convert 'std::basic_istream' to 'bool' in assignment success = (getline(fin, line)); ^

buildReadIndex.cpp:40:32: error: cannot convert 'std::basic_istream' to 'bool' in assignment success = (getline(fin, line)); ^

buildReadIndex.cpp:44:33: error: cannot convert 'std::basic_istream' to 'bool' in assignment success = (getline(fin, line)); ^

buildReadIndex.cpp:46:33: error: cannot convert 'std::basic_istream' to 'bool' in assignment success = (getline(fin, line)); ^

Makefile:59: recipe for target 'rsem-build-read-index' failed make[2]: * [rsem-build-read-index] Error 1 make[2]: * Waiting for unfinished jobs.... In file included from getUnique.cpp:12:0: utils.h:26:13: warning: 'verbose' defined but not used [-Wunused-variable] static bool verbose = true; // show detail intermediate outputs ^~~

In file included from wiggle.cpp:10:0: utils.h:26:13: warning: 'verbose' defined but not used [-Wunused-variable] static bool verbose = true; // show detail intermediate outputs ^~~

In file included from samValidator.cpp:12:0: utils.h:26:13: warning: 'verbose' defined but not used [-Wunused-variable] static bool verbose = true; // show detail intermediate outputs ^~~

In file included from parseIt.cpp:22:0: SingleHit.h: In member function 'bool SingleHit::read(std::istream&)': SingleHit.h:46:22: error: cannot convert 'std::basic_istream::__istream_type {aka std::basic_istream}' to 'bool' in return return (in>>sid>>pos); ^

In file included from parseIt.cpp:23:0: PairedEndHit.h: In member function 'bool PairedEndHit::read(std::istream&)': PairedEndHit.h:29:34: error: cannot convert 'std::basic_istream::__istream_type {aka std::basic_istream}' to 'bool' in return return (in>>sid>>pos>>insertL); ^

In file included from scanForPairedEndReads.cpp:13:0: utils.h:26:13: warning: 'verbose' defined but not used [-Wunused-variable] static bool verbose = true; // show detail intermediate outputs ^~~

Makefile:55: recipe for target 'parseIt.o' failed make[2]: *\ [parseIt.o] Error 1 In file included from tbam2gbam.cpp:5:0: utils.h:26:13: warning: 'verbose' defined but not used [-Wunused-variable] static bool verbose = true; // show detail intermediate outputs ^~~

In file included from EM.cpp:24:0: SingleHit.h: In member function 'bool SingleHit::read(std::istream&)': SingleHit.h:46:22: error: cannot convert 'std::basic_istream::__istream_type {aka std::basic_istream}' to 'bool' in return return (in>>sid>>pos); ^

In file included from EM.cpp:25:0: PairedEndHit.h: In member function 'bool PairedEndHit::read(std::istream&)': PairedEndHit.h:29:34: error: cannot convert 'std::basic_istream::__istream_type {aka std::basic_istream}' to 'bool' in return return (in>>sid>>pos>>insertL); ^

In file included from SingleModel.h:26:0, from simulation.cpp:22: SingleHit.h: In member function 'bool SingleHit::read(std::istream&)': SingleHit.h:46:22: error: cannot convert 'std::basic_istream::__istream_type {aka std::basic_istream}' to 'bool' in return return (in>>sid>>pos); ^

In file included from PairedEndModel.h:27:0, from simulation.cpp:24: PairedEndHit.h: In member function 'bool PairedEndHit::read(std::istream&)': PairedEndHit.h:29:34: error: cannot convert 'std::basic_istream::__istream_type {aka std::basic_istream}' to 'bool' in return return (in>>sid>>pos>>insertL); ^

In file included from SingleModel.h:26:0, from Gibbs.cpp:15: SingleHit.h: In member function 'bool SingleHit::read(std::istream&)': SingleHit.h:46:22: error: cannot convert 'std::basic_istream::__istream_type {aka std::basic_istream}' to 'bool' in return return (in>>sid>>pos); ^

In file included from SingleModel.h:26:0, from calcCI.cpp:16: SingleHit.h: In member function 'bool SingleHit::read(std::istream&)': SingleHit.h:46:22: error: cannot convert 'std::basic_istream::__istream_type {aka std::basic_istream}' to 'bool' in return return (in>>sid>>pos); ^

In file included from PairedEndModel.h:27:0, from Gibbs.cpp:17: PairedEndHit.h: In member function 'bool PairedEndHit::read(std::istream&)': PairedEndHit.h:29:34: error: cannot convert 'std::basic_istream::__istream_type {aka std::basic_istream}' to 'bool' in return return (in>>sid>>pos>>insertL); ^

In file included from PairedEndModel.h:27:0, from calcCI.cpp:18: PairedEndHit.h: In member function 'bool PairedEndHit::read(std::istream&)': PairedEndHit.h:29:34: error: cannot convert 'std::basic_istream::__istream_type {aka std::basic_istream}' to 'bool' in return return (in>>sid>>pos>>insertL); ^

Makefile:104: recipe for target 'simulation.o' failed make[2]: * [simulation.o] Error 1 Makefile:111: recipe for target 'Gibbs.o' failed make[2]: * [Gibbs.o] Error 1 Makefile:120: recipe for target 'calcCI.o' failed make[2]: * [calcCI.o] Error 1 Makefile:84: recipe for target 'EM.o' failed make[2]: * [EM.o] Error 1

(Original report at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811615#5 [1] )

Reply to this email directly or view it on GitHub [2].

*

Links:

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811615#5 [2] https://github.com/deweylab/RSEM/issues/18

bli25wisc commented 8 years ago

HI Michael,

Can you let me know if it works for you?

Thanks, Bo

mr-c commented 8 years ago

@bli25wisc Yes, that is what I was going to do. However I am having a hard time testing the latest version of RSEM on Debian: I think you are using features of htslib but haven't fully converted over yet.

mr-c commented 8 years ago

@bli25wisc I can confirm that cherry-picking 705099ad77f64f8d5ced8419dd066601e1cb7287 fixes compilation using g++ (Debian 6-20160228-1) 6.0.0 20160228 (experimental) [trunk revision 233789]