Dear Dr. Didelot,
I have tried to compile the version 1.2 of ClonalFrame in a Linux server with RedHat 7.1
My gcc version is 4.8.3.
g++ -c -pipe -W -Wall -O3 -static -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -Isrc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Ibuild -o build/alignment_xmfa.o src/alignment_xmfa.cpp
src/alignment_xmfa.cpp: In constructor ‘wb::Alignment_xmfa::Alignment_xmfa(char*, bool, int)’:
src/alignment_xmfa.cpp:61:125: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘std::vector<int>::size_type {aka long unsigned int}’ [-Wformat=]
printf("Warning: ignoring incomplete fragment %d (does not contain strain %s)\n",v.size(),names[missing]);
^
src/alignment_xmfa.cpp:129:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j=0;j<strlen(bufin[i]);j++) {
^
src/alignment_xmfa.cpp: In member function ‘void wb::Alignment_xmfa::Fgets(char*, int, FILE*)’:
src/alignment_xmfa.cpp:187:23: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
fgets(buf,l,f);
^
src/alignment_xmfa.cpp:189:27: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
fgets(buf,l,f);
^
g++ -c -pipe -W -Wall -O3 -static -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -Isrc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Ibuild -o build/alignment_structure.o src/alignment_structure.cpp
src/alignment_structure.cpp: In constructor ‘wb::Alignment_structure::Alignment_structure(char*, int)’:
src/alignment_structure.cpp:45:19: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
if (ch>='0' & ch<='9')
^
g++ -c -pipe -W -Wall -O3 -static -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -Isrc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Ibuild -o build/alignment.o src/alignment.cpp
src/alignment.cpp: In member function ‘void wb::Alignment::writeToFile(char*)’:
src/alignment.cpp:236:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
char * lets="ATCG";
^
src/alignment.cpp:241:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (unsigned int i=0;i<getB();i++) {
^
src/alignment.cpp:243:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (unsigned int j=0;j<getN();j++) {
^
src/alignment.cpp:244:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (unsigned int k=beg;k<end;k++)
^
src/alignment.cpp:246:41: warning: embedded ‘\0’ in format [-Wformat-contains-nul]
sprintf(buf+end-beg,"\0");
^
g++ -c -pipe -W -Wall -O3 -static -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -Isrc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Ibuild -o build/boot.o src/boot.cpp
g++ -c -pipe -W -Wall -O3 -static -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -Isrc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Ibuild -o build/burst.o src/burst.cpp
src/burst.cpp: In member function ‘void wb::Burst::burst(wb::Param*)’:
src/burst.cpp:170:47: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘std::vector<std::vector<int> >::size_type {aka long unsigned int}’ [-Wformat=]
printf("Nb groups=%d\n",groups->size());
^
src/burst.cpp:188:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (k=1;k<rid->size();k++)
^
src/burst.cpp:190:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (k>=rid->size()) continue;
^
src/burst.cpp: In member function ‘void wb::Burst::optimiseFathers(gsl_vector_int*, std::vector<std::vector<int> >*, int)’:
src/burst.cpp:259:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (slvs->at(prop).size()>current && !descended(prop,i,fathers)) {
^
src/burst.cpp: At global scope:
src/burst.cpp:252:10: warning: unused parameter ‘f’ [-Wunused-parameter]
void Burst::optimiseFathers(gsl_vector_int * fathers,vector<vector<int> > *slvs,int f) {
^
g++ -c -pipe -W -Wall -O3 -static -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -Isrc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Ibuild -o build/consensus.o src/consensus.cpp
g++ -c -pipe -W -Wall -O3 -static -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -Isrc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Ibuild -o build/genes.o src/genes.cpp
src/genes.cpp: In constructor ‘wb::Genes::Genes(wb::Alignment*, char*, char*)’:
src/genes.cpp:34:35: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf(mapf,"%d",&buf);
^
src/genes.cpp:53:42: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf(genes,"%d %d",&f1,&f2);
^
g++ -c -pipe -W -Wall -O3 -static -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -Isrc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Ibuild -o build/hashcell.o src/hashcell.cpp
src/hashcell.cpp: In member function ‘void wb::HashCell::addNode(wb::Tree*)’:
src/hashcell.cpp:51:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (l>=t->recMap->size) break;
^
g++ -c -pipe -W -Wall -O3 -static -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -Isrc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Ibuild -o build/move_ages.o src/move_ages.cpp
src/move_ages.cpp: In member function ‘virtual void wb::Move_ages::move(wb::Param*)’:
src/move_ages.cpp:60:21: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
} else ;//printf("Age change rejected because out of range\n");
^
g++ -c -pipe -W -Wall -O3 -static -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -Isrc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Ibuild -o build/move_delta.o src/move_delta.cpp
src/move_delta.cpp:24:5: warning: unused parameter ‘p’ [-Wunused-parameter]
Move_delta::Move_delta(gsl_rng * rng,Param * p):Move(rng) {
^
g++ -c -pipe -W -Wall -O3 -static -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -Isrc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Ibuild -o build/move_gap.o src/move_gap.cpp
src/move_gap.cpp:24:5: warning: unused parameter ‘p’ [-Wunused-parameter]
Move_gap::Move_gap(gsl_rng * rng,Param * p) : Move(rng) {}
^
g++ -c -pipe -W -Wall -O3 -static -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -Isrc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Ibuild -o build/move_hidden.o src/move_hidden.cpp
src/move_hidden.cpp:25:5: warning: unused parameter ‘p’ [-Wunused-parameter]
Move_hidden::Move_hidden(gsl_rng * rng,Param * p) : Move(rng)
^
src/move_hidden.cpp: In member function ‘void wb::Move_hidden::forwardfast(wb::Param*, wb::Tree*)’:
src/move_hidden.cpp:127:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (unsigned int i=0;i<L;i++)
^
src/move_hidden.cpp:133:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (unsigned int j=0;j<nbstates;j++) gsl_vector_set(probas,j,gsl_vector_get(pbeg,j));
^
src/move_hidden.cpp:137:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (unsigned int j=0;j<nbstates;j++) gsl_vector_set(probas,j,gsl_vector_get(probas,j)*gsl_matrix_get(a,j,j)*gsl_matrix_get(e,j,msgs[k]));
^
src/move_hidden.cpp:132:21: warning: unused variable ‘top’ [-Wunused-variable]
int top=0,left=0,right=0;
^
src/move_hidden.cpp:132:27: warning: unused variable ‘left’ [-Wunused-variable]
int top=0,left=0,right=0;
^
src/move_hidden.cpp:132:34: warning: unused variable ‘right’ [-Wunused-variable]
int top=0,left=0,right=0;
^
src/move_hidden.cpp: In member function ‘gsl_matrix* wb::Move_hidden::forward(wb::Param*)’:
src/move_hidden.cpp:169:62: error: taking address of temporary [-fpermissive]
Util::normalize(&(gsl_matrix_column(f,i+1).vector));
^
src/move_hidden.cpp: In member function ‘void wb::Move_hidden::backward(wb::Param*, gsl_matrix*, wb::Tree*)’:
src/move_hidden.cpp:202:17: warning: unused variable ‘d’ [-Wunused-variable]
int d=gsl_vector_int_get(p->a->polySites,old)- gsl_vector_int_get(p->a->polySites,old-1);
^
src/move_hidden.cpp: In member function ‘void wb::Move_hidden::makee(wb::Param*, wb::Tree*)’:
src/move_hidden.cpp:423:59: error: taking address of temporary [-fpermissive]
Util::normalize(&(gsl_matrix_row(e,i+1).vector));
^
make: *** [build/move_hidden.o] Error 1
From this there are two errors, and the rest are warnings.
The errors are:
src/move_hidden.cpp: In member function ‘gsl_matrix* wb::Move_hidden::forward(wb::Param*)’:
src/move_hidden.cpp:169:62: error: taking address of temporary [-fpermissive]
Util::normalize(&(gsl_matrix_column(f,i+1).vector));
src/move_hidden.cpp: In member function ‘void wb::Move_hidden::makee(wb::Param_, wb::Tree_)’:
src/move_hidden.cpp:423:59: error: taking address of temporary [-fpermissive]
Util::normalize(&(gsl_matrix_row(e,i+1).vector));
Do you know if adding or removing a flag from the MakeFile could solve this issue?
Thank you
I'm not very familiar with C++, so I don't really know if this is a problem or not. I am just leaving it there in case it helps you.