[Pkg-scicomp-devel] Bug#417211: [Gmsh] Bug#417211: FTBFS with GCC 4.3: missing #includes

Christophe Geuzaine cgeuzaine at ulg.ac.be
Mon Apr 2 08:53:25 UTC 2007


Hi Martin & Christophe - Thanks for the report: this should be fixed in 
the next release.


Martin Michlmayr wrote:
> Package: gmsh
> Version: 2.0.5-1
> Usertags: ftbfs-gcc-4.3
> Tags: patch
> 
> Your package fails to build with GCC 4.3.  Version 4.3 has not been
> released yet but I'm building with a snapshot in order to find errors
> and give people an advance warning.  In GCC 4.3, the C++ header
> dependencies have been cleaned up.  The advantage of this is that
> programs will compile faster.  The downside is that you actually
> need to directly #include everything you use (but you really should
> do this anyway, otherwise your program won't work with any compiler
> other than GCC).  Some background of this can be found at
> http://gcc.gnu.org/PR28080
> 
> You can reproduce this problem with gcc-snapshot from unstable.
> 
>> Automatic build of gmsh_2.0.5-1 on em64t by sbuild/amd64 0.53
> ...
>> g++ -Wall  -O2 -DHAVE_LIBZ -DHAVE_GSL -DHAVE_MATH_EVAL -DHAVE_NETGEN -DHAVE_ANN_ -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_FLTK  -I/usr/include/freetype2 -DHAVE_64BIT_SIZE_T -I../Common -I../DataStr -I../Geo -I../Mesh -I../Numeric -I../Parser -I../Fltk -I../contrib/NR -I../contrib/FourierModel -I../contrib/ANN/include -I../contrib/MathEval  -c MElement.cpp
>> In file included from MElement.cpp:23:
>> MElement.h:136: error: 'string' in namespace 'std' does not name a type
>> MElement.h: In member function 'virtual char* MLine::getStringForPOS()':
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> MElement.h:195: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MLine::getStringForBDF()':
>> MElement.h:196: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MLine3::getStringForPOS()':
>> MElement.h:239: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MTriangle::getStringForPOS()':
>> MElement.h:340: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MTriangle::getStringForBDF()':
>> MElement.h:341: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MTriangle6::getStringForPOS()':
>> MElement.h:398: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MTriangle6::getStringForBDF()':
>> MElement.h:399: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MQuadrangle::getStringForPOS()':
>> MElement.h:546: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MQuadrangle::getStringForBDF()':
>> MElement.h:547: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MQuadrangle8::getStringForBDF()':
>> MElement.h:605: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MQuadrangle9::getStringForPOS()':
>> MElement.h:662: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MTetrahedron::getStringForPOS()':
>> MElement.h:719: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MTetrahedron::getStringForBDF()':
>> MElement.h:720: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MTetrahedron10::getStringForPOS()':
>> MElement.h:853: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MTetrahedron10::getStringForBDF()':
>> MElement.h:854: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MHexahedron::getStringForPOS()':
>> MElement.h:921: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MHexahedron::getStringForBDF()':
>> MElement.h:922: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MHexahedron20::getStringForBDF()':
>> MElement.h:1021: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MHexahedron27::getStringForPOS()':
>> MElement.h:1109: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MPrism::getStringForPOS()':
>> MElement.h:1185: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MPrism::getStringForBDF()':
>> MElement.h:1186: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MPrism15::getStringForBDF()':
>> MElement.h:1277: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MPrism18::getStringForPOS()':
>> MElement.h:1351: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MPyramid::getStringForPOS()':
>> MElement.h:1416: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MPyramid::getStringForBDF()':
>> MElement.h:1417: warning: deprecated conversion from string constant to 'char*'
>> MElement.h: In member function 'virtual char* MPyramid14::getStringForPOS()':
>> MElement.h:1563: warning: deprecated conversion from string constant to 'char*'
>> In file included from MElement.cpp:24:
>> GEntity.h: In member function 'virtual std::string GEntity::getTypeString()':
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> GEntity.h:122: warning: deprecated conversion from string constant to 'char*'
>> MElement.cpp: At global scope:
>> MElement.cpp:104: error: no 'std::string MElement::getInfoString()' member function declared in class 'MElement'
>> make[2]: *** [MElement.o] Error 1
>> make[2]: Leaving directory `/build/tbm/gmsh-2.0.5/Geo'
> 
> --- contrib/ANN/src/ANN.cpp~	2007-04-01 20:11:19.000000000 +0000
> +++ contrib/ANN/src/ANN.cpp	2007-04-01 20:11:26.000000000 +0000
> @@ -27,6 +27,8 @@
>  #include <ANN/ANNx.h>					// all ANN includes
>  #include <ANN/ANNperf.h>				// ANN performance 
>  
> +#include <cstdlib>
> +
>  using namespace std;					// make std:: accessible
>  
>  //----------------------------------------------------------------------
> --- contrib/ANN/src/kd_dump.cpp~	2007-04-01 20:11:40.000000000 +0000
> +++ contrib/ANN/src/kd_dump.cpp	2007-04-01 20:11:46.000000000 +0000
> @@ -34,6 +34,8 @@
>  #include "kd_tree.h"					// kd-tree declarations
>  #include "bd_tree.h"					// bd-tree declarations
>  
> +#include <cstdlib>
> +
>  using namespace std;					// make std:: available
>  
>  //----------------------------------------------------------------------
> --- Geo/MElement.h~	2007-04-01 20:02:34.000000000 +0000
> +++ Geo/MElement.h	2007-04-01 20:02:40.000000000 +0000
> @@ -21,6 +21,7 @@
>  // Please report all bugs and problems to <gmsh at geuz.org>.
>  
>  #include <stdio.h>
> +#include <string>
>  #include <algorithm>
>  #include "GmshDefines.h"
>  #include "MVertex.h"
> 


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine





More information about the Pkg-scicomp-devel mailing list