Package: log4cpp
Version: 0.3.5-rc3-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.

Problem 1: putting ; at the end of functions

Problem 2: 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

Problem 3:
../include/log4cpp/RemoteSyslogAppender.hh: At global scope:
../include/log4cpp/RemoteSyslogAppender.hh:36: error: comma at end of 
enumerator list
../include/log4cpp/RemoteSyslogAppender.hh:61: error: comma at end of
enumerator list

Problems 1-3 are fixed with the patch below.  Unfortunately there are
a number of other problems that I've no idea how to fix.

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

> Automatic build of log4cpp_0.3.5-rc3-1 on em64t by sbuild/amd64 0.53
...
> /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.3.0/../../../../include/c++/4.3.0/backward/backward_warning.h:32:2:
>  warning: #warning This file includes at least one deprecated or antiquated 
> header. Please consider using one of the 32 headers found in section 17.4.1.2 
> of the C++ standard. Examples include substituting the <X> header for the 
> <X.h> header for C++ includes, or <iostream> instead of the deprecated header 
> <iostream.h>. To disable this warning use -Wno-deprecated.
> In file included from PortabilityImpl.hh:12,
>                  from Appender.cpp:10:
> ../include/log4cpp/Portability.hh:38: error: using typedef-name 
> 'std::ostringstream' after 'class'
> /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.3.0/../../../../include/c++/4.3.0/iosfwd:139:
>  error: 'std::ostringstream' has a previous declaration here
> In file included from ../include/log4cpp/LoggingEvent.hh:17,
>                  from ../include/log4cpp/Layout.hh:14,
>                  from ../include/log4cpp/Appender.hh:22,
>                  from Appender.cpp:11:
> ../include/log4cpp/TimeStamp.hh:38: error: extra ';'
> ../include/log4cpp/TimeStamp.hh:46: error: extra ';'
> ../include/log4cpp/TimeStamp.hh:55: error: extra ';'
> ../include/log4cpp/TimeStamp.hh:63: error: extra ';'
> In file included from ../include/log4cpp/Appender.hh:22,
>                  from Appender.cpp:11:
> ../include/log4cpp/Layout.hh:27: error: extra ';'
> In file included from ../include/log4cpp/threading/Threading.hh:34,
>                  from ../include/log4cpp/Appender.hh:24,
>                  from Appender.cpp:11:
> ../include/log4cpp/threading/DummyThreads.hh:36: error: extra ';'
> ../include/log4cpp/threading/DummyThreads.hh:40: error: extra ';'
> ../include/log4cpp/threading/DummyThreads.hh:44: error: extra ';'
> ../include/log4cpp/threading/DummyThreads.hh:46: error: extra ';'
> ../include/log4cpp/threading/DummyThreads.hh:47: error: extra ';'
> ../include/log4cpp/threading/DummyThreads.hh:54: error: extra ';'
> ../include/log4cpp/threading/DummyThreads.hh:60: error: extra ';'
> In file included from Appender.cpp:11:
> ../include/log4cpp/Appender.hh:106: error: extra ';'
> make[2]: *** [Appender.lo] Error 1
> make[2]: Leaving directory `/build/tbm/log4cpp-0.3.5-rc3/src'

--- src/PatternLayout.cpp~      2007-04-25 17:40:54.000000000 +0000
+++ src/PatternLayout.cpp       2007-04-25 17:41:02.000000000 +0000
@@ -20,6 +20,7 @@
 #endif
 
 #include <iomanip>
+#include <cstdlib>
 #include <ctime>
 #include <cmath>
 
--- include/log4cpp/threading/DummyThreads.hh~  2007-04-25 15:27:29.000000000 
+0000
+++ include/log4cpp/threading/DummyThreads.hh   2007-04-25 15:28:04.000000000 
+0000
@@ -33,31 +33,31 @@
             public:
             typedef T data_type;
 
-            inline ThreadLocalDataHolder() {};
+            inline ThreadLocalDataHolder() {}
             inline ~ThreadLocalDataHolder() {
                 if (_data) 
                     delete _data;
-            };
+            }
             
             inline T* get() const {
                 return _data;
-            };
+            }
 
-            inline T* operator->() const { return get(); };
-            inline T& operator*() const { return *get(); };
+            inline T* operator->() const { return get(); }
+            inline T& operator*() const { return *get(); }
 
             inline T* release() {
                 T* result = _data;
                 _data = NULL;
 
                 return result;
-            };
+            }
 
             inline void reset(T* p = NULL) {
                 if (_data) 
                     delete _data;
                 _data = p;
-            };
+            }
 
             private:            
             T* _data;            
--- include/log4cpp/Appender.hh~        2007-04-25 15:28:06.000000000 +0000
+++ include/log4cpp/Appender.hh 2007-04-25 15:28:14.000000000 +0000
@@ -103,7 +103,7 @@
          * Get the name of this appender. The name identifies the appender.
          * @returns the name of the appender.
          **/
-        inline const std::string& getName() const { return _name; };
+        inline const std::string& getName() const { return _name; }
         
         /**
          * Set the threshold priority of this Appender. The Appender will not
--- include/log4cpp/Layout.hh~  2007-04-25 15:28:18.000000000 +0000
+++ include/log4cpp/Layout.hh   2007-04-25 15:29:05.000000000 +0000
@@ -24,7 +24,7 @@
         /**
          * Destructor for Layout.
          **/
-        virtual ~Layout() { };
+        virtual ~Layout() { }
 
         /**
          * Formats the LoggingEvent data to a string that appenders can log.
--- include/log4cpp/TimeStamp.hh~       2007-04-25 15:28:24.000000000 +0000
+++ include/log4cpp/TimeStamp.hh        2007-04-25 15:28:39.000000000 +0000
@@ -35,7 +35,7 @@
         **/
         inline int getSeconds() const {
             return _seconds;
-        };
+        }
 
         /** 
            Returns the 'subseconds' part of the TimeStamp in milliseconds,
@@ -43,7 +43,7 @@
         **/
         inline int getMilliSeconds() const {
             return _microSeconds / 1000;
-        };
+        }
 
         /**
            Returns the subsecond part of the TimeStamp in microseconds.
@@ -52,7 +52,7 @@
          **/
         inline int getMicroSeconds() const {
             return _microSeconds;
-        };
+        }
 
         /**
            Returns a TimeStamp representing the time at which the application
@@ -60,7 +60,7 @@
         **/
         static inline const TimeStamp& getStartTime() {
             return _startStamp;
-        };
+        }
 
         protected:
         static TimeStamp _startStamp;
--- include/log4cpp/Category.hh~        2007-04-25 15:31:01.000000000 +0000
+++ include/log4cpp/Category.hh 2007-04-25 15:31:27.000000000 +0000
@@ -170,7 +170,7 @@
             } else {
                 removeAllAppenders();
             }
-        };
+        }
 
         /**
          * Adds an Appender for this Category.
@@ -180,7 +180,7 @@
          **/
         inline void setAppender(Appender& appender) {
             addAppender(appender);
-        };
+        }
 
         /**
          * Returns the first Appender for this Category, or NULL if no
@@ -224,7 +224,7 @@
          **/
         inline bool ownsAppender() const throw() {
             return ownsAppender(getAppender());
-        };
+        }
 
         /**
          * Returns true if the Category owns the Appender. In that case the
@@ -320,7 +320,7 @@
          **/ 
         inline bool isDebugEnabled() const throw() { 
             return isPriorityEnabled(Priority::DEBUG);
-        };
+        }
         
         /**
          * Return a CategoryStream with priority DEBUG.
@@ -350,7 +350,7 @@
          **/ 
         inline bool isInfoEnabled() const throw() { 
             return isPriorityEnabled(Priority::INFO);
-        };
+        }
 
         /**
          * Return a CategoryStream with priority INFO.
@@ -380,7 +380,7 @@
          **/ 
         inline bool isNoticeEnabled() const throw() { 
             return isPriorityEnabled(Priority::NOTICE);
-        };
+        }
 
         /**
          * Return a CategoryStream with priority NOTICE.
@@ -410,7 +410,7 @@
          **/ 
         inline bool isWarnEnabled() const throw() { 
             return isPriorityEnabled(Priority::WARN);
-        };
+        }
 
         /**
          * Return a CategoryStream with priority WARN.
@@ -418,7 +418,7 @@
          **/
         inline CategoryStream warnStream() {
             return getStream(Priority::WARN);
-        };
+        }
         
         /** 
          * Log a message with error priority.
@@ -440,7 +440,7 @@
          **/ 
         inline bool isErrorEnabled() const throw() { 
             return isPriorityEnabled(Priority::ERROR);
-        };
+        }
         
         /**
          * Return a CategoryStream with priority ERROR.
@@ -448,7 +448,7 @@
          **/
         inline CategoryStream errorStream() {
             return getStream(Priority::ERROR);
-        };
+        }
 
         /** 
          * Log a message with crit priority.
@@ -470,7 +470,7 @@
          **/ 
         inline bool isCritEnabled() const throw() { 
             return isPriorityEnabled(Priority::CRIT);
-        };
+        }
         
         /**
          * Return a CategoryStream with priority CRIT.
@@ -478,7 +478,7 @@
          **/
         inline CategoryStream critStream() {
             return getStream(Priority::CRIT);
-        };
+        }
         
         /** 
          * Log a message with alert priority.
@@ -500,7 +500,7 @@
          **/ 
         inline bool isAlertEnabled() const throw() { 
             return isPriorityEnabled(Priority::ALERT);
-        };
+        }
         
         /**
          * Return a CategoryStream with priority ALERT.
@@ -508,7 +508,7 @@
          **/
         inline CategoryStream alertStream() throw() {
             return getStream(Priority::ALERT);
-        };
+        }
 
         /** 
          * Log a message with emerg priority.
@@ -530,7 +530,7 @@
          **/ 
         inline bool isEmergEnabled() const throw() { 
             return isPriorityEnabled(Priority::EMERG);
-        };
+        }
         
         /**
          * Return a CategoryStream with priority EMERG.
@@ -538,7 +538,7 @@
          **/
         inline CategoryStream emergStream() {
             return getStream(Priority::EMERG);
-        };
+        }
 
         /** 
          * Log a message with fatal priority. 
@@ -566,7 +566,7 @@
          **/ 
         inline bool isFatalEnabled() const throw() { 
             return isPriorityEnabled(Priority::FATAL);
-        };
+        }
         
         /**
          * Return a CategoryStream with priority FATAL.
@@ -576,7 +576,7 @@
          **/
         inline CategoryStream fatalStream() {
             return getStream(Priority::FATAL);
-        };
+        }
 
         /**
          * Return a CategoryStream with given Priority.
--- include/log4cpp/CategoryStream.hh~  2007-04-25 15:31:53.000000000 +0000
+++ include/log4cpp/CategoryStream.hh   2007-04-25 15:31:58.000000000 +0000
@@ -55,7 +55,7 @@
          * Returns the destination Category for this stream.
          * @returns The Category.
          **/
-        inline Category& getCategory() const { return _category; };
+        inline Category& getCategory() const { return _category; }
 
         /**
          * Returns the priority for this stream.
@@ -63,7 +63,7 @@
          **/
         inline Priority::Value getPriority() const throw() { 
             return _priority; 
-        };
+        }
 
         /**
          * Streams in a Separator. If the separator equals 
--- include/log4cpp/PatternLayout.hh~   2007-04-25 15:34:25.000000000 +0000
+++ include/log4cpp/PatternLayout.hh    2007-04-25 15:34:33.000000000 +0000
@@ -90,7 +90,7 @@
 
         class LOG4CPP_EXPORT PatternComponent {
             public:
-            inline virtual ~PatternComponent() {};
+            inline virtual ~PatternComponent() {}
             virtual void append(std::ostringstream& out, const LoggingEvent& 
event) = 0;
         };
 
--- include/log4cpp/RemoteSyslogAppender.hh~    2007-04-25 15:34:38.000000000 
+0000
+++ include/log4cpp/RemoteSyslogAppender.hh     2007-04-25 15:34:53.000000000 
+0000
@@ -33,7 +33,7 @@
     LOG_WARNING = 4,       ///< warning conditions
     LOG_NOTICE  = 5,       ///< normal but significant condition
     LOG_INFO    = 6,       ///< informational
-    LOG_DEBUG   = 7,       ///< debug-level messages
+    LOG_DEBUG   = 7        ///< debug-level messages
 } SyslogLevel;
 
 typedef enum {
@@ -58,7 +58,7 @@
     LOG_LOCAL4   = (20<<3), ///< reserved for local use
     LOG_LOCAL5   = (21<<3), ///< reserved for local use
     LOG_LOCAL6   = (22<<3), ///< reserved for local use
-    LOG_LOCAL7   = (23<<3), ///< reserved for local use
+    LOG_LOCAL7   = (23<<3)  ///< reserved for local use
 } SyslogFacility;
 #endif
 

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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to