Stefan Hornburg (Racke) writes:
Sam Varshavchik wrote:
Stefan Hornburg (Racke) writes:
The following problem was reported to the Debian BTS
(http://bugs.debian.org/456096):
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). There's some more information about this at
http://www.cyrius.com/journal/2007/05/10#gcc-4.3-include
You can reproduce this problem with gcc-snapshot from unstable. Note
that Red Hat, Novell and Ubuntu have done some work getting packages
to build with GCC 4.3 so there might be patches floating around
somewhere. I suggest you talk to your upstream.
This specific compiler error should merely need a #include <string.h> in
the file. This specific case is trivial, but I probably won't be using
4.3 for a little while, and have no way of knowing if something else
needs to be fixed, so the original submitter should report anything else
that falls out.
I managed to get a bunch of files fixed (see attached patch), but now
the build bails out with the following error:
g++ -DHAVE_CONFIG_H -I. -Wall -I./.. -I.. -I./../afx -I./../rfc822 -I./libs
-g -O2 -MT webmlmdcmlm.o -MD -MP -MF .deps/webmlmdcmlm.Tpo -c -o webmlmdcmlm.o
webmlmdcmlm.C
In file included from webmlmdcmlm.C:8:
webmlmd.H: In function 'std::string webmlmd::basename(std::string)':
webmlmd.H:37: error: 'find_end' is not a member of 'std'
webmlmdcmlm.C: In member function 'bool webmlmd::cmlm::start(std::string,
std::string, std::string, const std::vector<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::allocator<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > >&)':
webmlmdcmlm.C:137: warning: deprecated conversion from string constant to
'char*'
Do you have an idea how to fix this ?
"#include <algorithm>" should take care of this one, but I'm not sure what
it's yammering about webmlmdcmlm.C:137.