[Pkg-octave-devel] Bug#421218: FTBFS with GCC 4.3: must #include <typeinfo> before using typeid

Martin Michlmayr tbm at cyrius.com
Fri Apr 27 08:29:17 UTC 2007


Package: octplot
Version: 0.3.9-3
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).

You can reproduce this problem with gcc-snapshot (20070422-1 or higher)
from unstable. (Currently not available for i386, but for amd64 and
and ia64.  I hope to have i386 binaries in the archive in the near
future.)

> Automatic build of octplot_0.3.9-3 on em64t by sbuild/amd64 0.53
...
> g++ -DHAVE_CONFIG_H -I. -I. -I..     -I/usr/include/freetype2 -I/usr/include/freetype2 -g -Wall -O2 -fPIC -c -o octplot-object.o `test -f 'object.cpp' || echo './'`object.cpp
> object.cpp: In member function 'void Object::SetProperty(const char*, Property*)':
> object.cpp:91: error: must #include <typeinfo> before using typeid
> object.cpp:91: error: must #include <typeinfo> before using typeid
> make[3]: *** [octplot-object.o] Error 1

--- src/object.cpp~	2007-04-27 08:19:48.000000000 +0000
+++ src/object.cpp	2007-04-27 08:19:58.000000000 +0000
@@ -17,6 +17,7 @@
 
 #include <stdio.h>
 #include <string.h>
+#include <typeinfo>
 #include "globals.h"
 #include "object.h"
 #include "octplotapp.h"

-- 
Martin Michlmayr
http://www.cyrius.com/




More information about the Pkg-octave-devel mailing list