Bug#417445: FTBFS with GCC 4.3: missing #includes

Martin Michlmayr tbm at cyrius.com
Mon Apr 2 19:32:43 UTC 2007


Package: netpanzer
Version: 0.8+svn20060319-2
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 (20070326-1 or higher)
from unstable.

> Automatic build of netpanzer_0.8+svn20060319-2 on coconut0 by sbuild/ia64 0.49
...
> C++ ./build/ia64-unknown-linux-gnu/opt/src/Lib/2D/Palette.o 
> src/Lib/2D/Palette.cpp: In static member function 'static void Palette::loadACT(const std::string&)':
> src/Lib/2D/Palette.cpp:350: error: 'auto_ptr' is not a member of 'std'
> src/Lib/2D/Palette.cpp:350: error: expected primary-expression before '>' token
> src/Lib/2D/Palette.cpp:350: error: 'file' was not declared in this scope
...
> C++ ./build/ia64-unknown-linux-gnu/opt/src/Lib/2D/ColorTable.o 
> src/Lib/2D/ColorTable.cpp:28: warning: deprecated conversion from string constant to 'char*'
> src/Lib/2D/ColorTable.cpp: In member function 'void ColorTable::loadTable(const char*)':
> src/Lib/2D/ColorTable.cpp:280: error: 'auto_ptr' is not a member of 'std'
> src/Lib/2D/ColorTable.cpp:280: error: expected primary-expression before '>' token
> src/Lib/2D/ColorTable.cpp:280: error: 'file' was not declared in this scope
> src/Lib/2D/ColorTable.cpp: In member function 'void ColorTable::saveTable(const char*) const':
> src/Lib/2D/ColorTable.cpp:304: error: 'auto_ptr' is not a member of 'std'
> src/Lib/2D/ColorTable.cpp:304: error: expected primary-expression before '>' token
> src/Lib/2D/ColorTable.cpp:305: error: 'file' was not declared in this scope
...

--- src/Lib/2D/Palette.cpp~	2007-04-02 19:25:29.000000000 +0000
+++ src/Lib/2D/Palette.cpp	2007-04-02 19:25:36.000000000 +0000
@@ -18,6 +18,7 @@
 #include <config.h>
 
 #include <math.h>
+#include <memory>
 
 #include "Palette.hpp"
 #include "Util/FileSystem.hpp"
--- src/Lib/2D/ColorTable.cpp~	2007-04-02 19:25:41.000000000 +0000
+++ src/Lib/2D/ColorTable.cpp	2007-04-02 19:25:51.000000000 +0000
@@ -17,6 +17,8 @@
 */
 #include <config.h>
 
+#include <memory>
+
 #include "Util/FileSystem.hpp"
 #include "Util/Log.hpp"
 #include "Util/Exception.hpp"
--- src/NetPanzer/Network/ProxyServer.cpp~	2007-04-02 19:26:23.000000000 +0000
+++ src/NetPanzer/Network/ProxyServer.cpp	2007-04-02 19:26:31.000000000 +0000
@@ -17,6 +17,7 @@
 */
 #include <config.h>
 
+#include <cstdlib>
 #include <string>
 #include <stdexcept>
 #include <ctype.h>
--- src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp~	2007-04-02 19:26:09.000000000 +0000
+++ src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp	2007-04-02 19:26:22.000000000 +0000
@@ -17,6 +17,7 @@
 */
 #include <config.h>
 
+#include <memory>
 #include <vector>
 #include <string>
 #include "MapSelectionView.hpp"

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




More information about the Pkg-games-devel mailing list