[ghemical-devel] #417336: FTBFS with GCC 4.3: missing #includes

LI Daobing lidaobing at gmail.com
Tue Jun 19 07:46:31 EDT 2007


when reply, please cc to 417336-forwarded at bugs.debian.org

From: Martin Michlmayr <tbm at cyrius.com>
To: submit at bugs.debian.org
Subject: FTBFS with GCC 4.3: missing #includes
Date: Mon, 2 Apr 2007 12:16:33 +0100

Package: libghemical
Version: 2.10-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 libghemical_2.10-1 on em64t by sbuild/amd64 0.53
...
>  g++ -DHAVE_CONFIG_H -I. -I. -I. -I../src -I/usr/include/sc -I/usr/include/sc -g -Wall -O2 -c atom.cpp  -fPIC -DPIC -o .libs/atom.o
> In file included from atom.cpp:10:
> atom.h:63: warning: type qualifiers ignored on function return type
> atom.cpp:16: warning: deprecated conversion from string constant to 'char*'
> atom.cpp:186: warning: type qualifiers ignored on function return type
> atom.cpp: In constructor 'atom::atom(element, const fGL*, i32u)':
> atom.cpp:282: error: 'EXIT_FAILURE' was not declared in this scope
> atom.cpp:282: error: 'exit' was not declared in this scope
> atom.cpp: In copy constructor 'atom::atom(const atom&)':
> atom.cpp:322: error: 'EXIT_FAILURE' was not declared in this scope
> atom.cpp:322: error: 'exit' was not declared in this scope
> atom.cpp: In member function 'const fGL* atom::GetCRD(i32u)':
> atom.cpp:352: error: 'EXIT_FAILURE' was not declared in this scope
> atom.cpp:352: error: 'exit' was not declared in this scope
> atom.cpp: In member function 'void atom::SetCRD(i32s, fGL, fGL, fGL)':
> atom.cpp:374: error: 'EXIT_FAILURE' was not declared in this scope
> atom.cpp:374: error: 'exit' was not declared in this scope
> make[3]: *** [atom.lo] Error 1
> make[3]: Leaving directory `/build/tbm/libghemical-2.10/src'

--- src/atom.h~	2007-04-02 11:01:26.000000000 +0000
+++ src/atom.h	2007-04-02 11:01:33.000000000 +0000
@@ -25,6 +25,7 @@

 #include "typedef.h"

+#include <cstdlib>
 #include <list>
 #include <vector>
 using namespace std;

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




-- 
LI Daobing


More information about the ghemical-devel mailing list