Re: Bug#625120: clonalframe: FTBFS: src/move_hidden.cpp:169:62: error: taking address of temporary [-fpermissive]
On 06/29/2011 09:17 AM, Andreas Tille wrote: sorry for the late reply to this bug. I can reproduce the problem on my side but I'm not finally sure that this is really a problem of clonalframe or whether it is a bad coincidence with libgsl0-dev. The line in question where the problem occures is: src/move_hidden.cpp:423:59: error: taking address of temporary [-fpermissive] 423:Util::normalize((gsl_matrix_row(e,i+1).vector)); So I suspect that there are temporary variables used where they should not but these are not declared in Move_hidden::makee(). My c++ knowledge ist too limited to track down the problem in a reasonable time frame and thus I CC debian-mentors and upstream (Xavier please find the full log of this bug below or at http://bugs.debian.org/625120). The attached patch should fix this issue. The problem here is that the return value of gsl_matrix_row is a non-lvalue and thus one cannot take its address. Kind regards, -- Sebastian Ramacher --- clonalframe-1.2.orig/src/move_hidden.cpp +++ clonalframe-1.2/src/move_hidden.cpp @@ -166,7 +166,8 @@ namespace wb sum+=gsl_matrix_get(f,j,i)*q[j][state][site-siteprev-1]; gsl_matrix_set(f,state,i+1,sum*gsl_matrix_get(e,state,msgs[site])); } -Util::normalize((gsl_matrix_column(f,i+1).vector)); +gsl_vector_view view = gsl_matrix_column(f,i+1); +Util::normalize(view.vector); } return f; } @@ -420,7 +421,8 @@ namespace wb gsl_matrix_set(e,i+1,2,(1.0-m2)*m3+(1.0-m3)*m2); } -Util::normalize((gsl_matrix_row(e,i+1).vector)); +gsl_vector_view view = gsl_matrix_row(e,i+1); +Util::normalize(view.vector); } } signature.asc Description: OpenPGP digital signature
Re: Bug#625120: clonalframe: FTBFS: src/move_hidden.cpp:169:62: error: taking address of temporary [-fpermissive]
Hi, sorry for the late reply to this bug. I can reproduce the problem on my side but I'm not finally sure that this is really a problem of clonalframe or whether it is a bad coincidence with libgsl0-dev. The line in question where the problem occures is: src/move_hidden.cpp:423:59: error: taking address of temporary [-fpermissive] 423:Util::normalize((gsl_matrix_row(e,i+1).vector)); So I suspect that there are temporary variables used where they should not but these are not declared in Move_hidden::makee(). My c++ knowledge ist too limited to track down the problem in a reasonable time frame and thus I CC debian-mentors and upstream (Xavier please find the full log of this bug below or at http://bugs.debian.org/625120). Any help is welcome Andreas. On Mon, May 02, 2011 at 02:30:18PM +0200, Lucas Nussbaum wrote: Source: clonalframe Version: 1.2-1 Severity: serious Tags: wheezy sid User: debian...@lists.debian.org Usertags: qa-ftbfs-20110502 qa-ftbfs Justification: FTBFS on amd64 Hi, During a rebuild of all packages in sid, your package failed to build on amd64. Relevant part: g++ -c -pipe -W -Wall -O3 -static -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF -Isrc -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -Ibuild -o build/move_hidden.o src/move_hidden.cpp src/move_hidden.cpp:25:5: warning: unused parameter 'p' [-Wunused-parameter] 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] src/move_hidden.cpp:133:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/move_hidden.cpp:137:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/move_hidden.cpp:132:21: warning: unused variable 'top' [-Wunused-variable] src/move_hidden.cpp:132:27: warning: unused variable 'left' [-Wunused-variable] src/move_hidden.cpp:132:34: warning: unused variable 'right' [-Wunused-variable] 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] 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] 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] make[2]: *** [build/move_hidden.o] Error 1 The full build log is available from: http://people.debian.org/~lucas/logs/2011/05/02/clonalframe_1.2-1_lsid64.buildlog A list of current common problems and possible solutions is available at http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute! About the archive rebuild: The rebuild was done on about 50 AMD64 nodes of the Grid'5000 platform, using a clean chroot. Internet was not accessible from the build systems. -- | Lucas Nussbaum | lu...@lucas-nussbaum.net http://www.lucas-nussbaum.net/ | | jabber: lu...@nussbaum.fr GPG: 1024D/023B3F4F | ___ Debian-med-packaging mailing list debian-med-packag...@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/debian-med-packaging -- http://fam-tille.de -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110629071744.gb31...@an3as.eu